Template

Templates contain the OS and the initial setup of a Compute instance.

Read more

get-template

Retrieve Template details

GET /template/{id}

Path parameters

NameInDescription
idpath

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
application-consistent-snapshot-enabledbooleanTemplate with Qemu Guest Agent installed for application consistent snapshot
boot-modestringBoot mode (default: legacy)

Allowed values: legacy, uefi.
buildstringTemplate build
checksumstringTemplate MD5 checksum
created-atstringTemplate creation date
default-userstringTemplate default user
descriptionstringTemplate description
familystringTemplate family
idstringTemplate ID
maintainerstringTemplate maintainer
namestringTemplate name
password-enabledbooleanEnable password-based login
sizeintegerTemplate size
ssh-key-enabledbooleanEnable SSH key-based login
urlstringTemplate source URL
versionstringTemplate version
visibilitystringTemplate visibility

Allowed values: private, public.
zonesarray[string]Zones availability
Example output
{
  "application-consistent-snapshot-enabled": true,
  "boot-mode": "legacy",
  "build": "string",
  "checksum": "string",
  "created-at": "2024-01-01T12:00:00Z",
  "default-user": "string",
  "description": "string",
  "family": "string",
  "id": "string",
  "maintainer": "string",
  "name": "string",
  "password-enabled": true,
  "size": 0,
  "ssh-key-enabled": true,
  "url": "string",
  "version": "string",
  "visibility": "private",
  "zones": [
    "ch-dk-2"
  ]
}

SDK reference for get-template: golang | Python | Java

CLI: exo api get-template

update-template

Update template attributes

PUT /template/{id}

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
descriptionstringnoTemplate Description
namestringnoTemplate name
Example
{
  "description": "string",
  "name": "string"
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for update-template: golang | Python | Java

CLI: exo api update-template

delete-template

Delete a Template

DELETE /template/{id}

Path parameters

NameInDescription
idpath

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for delete-template: golang | Python | Java

CLI: exo api delete-template


Other Operations

copy-template

Copy a Template from a zone to another

POST /template/{id}

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
target-zoneobjectyesZone schema details
Example
{
  "target-zone": {
    "api-endpoint": "string",
    "name": "ch-dk-2",
    "sos-endpoint": "string"
  }
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for copy-template: golang | Python | Java

CLI: exo api copy-template

register-template

Register a Template

POST /template

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
checksumstringyesTemplate MD5 checksum
namestringyesTemplate name
password-enabledbooleanyesEnable password-based login
ssh-key-enabledbooleanyesEnable SSH key-based login
urlstringyesTemplate source URL
application-consistent-snapshot-enabledbooleannoTemplate with support for Application Consistent Snapshots
boot-modestringnoBoot mode (default: legacy)

Allowed values: legacy, uefi.
buildstringnoTemplate build
default-userstringnoTemplate default user
descriptionstringnoTemplate description
maintainerstringnoTemplate maintainer
sizeintegernoTemplate size
versionstringnoTemplate version
Example
{
  "application-consistent-snapshot-enabled": true,
  "boot-mode": "legacy",
  "build": "string",
  "checksum": "string",
  "default-user": "string",
  "description": "string",
  "maintainer": "string",
  "name": "string",
  "password-enabled": true,
  "size": 0,
  "ssh-key-enabled": true,
  "url": "string",
  "version": "string"
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for register-template: golang | Python | Java

CLI: exo api register-template

list-templates

List Templates

GET /template

Query parameters

NameInRequiredDescription
visibilityqueryno
familyqueryno

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
templatesarray[object]schema details
Example output
{
  "templates": [
    {
      "application-consistent-snapshot-enabled": true,
      "boot-mode": "legacy",
      "build": "string",
      "checksum": "string",
      "created-at": "2024-01-01T12:00:00Z",
      "default-user": "string",
      "description": "string",
      "family": "string",
      "id": "string",
      "maintainer": "string",
      "name": "string",
      "password-enabled": true,
      "size": 0,
      "ssh-key-enabled": true,
      "url": "string",
      "version": "string",
      "visibility": "private",
      "zones": [
        "ch-dk-2"
      ]
    }
  ]
}

SDK reference for list-templates: golang | Python | Java

CLI: exo api list-templates

Last updated on