Create VM template
Create a reusable VM template from an existing VM.
Authorization
bearer_auth Authentication
Create an API token on Profile. Send it in the Authorization header:
Authorization: Bearer os1_...Do not use the Keycloak web-session JWT as an API token. Keep the secret secure and do not share it.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create a reusable VM template from an existing VM.
Response Body
application/json
application/json
text/pain
application/json
application/json
curl -X POST "https://example.com/v1/vm-templates" \ -H "Content-Type: application/json" \ -d '{ "name": "my-template", "vm_id": "cc3ccab2-0ae2-11ef-9136-6a0922f6458b", "project_id": "default", "sequence_id": 123456 }'{ "template": { "kind": "user", "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "name": "my-template", "description": null, "icon_url": null, "size_gib": 25.5, "status": "creating", "source_vm_id": "cc3ccab2-0ae2-11ef-9136-6a0922f6458b", "project_id": "default", "created_at": "2024-06-01T12:00:00Z", "updated_at": "2024-06-01T12:00:00Z" }}{ "errors": [ { "message": "'vcpus' field must be an integer", "field": "resource_id" } ]}"Access denied"{ "errors": [ { "message": "User not initialized. Send POST /v1/init, then retry the request." } ]}{ "errors": [ { "message": "VM with ID 23 not found" } ]}