Reference For: developers

API: plans

Operations of the plans tag of the native REST API.

VM plans and the self-service image catalogue (operator-managed)

GET /v1/catalogue/images

The self-service image catalogue: every entry for operators, the offered ones for tenant users.

CLI
kyvernon catalogue list

Responses

StatusDescriptionSchema
200OKarray of CatalogueImageView

PUT /v1/catalogue/images/{id}

Sets the catalogue flag and metadata of a template (Kyvernon.Catalogue.Manage).

CLI
kyvernon catalogue set <id> --body <json>

Parameters

NameInTypeRequiredDescription
idpathstringyesThe template VM (vm-N)

Request body

application/json: CatalogueImageView

NameTypeRequiredDescription
cataloguebooleanOffered to tenants.
cloudInitbooleanPersonalised through cloud-init.
defaultUserstringDefault user.
displayNamestringName shown to tenants.
minDiskGibinteger (int64)Smallest disk (GiB).
noCredentialsbooleanTakes no credentials (no password or SSH keys; e.g. EuroOS).
osFamilystringlinux, windows, euroos, bsd or other.
osVersionstringOS version.
rescuebooleanA rescue image.
templateIdstringThe template (vm-N; ignored in requests, the path names it).
templateNamestringThe template's name.

Responses

StatusDescriptionSchema
200OKCatalogueImageView
400Invalid argument; the error body names the fieldErrorBody
412Failed precondition; the error body says whichErrorBody

DELETE /v1/catalogue/images/{id}

Removes a template from the catalogue.

CLI
kyvernon catalogue remove <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the catalogue image (a template virtual machine)

Responses

StatusDescriptionSchema
204Done; no body
404Not found (or not visible to the caller)ErrorBody

GET /v1/plans

VM plans: all for operators, the orderable ones for tenant users.

CLI
kyvernon plans list

Responses

StatusDescriptionSchema
200OKarray of PlanView

POST /v1/plans

Creates a plan (Kyvernon.Plan.Manage).

CLI
kyvernon plans create --body <json>

Request body

application/json: PlanView

NameTypeRequiredDescription
allowedImagesarray of stringImages that may be used (empty: every catalogue image).
bandwidthMbitinteger (int32) or nullBandwidth cap (Mbit/s).
descriptionstringDescription.
diskGibinteger (int64)yesDisk (GiB).
diskTypestringthin or thick.
idstringvmplan-N (ignored in requests).
ipv6booleanAn IPv6 /64.
memoryMibinteger (int64)yesMemory (MiB).
namestringyesUnique name.
orderablebooleanOrderable by tenants.
publicIpv4integer (int32)Public IPv4 addresses included.
trafficActionstringnotify or throttle at 100 % of the monthly traffic.
trafficGibMonthinteger (int64)Traffic per month (GiB, 0 = unmetered).
vcpusinteger (int32)yesvCPUs.

Responses

StatusDescriptionSchema
201CreatedPlanView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

GET /v1/plans/{id}

One plan.

CLI
kyvernon plans get <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the plan (vmplan-N)

Responses

StatusDescriptionSchema
200OKPlanView
404Not found (or not visible to the caller)ErrorBody

PUT /v1/plans/{id}

Replaces a plan (Kyvernon.Plan.Manage); servers keep their size until resized.

CLI
kyvernon plans update <id> --body <json>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the plan (vmplan-N)

Request body

application/json: PlanView

NameTypeRequiredDescription
allowedImagesarray of stringImages that may be used (empty: every catalogue image).
bandwidthMbitinteger (int32) or nullBandwidth cap (Mbit/s).
descriptionstringDescription.
diskGibinteger (int64)yesDisk (GiB).
diskTypestringthin or thick.
idstringvmplan-N (ignored in requests).
ipv6booleanAn IPv6 /64.
memoryMibinteger (int64)yesMemory (MiB).
namestringyesUnique name.
orderablebooleanOrderable by tenants.
publicIpv4integer (int32)Public IPv4 addresses included.
trafficActionstringnotify or throttle at 100 % of the monthly traffic.
trafficGibMonthinteger (int64)Traffic per month (GiB, 0 = unmetered).
vcpusinteger (int32)yesvCPUs.

Responses

StatusDescriptionSchema
200OKPlanView
404Not found (or not visible to the caller)ErrorBody

DELETE /v1/plans/{id}

Deletes a plan that no server uses (error.plan.in_use).

CLI
kyvernon plans delete <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the plan (vmplan-N)

Responses

StatusDescriptionSchema
204Done; no body
412Failed precondition; the error body says whichErrorBody

Version 0.1.