Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples.
Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. CLI Download and Installation instructions.
If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the Contabo Product Documentation.
In order to use the Contabo API you will need the following credentials which are available from the Customer Control Panel:
You can either use the API directly or by using the cntb
CLI (Command Line Interface) tool.
curl
for Linux/Unix like systemsThis requires curl
and jq
in your shell (e.g. bash
, zsh
). Please replace the first four placeholders with actual values.
CLIENT_ID=<ClientId from Customer Control Panel>
CLIENT_SECRET=<ClientSecret from Customer Control Panel>
API_USER=<API User from Customer Control Panel>
API_PASSWORD='<API Password from Customer Control Panel>'
ACCESS_TOKEN=$(curl -d "client_id=$CLIENT_ID" -d "client_secret=$CLIENT_SECRET" --data-urlencode "username=$API_USER" --data-urlencode "password=$API_PASSWORD" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token')
# get list of your instances
curl -X GET -H "Authorization: Bearer $ACCESS_TOKEN" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" "https://api.contabo.com/v1/compute/instances" | jq
PowerShell
for WindowsPlease open PowerShell
and execute the following code after replacing the first four placeholders with actual values.
$client_id='<ClientId from Customer Control Panel>'
$client_secret='<ClientSecret from Customer Control Panel>'
$api_user='<API User from Customer Control Panel>'
$api_password='<API Password from Customer Control Panel>'
$body = @{grant_type='password'
client_id=$client_id
client_secret=$client_secret
username=$api_user
password=$api_password}
$response = Invoke-WebRequest -Uri 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' -Method 'POST' -Body $body
$access_token = (ConvertFrom-Json $([String]::new($response.Content))).access_token
# get list of your instances
$headers = @{}
$headers.Add("Authorization","Bearer $access_token")
$headers.Add("x-request-id","51A87ECD-754E-4104-9C54-D01AD0F83406")
Invoke-WebRequest -Uri 'https://api.contabo.com/v1/compute/instances' -Method 'GET' -Headers $headers
cntb
CLI toolDownload cntb
for your operating system (MacOS, Windows and Linux supported) here
Unzip the downloaded file
You might move the executable to any location on your disk. You may update your PATH
environment variable for easier invocation.
Configure it once to use your credentials
cntb config set-credentials --oauth2-clientid=<ClientId from Customer Control Panel> --oauth2-client-secret=<ClientSecret from Customer Control Panel> --oauth2-user=<API User from Customer Control Panel> --oauth2-password='<API Password from Customer Control Panel>'
Use the CLI
# get list of your instances
cntb get instances
# help
cntb help
The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping) of VPS and VDS (please note that Storage VPS are not supported via API or CLI) as well as managing snapshots and custom images. It also offers you to take advantage of cloud-init at least on our default / standard images (for custom images you'll need to provide cloud-init support packages). The API offers provisioning of cloud-init scripts via the user_data
field.
Custom images must be provided in .qcow2
or .iso
format. This gives you even more flexibility for setting up your environment.
The Object Storage API allows you to order, upgrade, cancel and control the auto-scaling feature for S3 compatible object storage. You may also get some usage statistics. You can only buy one object storage per location. In case you need more storage space in a location you can purchase more space or enable the auto-scaling feature to purchase automatically more storage space up to the specified monthly limit.
Please note that this is not the S3 compatible API. It is not documented here. The S3 compatible API needs to be used with the corresponding credentials, namely an access_key
and secret_key
. Those can be retrieved by invoking the User Management API. All purchased object storages in different locations share the same credentials. You are free to use S3 compatible tools like aws
cli or similar.
The Private Networking API allows you to manage private networks / Virtual Private Clouds (VPC) for your Cloud VPS and VDS (please note that Storage VPS are not supported via API or CLI). Having a private network allows the associated instances to have a private and direct network connection. The traffic won't leave the data center and cannot be accessed by any other instance.
With this feature you can create multi layer systems, e.g. having a database server being only accessible from your application servers in one private network and keep the database replication in a second, separate network. This increases the speed as the traffic is NOT routed to the internet and also security as the traffic is within it's own secured VLAN.
Adding a Cloud VPS or VDS to a private network requires a reinstallation to make sure that all relevant parts for private networking are in place. When adding the same instance to another private network it will require a restart in order to make additional virtual network interface cards (NICs) available.
Please note that for each instance being part of one or several private networks a payed add-on is required. You can automatically purchase it via the Compute Management API.
You can optionally save your passwords or public ssh keys using the Secrets Management API. You are not required to use it there will be no functional disadvantages.
By using that API you can easily reuse you public ssh keys when setting up different servers without the need to look them up every time. It can also be used to allow Contabo Supporters to access your machine without sending the passwords via potentially unsecure emails.
If you need to allow other persons or automation scripts to access specific API endpoints resp. resources the User Management API comes into play. With that API you are able to manage users having possibly restricted access. You are free to define those restrictions to fit your needs. So beside an arbitrary number of users you basically define any number of so called roles
. Roles allows access and must be one of the following types:
apiPermission
This allows you to specify a restriction to certain functions of an API by allowing control over POST (=Create), GET (=Read), PUT/PATCH (=Update) and DELETE (=Delete) methods for each API endpoint (URL) individually.
resourcePermission
In order to restrict access to specific resources create a role with resourcePermission
type by specifying any number of tags. These tags need to be assigned to resources for them to take effect. E.g. a tag could be assigned to several compute resources. So that a user with that role (and of course access to the API endpoints via apiPermission
role type) could only access those compute resources.
The roles
are then assigned to a user
. You can assign one or several roles regardless of the role's type. Of course you could also assign a user admin
privileges without specifying any roles.
The Tag Management API allows you to manage your tags in order to organize your resources in a more convenient way. Simply assign a tag to resources like a compute resource to manage them.The assignments of tags to resources will also enable you to control access to these specific resources to users via the User Management API. For convenience reasons you might choose a color for tag. The Customer Control Panel will use that color to display the tags.
The Contabo API supports HTTP requests like mentioned below. Not every endpoint supports all methods. The allowed methods are listed within this documentation.
Method | Description |
---|---|
GET | To retrieve information about a resource, use the GET method. The data is returned as a JSON object. GET methods are read-only and do not affect any resources. |
POST | Issue a POST method to create a new object. Include all needed attributes in the request body encoded as JSON. |
PATCH | Some resources support partial modification with PATCH, which modifies specific attributes without updating the entire object representation. |
PUT | Use the PUT method to update information about a resource. PUT will set new values on the item without regard to their current values. |
DELETE | Use the DELETE method to destroy a resource in your account. If it is not found, the operation will return a 4xx error and an appropriate message. |
Usually the Contabo API should respond to your requests. The data returned is in JSON format allowing easy processing in any programming language or tools.
As common for HTTP requests you will get back a so called HTTP status code. This gives you overall information about success or error. The following table lists common HTTP status codes.
Please note that the description of the endpoints and methods are not listing all possibly status codes in detail as they are generic. Only special return codes with their resp. response data are explicitly listed.
Response Code | Description |
---|---|
200 | The response contains your requested information. |
201 | Your request was accepted. The resource was created. |
204 | Your request succeeded, there is no additional information returned. |
400 | Your request was malformed. |
401 | You did not supply valid authentication credentials. |
402 | Request refused as it requires additional payed service. |
403 | You are not allowed to perform the request. |
404 | No results were found for your request or resource does not exist. |
409 | Conflict with resources. For example violation of unique data constraints detected when trying to create or change resources. |
429 | Rate-limit reached. Please wait for some time before doing more requests. |
500 | We were unable to perform the request due to server-side problems. In such cases please retry or contact the support. |
Not every endpoint returns data. For example DELETE requests usually don't return any data. All others do return data. For easy handling the return values consists of metadata denoted with and underscore ("_") like _links
or _pagination
. The actual data is returned in a field called data
. For convenience reasons this data
field is always returned as an array even if it consists of only one single element.
Some general details about Contabo API from Contabo.
The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping)
as well as managing snapshots and custom images. It also supports cloud-init at least on our default images
(for custom images you'll need to provide cloud-init support packages). The API offers providing cloud-init scripts via the user_data
field.
Custom images must be provided in .qcow2 or .iso format.
List and filter all instances in your account
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
name | string Example: name=vmd12345 The name of the instance |
displayName | string Example: displayName=myTestInstance The display name of the instance |
dataCenter | string Example: dataCenter=European Union (Germany) 1 The data center of the instance |
region | string Example: region=EU The Region of the instance |
instanceId | integer <int64> Deprecated Example: instanceId=100 The identifier of the instance (deprecated) |
instanceIds | string Example: instanceIds=100, 101, 102 Comma separated instances identifiers |
status | string Enum: "provisioning" "uninstalled" "running" "stopped" "error" "installing" "unknown" "manual_provisioning" "product_not_available" "verification_required" "rescue" "pending_payment" "other" Example: status=provisioning,installing The status of the instance |
addOnIds | string Example: addOnIds=1044,827 Identifiers of Addons the instances have |
productTypes | string Example: productTypes=ssd, hdd, nvme Comma separated instance's category depending on Product Id |
ipConfig | boolean Example: ipConfig=true Filter instances that have an ip config |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/compute/instances' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H 'x-trace-id: 123213'
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
- "additionalIps": [
- {
- "v4": {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}
}
], - "name": "vmd12345",
- "displayName": "VPS",
- "instanceId": 100,
- "dataCenter": "European Union (Germany) 1",
- "region": "EU",
- "regionName": "European Union (Germany)",
- "productId": "V5",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "ipConfig": {
- "v4": {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}, - "v6": {
- "ip": "1:2:3:4:5:6:7:8",
- "netmaskCidr": 64,
- "gateway": "1:2:3:4:5:6:7:8"
}
}, - "macAddress": "F2:65:50:F3:63:A1",
- "ramMb": "1024",
- "cpuCores": 4,
- "osType": "Linux",
- "diskMb": 2048,
- "sshKeys": [
- 123,
- 125
], - "createdDate": "2021-06-03T06:27:12.000Z",
- "cancelDate": "2021-06-03",
- "status": "provisioning",
- "vHostId": 73395,
- "vHostNumber": 1001,
- "vHostName": "m1000",
- "addOns": [
- {
- "id": 1431,
- "quantity": 4
}
], - "errorMessage": "string",
- "productType": "ssd",
- "productName": "VPS M",
- "defaultUser": "root"
}
], - "_links": {
- "first": "/v1/compute/instances?page=1",
- "previous": "/v1/compute/instances?page=19",
- "self": "/v1/compute/instances?page=20",
- "next": "/v1/compute/instances?page=21",
- "last": "/v1/compute/instances?page=101"
}
}
Create a new instance for your account with the provided parameters.
ProductId | Product | Disk Size |
---|---|---|
V45 | VPS 1 SSD | 400 GB SSD |
V47 | VPS 1 Storage | 800 GB SSD |
V46 | VPS 1 NVMe | 100 GB NVMe |
V48 | VPS 2 SSD | 400 GB SSD |
V50 | VPS 2 Storage | 800 GB SSD |
V49 | VPS 2 NVMe | 200 GB NVMe |
V51 | VPS 3 SSD | 1200 GB SSD |
V53 | VPS 3 Storage | 2400 GB SSD |
V52 | VPS 3 NVMe | 300 GB NVMe |
V54 | VPS 4 SSD | 1600 GB SSD |
V56 | VPS 4 Storage | 3200 GB SSD |
V55 | VPS 4 NVMe | 400 GB NVMe |
V57 | VPS 5 SSD | 2000 GB SSD |
V59 | VPS 5 Storage | 4000 GB SSD |
V58 | VPS 5 NVMe | 500 GB NVMe |
V60 | VPS 6 SSD | 2400 GB SSD |
V62 | VPS 6 Storage | 4800 GB SSD |
V61 | VPS 6 NVMe | 600 GB NVMe |
V8 | VDS S | 180 GB NVMe |
V9 | VDS M | 240 GB NVMe |
V10 | VDS L | 360 GB NVMe |
V11 | VDS XL | 480 GB NVMe |
V16 | VDS XXL | 720 GB NVMe |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
imageId | string Default: "afecbb85-e2fc-46f0-9684-b46b1faf00bb" ImageId to be used to setup the compute instance. Default is Ubuntu 22.04 |
productId | string non-empty Default: "V45" Default is V45 |
region | string non-empty Default: "EU" Enum: "EU" "US-central" "US-east" "US-west" "SIN" "UK" "AUS" "JPN" Instance Region where the compute instance should be located. Default is EU |
sshKeys | Array of integers <int64> [ items <int64 > ] Array of |
rootPassword | integer <int64>
|
userData | string Cloud-Init Config in order to customize during start of compute instance. |
license | string Enum: "cPanel5" "cPanel30" "cPanel50" "cPanel100" "cPanel150" "cPanel200" "cPanel250" "cPanel300" "cPanel350" "cPanel400" "cPanel450" "cPanel500" "cPanel550" "cPanel600" "cPanel650" "cPanel700" "cPanel750" "cPanel800" "cPanel850" "cPanel900" "cPanel950" "cPanel1000" "PleskAdmin" "PleskHost" "PleskPro" Additional licence in order to enhance your chosen product, mainly needed for software licenses on your product (not needed for windows). |
period required | integer <int64> Default: 1 Initial contract period in months. Available periods are: 1, 3, 6 and 12 months. Default to 1 month |
displayName | string <= 255 characters The display name of the instance |
defaultUser | string Default: "admin" Enum: "root" "admin" "administrator" Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are |
object Set attributes in the addons object for the corresponding ones that need to be added to the instance | |
applicationId | string Application ID |
{- "imageId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
- "productId": "V45",
- "region": "EU",
- "sshKeys": "[123, 125]",
- "rootPassword": 1,
- "userData": "#cloud-config\nuser: admin\ntimezone: Europe/Berlin\nchpasswd:\n expire: False",
- "license": "PleskHost",
- "period": 6,
- "displayName": "VPS",
- "defaultUser": "root",
- "addOns": {
- "privateNetworking": { },
- "additionalIps": { },
- "extraStorage": { },
- "customImage": { }
}, - "applicationId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "createdDate": "2021-06-02T12:32:03.363Z",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "productId": "V45",
- "region": "EU",
- "addOns": [
- {
- "id": 1431,
- "quantity": 4
}
], - "osType": "Linux",
- "status": "provisioning",
- "sshKeys": [
- 123,
- 125
]
}
], - "_links": {
- "self": "/v1/compute/instances/12345"
}
}
Get attributes values to a specific instance on your account.
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/compute/instances/12345' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
- "additionalIps": [
- {
- "v4": {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}
}
], - "name": "vmd12345",
- "displayName": "VPS",
- "instanceId": 100,
- "dataCenter": "European Union (Germany) 1",
- "region": "EU",
- "regionName": "European Union (Germany)",
- "productId": "V5",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "ipConfig": {
- "v4": {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}, - "v6": {
- "ip": "1:2:3:4:5:6:7:8",
- "netmaskCidr": 64,
- "gateway": "1:2:3:4:5:6:7:8"
}
}, - "macAddress": "F2:65:50:F3:63:A1",
- "ramMb": "1024",
- "cpuCores": 4,
- "osType": "Linux",
- "diskMb": 2048,
- "sshKeys": [
- 123,
- 125
], - "createdDate": "2021-06-03T06:27:12.000Z",
- "cancelDate": "2021-06-03",
- "status": "provisioning",
- "vHostId": 73395,
- "vHostNumber": 1001,
- "vHostName": "m1000",
- "addOns": [
- {
- "id": 1431,
- "quantity": 4
}
], - "errorMessage": "string",
- "productType": "ssd",
- "productName": "VPS M",
- "defaultUser": "root"
}
], - "_links": {
- "self": "/v1/compute/instances/100"
}
}
Update specific instance by instanceId.
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
displayName | string <= 255 characters The display name of the instance |
{- "displayName": "VPS"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "createdDate": "2021-06-02T12:32:03.363Z"
}
], - "_links": {
- "self": "/v1/compute/instances/12345"
}
}
You can reinstall a specific instance with a new image and optionally add ssh keys, a root password or cloud-init.
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
imageId required | string ImageId to be used to setup the compute instance. |
sshKeys | Array of integers <int64> [ items <int64 > ] Array of |
rootPassword | integer <int64>
|
userData | string Cloud-Init Config in order to customize during start of compute instance. |
defaultUser | string Default: "admin" Enum: "root" "admin" "administrator" Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are |
applicationId | string Application ID |
{- "imageId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
- "sshKeys": "[123, 125]",
- "rootPassword": 1,
- "userData": "#cloud-config\nuser: admin\ntimezone: Europe/Berlin\nchpasswd:\n expire: False",
- "defaultUser": "root",
- "applicationId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "createdDate": "2021-06-02T12:32:03.363Z"
}
], - "_links": {
- "self": "/v1/compute/instances/12345"
}
}
Your are free to cancel a previously created instance at any time.
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST 'https://api.contabo.com/v1/compute/instances/12345/cancel' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "cancelDate": "2021-06-03"
}
], - "_links": {
- "self": "/v1/compute/instances/12345"
}
}
In order to enhance your instance with additional features you can purchase add-ons. Currently only firewalling and private network addon is allowed.
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
privateNetworking | object Set this attribute if you want to upgrade your instance with the Private Networking addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. |
{- "privateNetworking": { }
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "createdDate": "2021-06-02T12:32:03.363Z"
}
], - "_links": {
- "self": "/v1/compute/instances/12345"
}
}
The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping)
as well as managing snapshots and custom images. It also supports cloud-init at least on our default images
(for custom images you'll need to provide cloud-init support packages). The API offers providing cloud-init scripts via the user_data
field.
Custom images must be provided in .qcow2 or .iso format.
List and filters the history about your custom images.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
instanceId | integer <int64> Example: instanceId=12345 The identifier of the instances. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 changedBy of the user which led to the change. |
startDate | string <date> Example: startDate=2021-06-02 Start of search time range. |
endDate | string <date> Example: endDate=2021-06-02 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "id": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "c4c800ff-e524-47dd-9543-71dfc8b91113",
- "username": "John.Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "instanceId": 12345,
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/compute/instances/audits?page=2",
- "previous": "/v1/compute/instances/audits?page=2",
- "next": "/v1/compute/instances/audits?page=3",
- "last": "/v1/compute/instances/audits?page=10",
- "self": "/v1/compute/instances/audits"
}
}
The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping)
as well as managing snapshots and custom images. It also supports cloud-init at least on our default images
(for custom images you'll need to provide cloud-init support packages). The API offers providing cloud-init scripts via the user_data
field.
Custom images must be provided in .qcow2 or .iso format.
Starting a compute instance / resource is like powering on a real server. If the compute instance / resource is already started nothing will happen. You may check the current status anytime when getting information about a compute instance / resource.
instanceId required | integer <int64> Example: 12345 The identifier of the compute instance / resource to be started in rescue mode. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/start"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "action": "start"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/actions/start"
}
}
List of your custom images history, with the ability to apply filters.
instanceId required | integer <int64> Example: 12345 The identifier of the compute instance / resource to be started in rescue mode. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/restart"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "action": "start"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/actions/restart"
}
}
Stopping a compute instance / resource is like powering off a real server. So please be aware that data may be lost. Alternatively you may log in and shut your compute instance / resource gracefully via the operating system. If the compute instance / resource is already stopped nothing will happen. You may check the current status anytime when getting information about a compute instance / resource.
instanceId required | integer <int64> Example: 12345 The identifier of the compute instance / resource to be started in rescue mode. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/stop"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "action": "start"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/actions/stop"
}
}
Shutdown an compute instance / resource. This is similar to pressing the power button on a physical machine. This will send an ACPI event for the guest OS, which should then proceed to a clean shutdown.
instanceId required | integer <int64> Example: 12345 The identifier of the compute instance / resource to be started in rescue mode. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/1234/actions/shutdown"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "action": "start"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/actions/shutdown"
}
}
You can reboot your instance in rescue mode to resolve system issues. Rescue system is Linux based and its booted instead of your regular operating system. The disk containing your operating sytstem, software and your data is already mounted for you to access and repair/modify files. After a reboot your compute instance will boot your operating system. Please note that this is for advanced users.
instanceId required | integer <int64> Example: 12345 The identifier of the compute instance / resource to be started in rescue mode. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
rootPassword | integer <int64>
|
sshKeys | Array of integers <int64> [ items <int64 > ] Array of |
userData | string Cloud-Init Config in order to customize during start of compute instance. |
{- "rootPassword": 1,
- "sshKeys": "[123, 125]",
- "userData": "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\nssh_authorized_keys:\n - <sshkey>\nchpasswd:\n list:\n - root:<password> \n expire: False\n"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "action": "start"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/actions/rescue"
}
}
Reset password for a compute instance / resource referenced by an id. This will reset the current password to the password that you provided in the body of this request.
instanceId required | integer <int64> Example: 12345 The identifier of the compute instance / resource to be started in rescue mode. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
sshKeys | Array of integers <int64> [ items <int64 > ] Array of |
rootPassword | integer <int64>
|
userData | string Cloud-Init Config in order to customize during start of compute instance. |
{- "sshKeys": "[123, 125]",
- "rootPassword": 1,
- "userData": "#cloud-config\nuser: root\nssh_pwauth: true\ndisable_root: false\nssh_authorized_keys:\n - <sshkey>\nchpasswd:\n list:\n - root:<password> \n expire: False\n"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "instanceId": 12345,
- "action": "start"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/actions/resetPassword"
}
}
The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping)
as well as managing snapshots and custom images. It also supports cloud-init at least on our default images
(for custom images you'll need to provide cloud-init support packages). The API offers providing cloud-init scripts via the user_data
field.
Custom images must be provided in .qcow2 or .iso format.
List and filters the history about your actions your triggered via the API.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
instanceId | integer <int64> Example: instanceId=12345 The identifier of the instancesActions. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 changedBy of the user which led to the change. |
startDate | string <date> Example: startDate=2021-06-02 Start of search time range. |
endDate | string <date> Example: endDate=2021-06-02 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/instances/actions/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "id": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "c4c800ff-e524-47dd-9543-71dfc8b91113",
- "username": "John.Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "instanceId": 12345,
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/compute/instances/actions/audits?page=2",
- "previous": "/v1/compute/instances/actions/audits?page=2",
- "next": "/v1/compute/instances/actions/audits?page=3",
- "last": "/v1/compute/instances/actions/audits?page=10",
- "self": "/v1/compute/instances/actions/audits"
}
}
List and filter all your snapshots for a specific instance
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
name | string Example: name=Snapshot.Server Filter as substring match for snapshots names. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/compute/instances/12345/snapshots' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
- "snapshotId": "snap1628603855",
- "name": "Snapshot-Server",
- "description": "Snapshot-Description",
- "instanceId": 1234,
- "createdDate": "2021-06-02T12:32:03.363Z",
- "autoDeleteDate": "2021-07-02T12:32:03.363Z",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "imageName": "ubuntu-18.04"
}
], - "_links": {
- "first": "/v1/compute/instances/12345/snapshots?page=1",
- "next": "/v1/compute/instances/12345/snapshots?page=19",
- "self": "/v1/compute/instances/12345/snapshots/snap1628603855",
- "previous": "/v1/compute/instances/12345/snapshots?page=21",
- "last": "/v1/compute/instances/12345/snapshots?page=101"
}
}
Create a new snapshot for instance, with name and description attributes
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name required | string [ 1 .. 255 ] characters The name of the snapshot. It may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per snapshot. |
description | string [ 1 .. 255 ] characters The description of the snapshot. There is a limit of 255 characters per snapshot. |
{- "name": "Snapshot-Server",
- "description": "Snapshot-Description"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
- "snapshotId": "snap1628603855",
- "name": "Snapshot-Server",
- "description": "Snapshot-Description",
- "instanceId": 1234,
- "createdDate": "2021-06-02T12:32:03.363Z",
- "autoDeleteDate": "2021-07-02T12:32:03.363Z",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "imageName": "ubuntu-18.04"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/snapshots/snap1628603855"
}
}
Get all attributes for a specific snapshot
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
snapshotId required | string Example: snap1628603855 The identifier of the snapshot |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
- "snapshotId": "snap1628603855",
- "name": "Snapshot-Server",
- "description": "Snapshot-Description",
- "instanceId": 1234,
- "createdDate": "2021-06-02T12:32:03.363Z",
- "autoDeleteDate": "2021-07-02T12:32:03.363Z",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "imageName": "ubuntu-18.04"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/snapshots/snap1628603855"
}
}
Update attributes of a snapshot. You may only specify the attributes you want to change. If an attribute is not set, it will retain its original value.
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
snapshotId required | string Example: snap1628603855 The identifier of the snapshot |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name | string [ 1 .. 255 ] characters The name of the snapshot. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per snapshot. |
description | string [ 1 .. 255 ] characters The description of the snapshot. There is a limit of 255 characters per snapshot. |
{- "name": "Snapshot-Server",
- "description": "Snapshot-Description"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
- "snapshotId": "snap1628603855",
- "name": "Snapshot-Server",
- "description": "Snapshot-Description",
- "instanceId": 1234,
- "createdDate": "2021-06-02T12:32:03.363Z",
- "autoDeleteDate": "2021-07-02T12:32:03.363Z",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "imageName": "ubuntu-18.04"
}
], - "_links": {
- "self": "/v1/compute/instances/12345/snapshots/snap1628603855"
}
}
Delete existing instance snapshot by id
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
snapshotId required | string Example: snap1628603855 The identifier of the snapshot |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE 'https://api.contabo.com/v1/compute/instances/12345/snapshots/snap1628603855' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
Rollback instance to a specific snapshot. The snapshot must be the latest one in order to be able to restore it, otherwise you will receive an error informing you that the snapshot is not the latest
instanceId required | integer <int64> Example: 12345 The identifier of the instance |
snapshotId required | string Example: snap1628603855 The identifier of the snapshot |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
{ }
{- "_links": {
- "self": "/v1/compute/instances/12345/snapshots/snap1628603855"
}
}
List and filters the history about your snapshots your triggered via the API.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
instanceId | integer <int64> Example: instanceId=12345 The identifier of the instance |
snapshotId | string Example: snapshotId=snap1628603855 The identifier of the snapshot |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 changedBy of the user which led to the change |
startDate | string <date> Example: startDate=2021-06-02 Start of search time range. |
endDate | string <date> Example: endDate=2021-06-02 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/snapshots/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "id": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "c4c800ff-e524-47dd-9543-71dfc8b91113",
- "username": "John.Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "instanceId": 12345,
- "snapshotId": "snap1628603855",
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/compute/snapshots/audits?page=2",
- "previous": "/v1/compute/snapshots/audits?page=2",
- "next": "/v1/compute/snapshots/audits?page=3",
- "last": "/v1/compute/snapshots/audits?page=10",
- "self": "/v1/compute/snapshots/audits"
}
}
The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping)
as well as managing snapshots and custom images. It also supports cloud-init at least on our default images
(for custom images you'll need to provide cloud-init support packages). The API offers providing cloud-init scripts via the user_data
field.
Custom images must be provided in .qcow2 or .iso format.
List and filter all available standard images provided by Contabo and your uploaded custom images.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
name | string Example: name=Ubuntu The name of the image |
standardImage | boolean Example: standardImage=true Flag indicating that image is either a standard (true) or a custom image (false) |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/compute/images' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "tenantId": "DE",
- "customerId": "12345",
- "name": "Custom Image Ubuntu",
- "description": "Ubuntu Server 20.04.2 LTS",
- "sizeMb": 1024,
- "uploadedSizeMb": 1024,
- "osType": "Linux",
- "version": "20.04.2",
- "format": "iso",
- "status": "Pending",
- "errorMessage": "Error downloading image from provided URL",
- "standardImage": true,
- "creationDate": "2021-06-03T06:27:12.000Z",
- "lastModifiedDate": "2021-06-04T06:27:12.000Z",
- "tags": [
- {
- "tagId": 12345,
- "tagName": "Web-Server"
}
]
}
], - "_links": {
- "first": "/v1/compute/images?page=1",
- "previous": "/v1/compute/images?page=19",
- "self": "/v1/compute/images?page=20",
- "next": "/v1/compute/images?page=21",
- "last": "/v1/compute/images?page=101"
}
}
In order to provide a custom image please specify an URL from where the image can be directly downloaded. A custom image must be in either .iso
or .qcow2
format. Other formats will be rejected. Please note that downloading can take a while depending on network speed resp. bandwidth and size of image. You can check the status by retrieving information about the image via a GET request. Download will be rejected if you have exceeded your limits.
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name required | string Image Name |
description | string Image Description |
url required | string URL from where the image has been downloaded / provided. |
osType required | string Enum: "Windows" "Linux" Provided type of operating system (OS). Please specify |
version required | string Version number to distinguish the contents of an image. Could be the version of the operating system for example. |
{- "name": "Ubuntu Custom Image",
- "description": "Ubuntu Server 20.04.2 LTS",
- "osType": "Linux",
- "version": "20.04.2"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
], - "_links": {
- "self": "/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
}
Get details about a specific image. This could be either a standard or custom image. In case of an custom image you can also check the download status
imageId required | string Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d The identifier of the image |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "tenantId": "DE",
- "customerId": "12345",
- "name": "Custom Image Ubuntu",
- "description": "Ubuntu Server 20.04.2 LTS",
- "sizeMb": 1024,
- "uploadedSizeMb": 1024,
- "osType": "Linux",
- "version": "20.04.2",
- "format": "iso",
- "status": "Pending",
- "errorMessage": "Error downloading image from provided URL",
- "standardImage": true,
- "creationDate": "2021-06-03T06:27:12.000Z",
- "lastModifiedDate": "2021-06-04T06:27:12.000Z"
}
], - "_links": {
- "self": "/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
}
Update name of the custom image
imageId required | string Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d The identifier of the image |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name | string Image Name |
description | string Image Description |
{- "name": "Ubuntu Custom Image",
- "description": "Ubuntu 20.04 image"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "imageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
], - "_links": {
- "self": "/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
}
Your are free to delete a previously uploaded custom images at any time
imageId required | string Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d The identifier of the image |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE 'https://api.contabo.com/v1/compute/images/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
List statistics regarding the customer's custom images such as the number of custom images uploaded, used disk space, free available disk space and total available disk space
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/compute/images/stats' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "currentImagesCount": 4,
- "totalSizeMb": 102400,
- "usedSizeMb": 55000,
- "freeSizeMb": 47400
}
], - "_links": {
- "self": "/v1/compute/images/stats"
}
}
The Compute Management API allows you to manage compute resources (e.g. creation, deletion, starting, stopping)
as well as managing snapshots and custom images. It also supports cloud-init at least on our default images
(for custom images you'll need to provide cloud-init support packages). The API offers providing cloud-init scripts via the user_data
field.
Custom images must be provided in .qcow2 or .iso format.
List and filters the history about your custom images.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
imageId | string Example: imageId=e443eab5-647a-4bc3-b4f9-16f5a281224d The identifier of the image. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 UserId of the user which led to the change. |
startDate | string <date> Example: startDate=2021-06-02 Start of search time range. |
endDate | string <date> Example: endDate=2021-06-02 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/compute/images/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "id": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "c4c800ff-e524-47dd-9543-71dfc8b91113",
- "username": "John.Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "imageId": "e443eab5-647a-4bc3-b4f9-16f5a281224d",
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/compute/images/audits?page=2",
- "previous": "/v1/compute/images/audits?page=2",
- "next": "/v1/compute/images/audits?page=3",
- "last": "/v1/compute/images/audits?page=10",
- "self": "/v1/compute/images/audits"
}
}
Manage S3 compatible Object Storage. With the Object Storage API you can create Object Storage in different locations. Please note that you can only have one Object Storage per location. Furthermore you can increase the amount of storage space and control the autoscaling feature which allows to automatically perform a monthly upgrade of the disk space to the specified maximum. You might also inspect the usage. This API is not the S3 API itself. For accessing the S3 API directly or with S3 compatible tools like aws
cli after and after having created / upgraded your Object Storage please use the S3 URL from this Storage API and refer to the User Mangement API to retrieve the S3 credentials.
List and filter all object storages in your account
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
dataCenterName | string non-empty Example: dataCenterName=European Union (Germany) 2 Filter for Object Storage locations. |
s3TenantId | string Example: s3TenantId=2cd2e5e1444a41b0bed16c6410ecaa84 Filter for Object Storage S3 tenantId. |
region | string Example: region=EU Filter for Object Storage by regions. Available regions: EU, US-central, SIN |
displayName | string Example: displayName=MyObjectStorage Filter for Object Storage by display name. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "objectStorageId": "b943b25a-c8b5-4570-9135-4bbaa7615b81",
- "createdDate": "2021-06-02T12:32:03.363Z",
- "cancelDate": "2021-06-02",
- "autoScaling": {
- "state": "enabled",
- "sizeLimitTB": 1,
- "errorMessage": "string"
}, - "dataCenter": "EU",
- "totalPurchasedSpaceTB": 6.25,
- "s3Url": "eu1-s3.contabo.com",
- "s3TenantId": "2cd2e5e1444a41b0bed16c6410ecaa84",
- "status": "READY",
- "region": "European Union (Germany)",
- "displayName": "Object storage 1"
}
], - "_links": {
- "first": "/v1/object-storages?size=10",
- "previous": "/v1/object-storages?page=1&size=10",
- "next": "/v1/object-storages?page=3&size=10",
- "last": "/v1/object-storages?page=5&size=10",
- "self": "/v1/object-storages"
}
}
Create / purchase a new object storage in your account. Please note that you can only buy one object storage per location. You can actually increase the object storage space via POST
to /v1/object-storages/{objectStorageId}/resize
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
region required | string non-empty Default: "EU" Region where the object storage should be located. Default is EU. Available regions: EU, US-central, SIN |
object Autoscaling settings | |
totalPurchasedSpaceTB required | number <double> Default: "0.25" Amount of purchased / requested object storage in TB. |
displayName | string [ 1 .. 255 ] characters Display name helps to differentiate between object storages, especially if they are in the same region. If display name is not provided, it will be generated. Display name can be changed any time. |
{- "region": "EU",
- "autoScaling": {
- "state": "enabled",
- "sizeLimitTB": 1
}, - "totalPurchasedSpaceTB": 6,
- "displayName": "Object storage 1"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "objectStorageId": "b943b25a-c8b5-4570-9135-4bbaa7615b81",
- "createdDate": "2021-06-02T12:32:03.363Z",
- "cancelDate": "2021-06-02",
- "autoScaling": {
- "state": "enabled",
- "sizeLimitTB": 1,
- "errorMessage": "string"
}, - "dataCenter": "EU",
- "totalPurchasedSpaceTB": 6.25,
- "usedSpaceTB": 4,
- "usedSpacePercentage": "100",
- "s3Url": "eu1-s3.contabo.com",
- "s3TenantId": "2cd2e5e1444a41b0bed16c6410ecaa84",
- "status": "READY",
- "region": "European Union (Germany)",
- "displayName": "Object storage 1"
}
], - "_links": {
- "self": "/v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860"
}
}
List all data centers and their corresponding regions.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
slug | string non-empty Example: slug=EU1 Filter as match for data centers. |
name | string non-empty Example: name=European Union (Germany) 1 Filter for Object Storages regions. |
regionName | string non-empty Example: regionName=European Union (Germany) Filter for Object Storage region names. |
regionSlug | string non-empty Example: regionSlug=EU Filter for Object Storage region slugs. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/data-centers"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "name": "European Union (Germany) 1",
- "slug": "EU1",
- "capabilities": [
- "VPS",
- "Object-Storage"
], - "s3Url": "eu1-s3.contabo.com",
- "regionName": "European Union (Germany)",
- "regionSlug": "EU",
- "tenantId": "DE",
- "customerId": "54321"
}
], - "_links": {
- "first": "/v1/data-centers?page=1",
- "previous": "/v1/data-centers?page=19",
- "self": "/v1/data-centers/12345",
- "next": "/v1/data-centers?page=21",
- "last": "/v1/data-centers?page=101"
}
}
Get data for a specific object storage on your account.
objectStorageId required | string Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 The identifier of the object storage. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "objectStorageId": "b943b25a-c8b5-4570-9135-4bbaa7615b81",
- "createdDate": "2021-06-02T12:32:03.363Z",
- "cancelDate": "2021-06-02",
- "autoScaling": {
- "state": "enabled",
- "sizeLimitTB": 1,
- "errorMessage": "string"
}, - "dataCenter": "EU",
- "totalPurchasedSpaceTB": 6.25,
- "s3Url": "eu1-s3.contabo.com",
- "s3TenantId": "2cd2e5e1444a41b0bed16c6410ecaa84",
- "status": "READY",
- "region": "European Union (Germany)",
- "displayName": "Object storage 1"
}
], - "_links": {
- "self": "/v1/object-storages/8cd3f2ba-65a7-4279-bb54-0fea88dc8860"
}
}
Modifies the display name of object storage. Display name must be unique.
objectStorageId required | string Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 The identifier of the object storage. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
displayName required | string [ 1 .. 255 ] characters Display name helps to differentiate between object storages, especially if they are in the same region. |
{- "displayName": "Object storage 1"
}
{- "_links": {
- "self": "/v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "objectStorageId": "string",
- "cancelDate": "2021-06-02",
- "displayName": "Object storage 1"
}
]
}
Upgrade object storage size. You can also adjust the autoscaling settings for your object storage. Autoscaling allows you to automatically purchase storage capacity on a monthly basis up to the specified limit.
objectStorageId required | string Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 The identifier of the object storage. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
object New monthly object storage size limit for autoscaling if enabled. | |
totalPurchasedSpaceTB | number <double> New total object storage limit. If this number is larger than before you will also be billed for the added storage space. No downgrade possible. |
{- "autoScaling": {
- "state": "enabled",
- "sizeLimitTB": 6
}, - "totalPurchasedSpaceTB": 8
}
{- "_links": {
- "self": "/v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "objectStorageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- "createdDate": "2021-06-02T12:32:03.363Z",
- "dataCenter": "EU",
- "autoScaling": {
- "state": "enabled",
- "sizeLimitTB": 1,
- "errorMessage": "string"
}, - "s3Url": "eu1-s3.contabo.com",
- "status": "READY",
- "totalPurchasedSpaceTB": 6,
- "region": "European Union (Germany)",
- "displayName": "Object storage 1"
}
]
}
List usage statistics about the specified object storage such as the number of objects uploaded / created, used object storage space. Please note that the usage statistics are updated regularly and are not live usage statistics.
objectStorageId required | string Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 The identifier of the object storage. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc/stats' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "usedSpaceTB": 4,
- "usedSpacePercentage": "100",
- "numberOfObjects": 2
}
], - "_links": {
- "self": "/v1/object-storages/stats/8cd3f2ba-65a7-4279-bb54-0fea88dc8860"
}
}
Cancels the specified object storage at the next possible date. Please be aware of your contract periods.
objectStorageId required | string Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640 The identifier of the object storage. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X PATCH -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/ea639fc6-9aae-4d71-af8b-046dda87a9cc/cancel"
{- "_links": {
- "self": "/v1/object-storages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "objectStorageId": "string",
- "cancelDate": "2021-06-02",
- "displayName": "Object storage 1"
}
]
}
Manage S3 compatible Object Storage. With the Object Storage API you can create Object Storage in different locations. Please note that you can only have one Object Storage per location. Furthermore you can increase the amount of storage space and control the autoscaling feature which allows to automatically perform a monthly upgrade of the disk space to the specified maximum. You might also inspect the usage. This API is not the S3 API itself. For accessing the S3 API directly or with S3 compatible tools like aws
cli after and after having created / upgraded your Object Storage please use the S3 URL from this Storage API and refer to the User Mangement API to retrieve the S3 credentials.
List and filters the history about your object storages.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
objectStorageId | string Example: objectStorageId=6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the object storage. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 changedBy of the user which led to the change. |
startDate | string <date> Example: startDate=2021-01-01 Start of search time range. |
endDate | string <date> Example: endDate=2021-01-01 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/object-storages/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "id": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "54321",
- "username": "John.Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "objectStorageId": "6cdf5968-f9fe-4192-97c2-f349e813c5e8",
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/object-storages/audits?page=2",
- "previous": "/v1/object-storages/audits?page=2",
- "next": "/v1/object-storages/audits?page=3",
- "last": "/v1/object-storages/audits?page=10",
- "self": "/v1/object-storages/audits"
}
}
Private Networking API allows you to create and manage Private Networks / Virtual Private Vloud (VPC) for your instances (Cloud VPS/VDS). Private Network / VPC allows private and direct communication between instances using private IPs. Traffic doesn't leave a Data Center. This feature requires a payed add-on for each instance being part of a Private Network. Instance can be part of multiple Private Networks.
List and filter all Private Networks in your account
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
name | string Example: name=myPrivateNetwork The name of the Private Network |
instanceIds | string Example: instanceIds=100, 101, 102 Comma separated instances identifiers |
region | string Example: region=EU The slug of the region where your Private Network is located |
dataCenter | string Example: dataCenter=European Union (Germany) 1 The data center where your Private Network is located |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/private-networks"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "privateNetworkId": 12345,
- "dataCenter": "European Union (Germany) 1",
- "region": "EU",
- "regionName": "European Union (Germany)",
- "name": "myPrivateNetwork",
- "description": "myPrivateNetwork Description",
- "cidr": "10.0.0.0/22",
- "availableIps": 1022,
- "createdDate": "2021-06-03T06:27:12.000Z",
- "instances": [
- {
- "instanceId": 100,
- "displayName": "Instance",
- "name": "vmd12345",
- "productId": "V1",
- "privateIpConfig": {
- "v4": [
- {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}
]
}, - "ipConfig": {
- "v4": {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}, - "v6": {
- "ip": "1:2:3:4:5:6:7:8",
- "netmaskCidr": 64,
- "gateway": "1:2:3:4:5:6:7:8"
}
}, - "status": "ok",
- "errorMessage": "string"
}
]
}
], - "_links": {
- "first": "/v1/private-networks?page=1",
- "previous": "/v1/private-networks?page=19",
- "self": "/v1/private-networks?page=20",
- "next": "/v1/private-networks?page=21",
- "last": "/v1/private-networks?page=101"
}
}
Create a new Private Network in your account.
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
region | string non-empty Default: "EU" Region where the Private Network should be located. Default is |
name required | string [ 1 .. 255 ] characters The name of the Private Network. It may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per Private Network name. |
description | string <= 255 characters The description of the Private Network. There is a limit of 255 characters per Private Network description. |
{- "region": "EU",
- "name": "myPrivateNetwork",
- "description": "myPrivateNetwork Description"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "privateNetworkId": 12345,
- "dataCenter": "European Union (Germany) 1",
- "region": "EU",
- "regionName": "European Union (Germany)",
- "name": "myPrivateNetwork",
- "description": "myPrivateNetwork Description",
- "cidr": "10.0.0.0/22",
- "availableIps": 1022,
- "createdDate": "2021-06-03T06:27:12.000Z",
- "instances": [
- {
- "instanceId": 100,
- "displayName": "Instance",
- "name": "vmd12345",
- "productId": "V1",
- "privateIpConfig": {
- "v4": [
- {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}
]
}, - "ipConfig": {
- "v4": {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}, - "v6": {
- "ip": "1:2:3:4:5:6:7:8",
- "netmaskCidr": 64,
- "gateway": "1:2:3:4:5:6:7:8"
}
}, - "status": "ok",
- "errorMessage": "string"
}
]
}
], - "_links": {
- "self": "/v1/private-networks/12345"
}
}
Update a Private Network by id in your account.
privateNetworkId required | integer <int64> Example: 12345 The identifier of the Private Network |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name | string [ 1 .. 255 ] characters The name of the Private Network. It may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per Private Network. |
description | string <= 255 characters The description of the Private Network. There is a limit of 255 characters per Private Network. |
{- "name": "myPrivateNetwork",
- "description": "myPrivateNetwork Description"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "privateNetworkId": 12345,
- "dataCenter": "European Union (Germany) 1",
- "region": "EU",
- "regionName": "European Union (Germany)",
- "name": "myPrivateNetwork",
- "description": "myPrivateNetwork Description",
- "cidr": "10.0.0.0/22",
- "availableIps": 1022,
- "createdDate": "2021-06-03T06:27:12.000Z",
- "instances": [
- {
- "instanceId": 100,
- "displayName": "Instance",
- "name": "vmd12345",
- "productId": "V1",
- "privateIpConfig": {
- "v4": [
- {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}
]
}, - "ipConfig": {
- "v4": {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}, - "v6": {
- "ip": "1:2:3:4:5:6:7:8",
- "netmaskCidr": 64,
- "gateway": "1:2:3:4:5:6:7:8"
}
}, - "status": "ok",
- "errorMessage": "string"
}
]
}
], - "_links": {
- "self": "/v1/private-networks/12345"
}
}
Get attributes values to a specific Private Network on your account.
privateNetworkId required | integer <int64> Example: 12345 The identifier of the Private Network |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: foo" "https://api.contabo.com/v1/private-networks/12345"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "privateNetworkId": 12345,
- "dataCenter": "European Union (Germany) 1",
- "region": "EU",
- "regionName": "European Union (Germany)",
- "name": "myPrivateNetwork",
- "description": "myPrivateNetwork Description",
- "cidr": "10.0.0.0/22",
- "availableIps": 1022,
- "createdDate": "2021-06-03T06:27:12.000Z",
- "instances": [
- {
- "instanceId": 100,
- "displayName": "Instance",
- "name": "vmd12345",
- "productId": "V1",
- "privateIpConfig": {
- "v4": [
- {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}
]
}, - "ipConfig": {
- "v4": {
- "ip": "192.168.0.1",
- "netmaskCidr": 19,
- "gateway": "1.1.1.1"
}, - "v6": {
- "ip": "1:2:3:4:5:6:7:8",
- "netmaskCidr": 64,
- "gateway": "1:2:3:4:5:6:7:8"
}
}, - "status": "ok",
- "errorMessage": "string"
}
]
}
], - "_links": {
- "self": "/v1/private-networks/12345"
}
}
Delete existing Virtual Private Cloud by id and automatically unassign all instances from it
privateNetworkId required | integer <int64> Example: 12345 The identifier of the Private Network |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: foo" "https://api.contabo.com/v1/private-networks/12345"
Add a specific instance to a Private Network
privateNetworkId required | integer <int64> Example: 12345 The identifier of the Private Network |
instanceId required | integer <int64> Example: 100 The identifier of the instance |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: foo" "https://api.contabo.com/v1/private-networks/12345/instances/100"
{- "_links": {
- "self": "/v1/private-networks/12345/instances/100",
- "virtualPrivateCloud": "/v1/private-networks/12345",
- "instance": "/v1/compute/instances/100"
}
}
Remove a specific instance from a Private Network
privateNetworkId required | integer <int64> Example: 100 The identifier of the Private Network |
instanceId required | integer <int64> Example: 100 The identifier of the instance |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: foo" "https://api.contabo.com/v1/private-networks/12345/instances/100"
{- "_links": {
- "self": "/v1/private-networks/12345/instances/100",
- "virtualPrivateCloud": "/v1/private-networks/12345",
- "instance": "/v1/compute/instances/100"
}
}
Private Networking API allows you to create and manage Private Networks / Virtual Private Vloud (VPC) for your instances (Cloud VPS/VDS). Private Network / VPC allows private and direct communication between instances using private IPs. Traffic doesn't leave a Data Center. This feature requires a payed add-on for each instance being part of a Private Network. Instance can be part of multiple Private Networks.
List and filters the history about your Private Networks.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
privateNetworkId | integer <int64> Example: privateNetworkId=12345 The identifier of the Private Network |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 User name which did the change. |
startDate | string <date> Example: startDate=2021-01-01 Start of search time range. |
endDate | string <date> Example: endDate=2023-05-31 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/private-networks/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "id": "12345",
- "privateNetworkId": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "54321",
- "username": "John Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/private-networks/audits?page=2",
- "previous": "/v1/private-networks/audits?page=2",
- "next": "/v1/private-networks/audits?page=3",
- "last": "/v1/private-networks/audits?page=10",
- "self": "/v1/private-networks/audits"
}
}
Tags are Customer-defined labels which can be attached to any resource in your account. Tag API represent simple CRUD functions and allow you to manage your tags. Use tags to group your resources. For example you can define some user group with tag and give them permission to create compute instances.
List and filter all tags in your account
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
name | string Example: name=web Filter as substring match for tag names. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "tagId": "12345",
- "name": "Web-Server",
- "color": "#0A78C3"
}
], - "_links": {
- "first": "/v1/tags?page=1",
- "previous": "/v1/tags?page=19",
- "self": "/v1/tags/12345",
- "next": "/v1/tags?page=21",
- "last": "/v1/tags?page=101"
}
}
Create a new tag in your account with attribute name and optional attribute color.
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name required | string [ 1 .. 255 ] characters The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. |
color required | string [ 4 .. 7 ] characters Default: "#0A78C3" The color of the tag. Color can be specified using hexadecimal value. Default color is #0A78C3 |
{- "name": "Web-Server",
- "color": "#0A78C3"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "tagId": 12345
}
], - "_links": {
- "self": "/v1/tags/12345"
}
}
Get attributes values to a specific tag on your account.
tagId required | integer <int64> Example: 12345 The identifier of the tag |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "tagId": "12345",
- "name": "Web-Server",
- "color": "#0A78C3"
}
], - "_links": {
- "self": "/v1/tags/12345"
}
}
Update attributes to your tag. Attributes are optional. If not set, the attributes will retain their original values.
tagId required | integer <int64> Example: 12345 The identifier of the tag |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name | string [ 1 .. 255 ] characters The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. |
color | string [ 4 .. 7 ] characters The color of the tag. Color can be specified using hexadecimal value. Default color is #0A78C3 |
{- "name": "Updated-Web-Server",
- "color": "#0A78C3"
}
{- "_links": {
- "self": "/v1/tags/12345"
}
}
Your tag can be deleted if it is not assigned to any resource on your account. Check tag assigments before deleting tag.
tagId required | integer <int64> Example: 12345 The identifier of the tag |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345"
Tags are Customer-defined labels which can be attached to any resource in your account. Tag API represent simple CRUD functions and allow you to manage your tags. Use tags to group your resources. For example you can define some user group with tag and give them permission to create compute instances.
List and filter all existing assignments for a tag in your account
tagId required | integer <int64> Example: 12345 The identifier of the tag. |
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
resourceType | string Example: resourceType=instance Filter as substring match for assignment resource type. Resource type is one of |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "tagId": "12345",
- "tagName": "Web-Server",
- "resourceType": "instance",
- "resourceId": "d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc",
- "resourceName": "Instance"
}
], - "_links": {
- "first": "/v1/tags/12345/assignments?page=1",
- "previous": "/v1/tags/12345/assignments?page=19",
- "self": "/v1/tags/12345/assignments/instance/23456",
- "next": "/v1/tags/12345/assignments?page=21",
- "last": "/v1/tags/12345/assignments?page=101"
}
}
Get attributes for a specific tag assignment in your account. For this the resource type and resource id is required.
tagId required | integer <int64> Example: 12345 The identifier of the tag. |
resourceType required | string Example: instance The identifier of the resource type. Resource type is one of |
resourceId required | string Example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc The identifier of the resource id |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "tagId": "12345",
- "tagName": "Web-Server",
- "resourceType": "instance",
- "resourceId": "d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc",
- "resourceName": "Instance"
}
], - "_links": {
- "self": "/v1/tags/12345/assignments/instance/23456",
- "tag": "/v1/tags/12345",
- "instance": "/v1/compute/instances/23456"
}
}
Create a new tag assignment. This marks the specified resource with the specified tag for organizing purposes or to restrict access to that resource.
tagId required | integer <int64> Example: 12345 The identifier of the tag. |
resourceType required | string Example: instance The identifier of the resource type. Resource type is one of |
resourceId required | string Example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc The identifier of the resource id |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc" -H "accept: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213"
{- "_links": {
- "self": "/v1/tags/12345/assignments/instance/6549",
- "tag": "/v1/tags/12345",
- "instance": "/v1/compute/instance/6549"
}
}
Tag assignment will be removed from the specified resource. If this tag is being used for access restrictions the affected users will no longer be able to access that resource.
tagId required | integer <int64> Example: 12345 The identifier of the tag. |
resourceType required | string Example: instance The identifier of the resource type. Resource type is one of |
resourceId required | string Example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc The identifier of the resource id |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc"
Tags are Customer-defined labels which can be attached to any resource in your account. Tag API represent simple CRUD functions and allow you to manage your tags. Use tags to group your resources. For example you can define some user group with tag and give them permission to create compute instances.
List and filters the history about your assignments.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
tagId | integer <int64> Example: tagId=12345 The identifier of the tag. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 UserId of the user which led to the change. |
startDate | string <date> Example: startDate=2021-01-01 Start of search time range. |
endDate | string <date> Example: endDate=2021-01-01 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" -H "x-trace-id: 123213" "https://api.contabo.com/v1/tags/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "id": "12345",
- "tagId": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "changedBy": "54321",
- "username": "John Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/tags/audits?page=1",
- "previous": "/v1/tags/audits?page=19",
- "self": "/v1/tags/audits?page=20",
- "next": "/v1/tags/audits?page=21",
- "last": "/v1/tags/audits?page=101"
}
}
Tags are Customer-defined labels which can be attached to any resource in your account. Tag API represent simple CRUD functions and allow you to manage your tags. Use tags to group your resources. For example you can define some user group with tag and give them permission to create compute instances.
List and filters the history about your assignments.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
tagId | integer <int64> Example: tagId=12345 The identifier of the tag. |
resourceId | string Example: resourceId=a1b2c3 The identifier of the resource. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 UserId of the user which led to the change. |
startDate | string <date> Example: startDate=2021-01-01 Start of search time range. |
endDate | string <date> Example: endDate=2021-01-01 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31" "https://api.contabo.com/v1/tags/assignments/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "id": "12345",
- "resourceId": "a1b2c3",
- "resourceType": "instance",
- "tagId": "12345",
- "action": "CREATED | DELETED",
- "timestamp": "2019-08-24T14:15:22Z",
- "changedBy": "54321",
- "username": "John Doe",
- "requestId": "04E0F898-37B4-48BC-A794-1A57ABE6AA31",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F5",
- "changes": { }
}
], - "_links": {
- "first": "/v1/tags/assignments/audits?page=1",
- "previous": "/v1/tags/assignments/audits?page=19",
- "self": "/v1/tags/assignments/audits?page=20",
- "next": "/v1/tags/assignments/audits?page=21",
- "last": "/v1/tags/assignments/audits?page=101"
}
}
Give access to all api endpoints and resources or manage to which endpoints and resources individual users might have access to. Permissions are organized in roles. Users can have roles assigned. Roles can grant and restrict access to different API's or to specific resources. Permissions for resources are declared by using tags which have been assigned to resources.
List and filter all your users.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
enabled | boolean Example: enabled=true Filter if user is enabled or not. |
owner | boolean Example: owner=true Filter if user is owner or not. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/users' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "userId": "6cdf5968-f9fe-4192-97c2-f349e813c5e8",
- "firstName": "John",
- "lastName": "Doe",
- "emailVerified": false,
- "enabled": false,
- "totp": false,
- "locale": "de",
- "roles": [
- {
- "roleId": "12345",
- "tenantId": "DE",
- "customerId": "54321",
- "name": "infrastructure",
- "admin": "true",
- "accessAllResources": "true",
- "type": "custom",
- "permissions": [
- {
- "apiName": "/v1/compute/instances",
- "actions": [
- "CREATE",
- "READ"
], - "resources": [
- {
- "tagId": "12345",
- "tagName": "Web"
}
]
}
]
}
], - "owner": false
}
], - "_links": {
- "first": "/v1/users?page=1",
- "next": "/v1/users?page=19",
- "self": "/v1/users/12345",
- "previous": "/v1/users?page=21",
- "last": "/v1/users?page=101"
}
}
Create a new user with required attributes name, email, enabled, totp (=Two-factor authentication 2FA), admin (=access to all endpoints and resources), accessAllResources and roles. You can't specify any password / secrets for the user. For security reasons the user will have to specify secrets on his own.
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
firstName | string [ 1 .. 255 ] characters The name of the user. Names may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per user. |
lastName | string [ 1 .. 255 ] characters The last name of the user. Users may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per user. |
email required | string [ 1 .. 255 ] characters The email of the user to which activation and forgot password links are being sent to. There is a limit of 255 characters per email. |
enabled required | boolean If user is not enabled, he can't login and thus use services any longer. |
totp required | boolean Enable or disable two-factor authentication (2FA) via time based OTP. |
locale required | string Enum: "de-DE" "de" "en-US" "en" The locale of the user. This can be |
roles | Array of integers <int64> [ items <int64 > ] The roles as list of |
{- "firstName": "John",
- "lastName": "Doe",
- "enabled": false,
- "totp": false,
- "locale": "de",
- "roles": [
- 1,
- 2,
- 3,
- 4
]
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "userId": "6cdf5968-f9fe-4192-97c2-f349e813c5e8"
}
], - "_links": {
- "self": "/v1/users/12345"
}
}
Get attributes for a specific user.
userId required | string Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "userId": "6cdf5968-f9fe-4192-97c2-f349e813c5e8",
- "firstName": "John",
- "lastName": "Doe",
- "emailVerified": false,
- "enabled": false,
- "totp": false,
- "locale": "de",
- "roles": [
- {
- "roleId": "12345",
- "tenantId": "DE",
- "customerId": "54321",
- "name": "infrastructure",
- "admin": "true",
- "accessAllResources": "true",
- "type": "custom",
- "permissions": [
- {
- "apiName": "/v1/compute/instances",
- "actions": [
- "CREATE",
- "READ"
], - "resources": [
- {
- "tagId": "12345",
- "tagName": "Web"
}
]
}
]
}
], - "owner": false
}
], - "_links": {
- "self": "/v1/users/12345"
}
}
Update attributes of a user. You may only specify the attributes you want to change. If an attribute is not set, it will retain its original value.
userId required | string Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
firstName | string [ 1 .. 255 ] characters The name of the user. Names may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per user. |
lastName | string [ 1 .. 255 ] characters The last name of the user. Users may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per user. |
string [ 1 .. 255 ] characters The email of the user to which activation and forgot password links are being sent to. There is a limit of 255 characters per email. | |
enabled | boolean If user is not enabled, he can't login and thus use services any longer. |
totp | boolean Enable or disable two-factor authentication (2FA) via time based OTP. |
locale | string Enum: "de-DE" "de" "en-US" "en" The locale of the user. This can be |
roles | Array of integers <int64> [ items <int64 > ] The roles as list of |
{- "firstName": "John",
- "lastName": "Doe",
- "enabled": false,
- "totp": false,
- "locale": "de",
- "roles": [
- 1,
- 2,
- 3,
- 4
]
}
{- "_links": {
- "self": "/v1/users/12345"
}
}
By deleting a user he will not be able to access any endpoints or resources any longer. In order to temporarily disable a user please update its enabled
attribute.
userId required | string Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE 'https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
Send reset password email for a specific user
userId required | string Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
redirectUrl | string Example: redirectUrl=https://test.contabo.de The redirect url used for resetting password |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST 'https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/reset-password' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
Resend email verification for a specific user
userId required | string Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
redirectUrl | string Example: redirectUrl=https://test.contabo.de The redirect url used for email verification |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X POST 'https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/resend-email-verification' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
Get idm client.
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/users/client' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "id": "6cdf5968-f9fe-4192-97c2-f349e813c5e8",
- "clientId": "DE-54321",
- "secret": "7271e905-239e-4d15-a8c5-527743a58390"
}
], - "_links": {
- "self": "/v1/users/client"
}
}
Generate and get new client secret.
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X PUT 'https://api.contabo.com/v1/users/client/secret' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "secret": "7271e905-239e-4d15-a8c5-527743a58390"
}
], - "_links": {
- "self": "/v1/users/client/secret"
}
}
Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like aws
cli.
userId required | string Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
objectStorageId | string Example: objectStorageId=d8417276-d2d9-43a9-a0a8-9a6fa6060246 The identifier of the S3 object storage |
regionName | string Example: regionName=Asia (Singapore) Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union (Germany), United States (Central) |
displayName | string Example: displayName=Object Storage EU 420 Filter for Object Storage by his displayName. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/credentials' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "accessKey": "AKIAIOSFODNN7EXAMPLE",
- "secretKey": "wJalrXK7MDENGbPxRfiCYEXAMPLEKEY",
- "objectStorageId": "9a4c7e20-c326-4a8c-900c-687ad83ba170Y",
- "displayName": "Object Storage Test",
- "region": "European Union (Germany)",
- "credentialId": 12345
}
], - "_links": {
- "first": "v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=1",
- "next": "v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=19",
- "self": "v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials/12345",
- "previous": "v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=21",
- "last": "v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/credentials?page=101"
}
}
Get S3 compatible object storage credentials for accessing it via S3 compatible tools like aws
cli.
userId required | string Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
objectStorageId required | string Example: d8417276-d2d9-43a9-a0a8-9a6fa6060246 The identifier of the S3 object storage |
credentialId required | integer <int64> Example: 12345 The ID of the object storage credential |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/6641ae21-e45d-4e03-8e70-661067152d1d/credentials/12345' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "accessKey": "AKIAIOSFODNN7EXAMPLE",
- "secretKey": "wJalrXK7MDENGbPxRfiCYEXAMPLEKEY",
- "objectStorageId": "9a4c7e20-c326-4a8c-900c-687ad83ba170Y",
- "displayName": "Object Storage Test",
- "region": "European Union (Germany)",
- "credentialId": 12345
}
], - "_links": {
- "self": "v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/e3f0207c-f7fe-433a-92ab-39a9e976642d/credentials"
}
}
Regenerates secret key of specified user for the a specific S3 compatible object storages.
userId required | string Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
objectStorageId required | string Example: d8417276-d2d9-43a9-a0a8-9a6fa6060246 The identifier of the S3 object storage |
credentialId required | integer <int64> Example: 12345 The ID of the object storage credential |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X PATCH 'https://api.contabo.com/v1/users/6cdf5968-f9fe-4192-97c2-f349e813c5e8/object-storages/6641ae21-e45d-4e03-8e70-661067152d1d/credentials/12345' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "accessKey": "AKIAIOSFODNN7EXAMPLE",
- "secretKey": "wJalrXK7MDENGbPxRfiCYEXAMPLEKEY",
- "objectStorageId": "9a4c7e20-c326-4a8c-900c-687ad83ba170Y",
- "displayName": "Object Storage Test",
- "region": "European Union (Germany)",
- "credentialId": 12345
}
], - "_links": {
- "self": "v1/users/08a92037-01e8-4dff-8565-47cad7be701a/object-storages/e3f0207c-f7fe-433a-92ab-39a9e976642d/credentials"
}
}
Give access to all api endpoints and resources or manage to which endpoints and resources individual users might have access to. Permissions are organized in roles. Users can have roles assigned. Roles can grant and restrict access to different API's or to specific resources. Permissions for resources are declared by using tags which have been assigned to resources.
List and filter all your roles. A role allows you to specify permission to api endpoints and resources like compute.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
name | string Example: name=Web The name of the role |
apiName | string Example: apiName=/v1/compute/instances The name of api |
tagName | string Example: tagName=Web The name of the tag |
type | string Example: type=custom The type of the tag. Can be either |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/roles' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "roleId": "12345",
- "tenantId": "DE",
- "customerId": "54321",
- "name": "infrastructure",
- "admin": "true",
- "accessAllResources": "true",
- "type": "custom",
- "permissions": [
- {
- "apiName": "/v1/compute/instances",
- "actions": [
- "CREATE",
- "READ"
], - "resources": [
- {
- "tagId": "12345",
- "tagName": "Web"
}
]
}
]
}
], - "_links": {
- "first": "/v1/role/{roleType}/?page=1",
- "next": "/v1/role/{roleType}/?page=19",
- "self": "/v1/role/{roleType}/12345",
- "previous": "/v1/role/{roleType}/?page=21",
- "last": "/v1/role/{roleType}?page=101"
}
}
Create a new role. In order to get a list availbale api enpoints (apiName) and their actions please refer to the GET api-permissions endpoint. For specifying resources
please enter tag ids. For those to take effect please assign them to a resource in the tag management api.
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name required | string [ 1 .. 255 ] characters The name of the role. There is a limit of 255 characters per role. |
admin required | boolean If user is admin he will have permissions to all API endpoints and resources. Enabling this will superseed all role definitions and |
accessAllResources required | boolean Allow access to all resources. This will superseed all assigned resources in a role. |
Array of objects (PermissionRequest) |
{- "name": "infrastructure",
- "admin": false,
- "accessAllResources": false,
- "permissions": [
- {
- "apiName": "infrastructure",
- "actions": [
- "CREATE",
- "READ"
], - "resources": [
- 1,
- 2,
- 3
]
}
]
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "roleId": 12345
}
], - "_links": {
- "self": "/v1/roles/12345"
}
}
Get attributes of specific role.
roleId required | integer <int64> Example: 12345 The identifier of the role |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/roles/12345' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "roleId": "12345",
- "tenantId": "DE",
- "customerId": "54321",
- "name": "infrastructure",
- "admin": "true",
- "accessAllResources": "true",
- "type": "custom",
- "permissions": [
- {
- "apiName": "/v1/compute/instances",
- "actions": [
- "CREATE",
- "READ"
], - "resources": [
- {
- "tagId": "12345",
- "tagName": "Web"
}
]
}
]
}
], - "_links": {
- "self": "/v1/roles/12345"
}
}
Update attributes to your role. Attributes are optional. If not set, the attributes will retain their original values.
roleId required | integer <int64> Example: 12345 The identifier of the role |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name required | string [ 1 .. 255 ] characters The name of the role. There is a limit of 255 characters per role. |
admin required | boolean If user is admin he will have permissions to all API endpoints and resources. Enabling this will superseed all role definitions and |
accessAllResources required | boolean Allow access to all resources. This will superseed all assigned resources in a role. |
Array of objects (PermissionRequest) |
{- "name": "infrastructure",
- "admin": false,
- "accessAllResources": false,
- "permissions": [
- {
- "apiName": "infrastructure",
- "actions": [
- "CREATE",
- "READ"
], - "resources": [
- 1,
- 2,
- 3
]
}
]
}
{- "_links": {
- "self": "/v1/roles/12345"
}
}
You can't delete a role if it is still assigned to a user. In such cases please remove the role from the users.
roleId required | integer <int64> Example: 12345 The identifier of the role |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE 'https://api.contabo.com/v1/roles/12345' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
List all available API permissions. This list serves as a reference for specifying roles. As endpoints differ in their possibilities not all actions are available for each endpoint.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
apiName | string Example: apiName=/v1/compute/instances The name of api |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/api-permissions' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31' -H 'x-trace-id: 123213'
{- "data": [
- {
- "apiName": "/v1/compute/instances",
- "actions": [
- "CREATE",
- "READ"
]
}
], - "_links": {
- "first": "/v1/roles/api-permissions?page=1",
- "previous": "/v1/roles/api-permissions?page=2",
- "next": "/v1/roles/api-permissions?page=3",
- "last": "/v1/roles/api-permissions?page=10",
- "self": "/v1/roles/api-permissions"
}
}
Give access to all api endpoints and resources or manage to which endpoints and resources individual users might have access to. Permissions are organized in roles. Users can have roles assigned. Roles can grant and restrict access to different API's or to specific resources. Permissions for resources are declared by using tags which have been assigned to resources.
List and filter the history about your users.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
userId | string Example: userId=6cdf5968-f9fe-4192-97c2-f349e813c5e8 The identifier of the user. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 changedBy of the user which led to the change. |
startDate | string <date> Example: startDate=2021-01-01 Start of search time range. |
endDate | string <date> Example: endDate=2021-01-01 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/users/audits' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "id": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "54321",
- "username": "John.Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "userId": "6cdf5968-f9fe-4192-97c2-f349e813c5e8",
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/users/audits?page=2",
- "previous": "/v1/users/audits?page=2",
- "next": "/v1/users/audits?page=3",
- "last": "/v1/users/audits?page=10",
- "self": "/v1/users/audits"
}
}
Give access to all api endpoints and resources or manage to which endpoints and resources individual users might have access to. Permissions are organized in roles. Users can have roles assigned. Roles can grant and restrict access to different API's or to specific resources. Permissions for resources are declared by using tags which have been assigned to resources.
List and filter the history about your roles.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
roleId | integer <int64> Example: roleId=12345 The identifier of the role. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 changedBy of the user which led to the change. |
startDate | string <date> Example: startDate=2021-01-01 Start of search time range. |
endDate | string <date> Example: endDate=2021-01-01 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET 'https://api.contabo.com/v1/roles/audits' -H 'Content-Type: application/json' -H "Authorization: Bearer ${ACCESS_TOKEN}" -H 'x-request-id: 04e0f898-37b4-48bc-a794-1a57abe6aa31'
{- "data": [
- {
- "id": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "54321",
- "username": "John.Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "roleId": "12345",
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/roles/audits?page=2",
- "previous": "/v1/roles/audits?page=2",
- "next": "/v1/roles/audits?page=3",
- "last": "/v1/roles/audits?page=10",
- "self": "/v1/roles/audits"
}
}
The Secret Management API allows you to store and manage your passwords and ssh-keys. Usage of the Secret Management API is purely optional. As a convenience feature e.g. it allows you to reuse SSH-keys easily.
List and filter all secrets in your account.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
name | string Example: name=mysecret Filter secrets by name |
type | string Enum: "password" "ssh" Filter secrets by type |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/secrets"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "secretId": "12345",
- "name": "Password Secret",
- "type": "password",
- "value": "password",
- "createdAt": "2021-06-03T06:27:12.000Z",
- "updatedAt": "2021-06-03T06:27:12.000Z"
}
], - "_links": {
- "self": "/v1/secrets",
- "first": "/v1/secrets?page=1",
- "previous": "/v1/secrets?page=19",
- "next": "/v1/secrets?page=21",
- "last": "/v1/secrets?page=101"
}
}
Create a new secret in your account with attributes name, type and value. Attribute type can be password or ssh.
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name required | string [ 1 .. 255 ] characters The name of the secret that will keep the password |
value required | string >= 8 characters The secret value that needs to be saved. In case of a password it must match a pattern with at least one upper and lower case character and either one number with two special characters |
type required | string Enum: "password" "ssh" The type of the secret. Can be |
{- "name": "my-password",
- "value": "PwdA?2092w#",
- "type": "password"
}
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "secretId": "12345",
- "name": "Password Secret",
- "type": "password",
- "value": "password",
- "createdAt": "2021-06-03T06:27:12.000Z",
- "updatedAt": "2021-06-03T06:27:12.000Z"
}
], - "_links": {
- "self": "/v1/secrets/123"
}
}
Get attributes values for a specific secret on your account.
secretId required | integer <int64> Example: 123 The id of the secret |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/secrets/123"
{- "data": [
- {
- "tenantId": "DE",
- "customerId": "54321",
- "secretId": "12345",
- "name": "Password Secret",
- "type": "password",
- "value": "password",
- "createdAt": "2021-06-03T06:27:12.000Z",
- "updatedAt": "2021-06-03T06:27:12.000Z"
}
], - "_links": {
- "self": "/v1/secrets/123"
}
}
Update attributes to your secret. Attributes are optional. If not set, the attributes will retain their original values. Only name and value can be updated.
secretId required | integer <int64> Example: 123 The id of the secret |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
name | string The name of the secret to be saved |
value | string >= 8 characters The value of the secret to be saved |
{- "name": "string",
- "value": "stringst"
}
{- "_links": {
- "self": "/v1/secrets/123"
}
}
You can remove a specific secret from your account.
secretId required | integer <int64> Example: 123 The id of the secret |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/secrets/123"
The Secret Management API allows you to store and manage your passwords and ssh-keys. Usage of the Secret Management API is purely optional. As a convenience feature e.g. it allows you to reuse SSH-keys easily.
List and filters the history about your secrets.
page | integer <int64> Example: page=1 Number of page to be fetched. |
size | integer <int64> Example: size=10 Number of elements per page. |
orderBy | Array of strings Example: orderBy=name:asc Specify fields and ordering (ASC for ascending, DESC for descending) in following format |
secretId | integer <int64> Example: secretId=123 The id of the secret. |
requestId | string Example: requestId=D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3 The requestId of the API call which led to the change. |
changedBy | string Example: changedBy=23cbb6d6-cb11-4330-bdff-7bb791df2e23 changedBy of the user which led to the change. |
startDate | string <date> Example: startDate=2021-01-01 Start of search time range. |
endDate | string <date> Example: endDate=2021-01-01 End of search time range. |
x-request-id required | string^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-5][0-9A-Fa-... Example: 04e0f898-37b4-48bc-a794-1a57abe6aa31 Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. |
x-trace-id | string Identifier to trace group of requests. |
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" -H "x-trace-id: 123213" "https://api.contabo.com/v1/secrets/audits"
{- "_pagination": {
- "size": 10,
- "totalElements": 100,
- "totalPages": 10,
- "page": 1
}, - "data": [
- {
- "id": "12345",
- "secretId": "12345",
- "action": "CREATED",
- "timestamp": "2021-03-30T11:35:06.177Z",
- "tenantId": "DE",
- "customerId": "54321",
- "changedBy": "54321",
- "username": "John Doe",
- "requestId": "A2F56FAF-18N0-4893-11HG-R312M1E4FEC5",
- "traceId": "78E9A428-94E9-4A2A-92F5-26038C6884F",
- "changes": {
- "prev": {
- "name": "test"
}, - "new": {
- "name": "test1"
}
}
}
], - "_links": {
- "first": "/v1/secrets/audits?page=1",
- "previous": "/v1/secrets/audits?page=19",
- "self": "/v1/secrets/audits?page=20",
- "next": "/v1/secrets/audits?page=21",
- "last": "/v1/secrets/audits?page=101"
}
}