Skip to content

Users

This document describes the Unikraft Cloud Users API (v1) for retrieving information about your user account.

API Endpoints

The Unikraft Cloud Users API provides the following endpoints:

MethodEndpointPurpose and Description
GET/v1/users/quotasReturns information about the quotas and limits of your user

In the following, the API endpoints are specified relative to this base URL:

https://api.X.kraft.cloud/

With X being the IATA metro code. We use fra0 as an example in the documentation. See the introduciton for more information on how to connect to the API.

List Quota Usage and Limits

Lists quota usage and limits of your user account. Limits are hard limits that cannot be exceeded.

Request

Endpoints: GET /v1/users/quotas
GET /v1/users/<UUID>/quotas

ParameterTypeDefaultRequiredDescription
None
Example of retrieving quota information for the authenticated user account
curl -X GET \
-H "Authorization: Bearer ${UKC_TOKEN}" \
"https://api.fra0.kraft.cloud/v1/users/quotas"

Response

The response is embedded in a JSON object as described in API Responses.

FieldTypeDescription
statusstringsuccess on success, or error if the request failed
uuidUUIDUUID of your user
usedobjectUsed quota
    instancesintNumber of instances
    live_instancesintNumber of instances that are not in the stopped state
    live_memory_mbintAmount of memory assigned to instances that are not in the stopped state in megabytes
    service_groupsintNumber of services
    servicesintNumber of published network ports over all existing services
    volumesintNumber of volumes
    total_volume_mbintTotal size of all volumes in megabytes
hardobjectSame as used but contains the configured quota limits
limitsobjectAdditional limits
    min_memory_mbintMinimum amount of memory assigned to live instances in megabytes
    max_memory_mbintMaximum amount of memory assigned to live instances in megabytes
    min_volume_mbintMinimum size of a volume in megabytes
    max_volume_mbintMaximum size of a volume in megabytes
    min_autoscale_sizeintMinimum size of an autoscale group1
    max_autoscale_sizeintMaximum size of an autoscale group1

1 These restrict the min_size and max_size fields of the autoscale configuration. If both values are 1 autoscale is not enabled for your account. If you want to explore autoscale for your services, please contact us via support@unikraft.cloud.

Status 200 OK
{
"status": "success",
"data": {
"quotas": [
{
"status": "success",
"uuid": "471a2a73-36db-4df9-bb63-82a45810e88a",
"used": {
"instances": 3,
"live_instances": 2,
"lime_memory_mb": 64,
"service_groups": 3,
"services": 3,
"volumes": 2,
"total_volume_mb": 400
},
"hard": {
"instances": 10,
"live_instances": 10,
"live_memory_mb": 2048,
"service_groups": 10,
"services": 16,
"volumes": 10,
"total_volume_mb": 1024
},
"limits": {
"min_memory_mb": 16,
"max_memory_mb": 2048,
"min_volume_mb": 2,
"max_volume_mb": 1024,
"min_autoscale_size": 1,
"max_autoscale_size": 1
}
}
]
}
}