KraftCloud offers a highly performant REST API which is accessible at
To use the KraftCloud REST API, you need to authenticate using an API token.
This will be provided to you during your on-boarding.
Once you have the token, you include it in your API requests using the
Authorization header as follows:
The KraftCloud REST API provides the following categories of endpoints:
|Purpose and Description
|Manage autoscale settings for your service groups
|Get an overview of available images
|Create new and manage existing Unikraft instances
|Publish network services and create load balancing groups
|Inspect quota settings and your account’s amount of used resources
|Create and manage volumes for persistent storage
The endpoints accept parameters via JSON objects in the request body. See the individual endpoint’s section for the available parameters. To prevent misconfigurations, KraftCloud aborts requests that contain unknown, ill-typed, or otherwise invalid parameters. A corresponding error message is included in the response (see API Responses).
Global Scope vs. Local Scope
Many endpoints can be accessed in global scope and in local scope. The global scope allows batch operations by specifying multiple requests for the same endpoint as a JSON array (e.g.,to start or stop multiple instances in a single call). In contrast, the local scope operates on one specific instance only.
Some endpoints such as for creating a new object or getting the status of an object are accessed via the HTTP method:
GET on the
/<category>/<object> URL; they don’t have an explicit
See the individual endpoint’s documentation for the URLs and HTTP methods available.
KraftCloud refers to objects like instances and service groups using Universally Unique Identifiers (UUID) of the form
Each object is assigned a random UUID during creation and keeps it until the object is deleted.
Querying the status of multiple instances (global scope):
Querying the status of only one specific instance (local scope):
If the endpoint does not require any other parameters than the object’s UUID, the JSON request body can be omitted.
To simplify working with objects like instances and service groups, KraftCloud supports the ability to set a custom name when you create an object: you can then reference the object from the global scope by name.
For example, if the first instance has the name
my-instance, you can use the instance’s name instead of its UUID:
The object name must be a valid domain name according to RFC 1035:
- Labels are not longer than 63 characters, and at least 1 character
- Only digits (0-9), letters (a-z, A-Z), hyphens (-), and dots (.) to separate labels are allowed
- Labels may only start with a letter
- Labels may only end with a letter or digit
- Consecutive hyphens and dots are not allowed
In addition, the following restrictions apply:
- Upper case letters are converted to lower case
- Maximum name length is 121 including label separators
- The name must not be a fully-qualified domain name (FQDN) - i.e., it must not end with a dot (.)
The API uses standard HTTP response codes to indicate success or failure.
In addition, the response body contains more details about the result of the operation in a JSON object.
On success the
data member contains an array of objects with one object per result.
The array is named according to the type of object that the request is operating on.
For example, when working with instances the response contains an
Requests may also be partially successful if the operation could be performed for some of the specified objects only: