Template
Templates contain the OS and the initial setup of a Compute instance.
get-template
Retrieve Template details
GET /template/{id}Path parameters
| Name | In | Description |
|---|---|---|
id | path |
Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
application-consistent-snapshot-enabled | boolean | Template with Qemu Guest Agent installed for application consistent snapshot |
boot-mode | string | Boot mode (default: legacy) Allowed values: legacy, uefi. |
build | string | Template build |
checksum | string | Template MD5 checksum |
created-at | string | Template creation date |
default-user | string | Template default user |
description | string | Template description |
family | string | Template family |
id | string | Template ID |
maintainer | string | Template maintainer |
name | string | Template name |
password-enabled | boolean | Enable password-based login |
size | integer | Template size |
ssh-key-enabled | boolean | Enable SSH key-based login |
url | string | Template source URL |
version | string | Template version |
visibility | string | Template visibility Allowed values: private, public. |
zones | array[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
| Name | In | Description |
|---|---|---|
id | path |
Request body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
description | string | no | Template Description |
name | string | no | Template name |
Example
{
"description": "string",
"name": "string"
}Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation 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
| Name | In | Description |
|---|---|---|
id | path |
Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation 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
| Name | In | Description |
|---|---|---|
id | path |
Request body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
target-zone | object | yes | Zone schema details |
Example
{
"target-zone": {
"api-endpoint": "string",
"name": "ch-dk-2",
"sos-endpoint": "string"
}
}Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation 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 /templateRequest body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
checksum | string | yes | Template MD5 checksum |
name | string | yes | Template name |
password-enabled | boolean | yes | Enable password-based login |
ssh-key-enabled | boolean | yes | Enable SSH key-based login |
url | string | yes | Template source URL |
application-consistent-snapshot-enabled | boolean | no | Template with support for Application Consistent Snapshots |
boot-mode | string | no | Boot mode (default: legacy) Allowed values: legacy, uefi. |
build | string | no | Template build |
default-user | string | no | Template default user |
description | string | no | Template description |
maintainer | string | no | Template maintainer |
size | integer | no | Template size |
version | string | no | Template 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
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation 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 /templateQuery parameters
| Name | In | Required | Description |
|---|---|---|---|
visibility | query | no | |
family | query | no |
Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
templates | array[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