Contabo API (1.0.0)

Download OpenAPI specification:

Introduction

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.

Product documentation

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.

Getting Started

In order to use the Contabo API you will need the following credentials which are available from the Customer Control Panel:

  1. ClientId
  2. ClientSecret
  3. API User (your email address to login to the Customer Control Panel)
  4. API Password (this is a new password which you'll set or change in the Customer Control Panel)

You can either use the API directly or by using the cntb CLI (Command Line Interface) tool.

Using the API directly

Via curl for Linux/Unix like systems

This 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

Via PowerShell for Windows

Please 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

Using the Contabo API via the cntb CLI tool

  1. Download cntb for your operating system (MacOS, Windows and Linux supported) here

  2. Unzip the downloaded file

  3. You might move the executable to any location on your disk. You may update your PATH environment variable for easier invocation.

  4. 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>'
    
  5. Use the CLI

    # get list of your instances
    cntb get instances
    # help
    cntb help
    

API Overview

Compute Management

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.

Object Storage

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.

Private Networking

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.

Secrets Management

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.

User Management

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.

Tag Management

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.

Requests

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.

Responses

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.

Instances

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 instances

List and filter all instances in your account

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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 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" "reset_password"
Example: status=provisioning,installing

The status of the instance

productIds
string
Example: productIds=V68,V77

Identifiers of the instance products

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

search
string
Example: search=vmd12345

Full text search when listing the instances. Can be searched by name, displayName, ipAddress

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Create a new instance

Create a new instance for your account with the provided parameters.

ProductIdProductDisk Size
V91VPS 10 NVMe75 GB NVMe
V92VPS 10 SSD150 GB SSD
V93VPS 10 Storage300 GB SSD
V94VPS 20 NVMe100 GB NVMe
V95VPS 20 SSD200 GB SSD
V96VPS 20 Storage400 GB SSD
V97VPS 30 NVMe200 GB NVMe
V98VPS 30 SSD400 GB SSD
V99VPS 30 Storage1000 GB NVMe
V100VPS 40 NVMe250 GB NVMe
V101VPS 40 SSD500 GB SSD
V102VPS 40 Storage1200 GB NVMe
V103VPS 50 NVMe300 GB NVMe
V104VPS 50 SSD600 GB SSD
V105VPS 50 Storage1400 GB SSD
V106VPS 60 NVMe350 GB NVMe
V107VPS 60 SSD700 GB SSD
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe

Authorizations:
bearer
header Parameters
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.

Request Body schema: application/json
required
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: "V92"

Default is V92

region
string non-empty
Default: "EU"
Enum: "EU" "US-central" "US-east" "US-west" "SIN" "UK" "AUS" "JPN" "IND"

Instance Region where the compute instance should be located. Default is EU

sshKeys
Array of integers <int64> [ items <int64 > ]

Array of secretIds of public SSH keys for logging into as defaultUser with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API.

rootPassword
integer <int64>

secretId of the password for the defaultUser with administrator/root privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer to Secrets Management API.

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 admin (use sudo to apply administrative privileges like root) or root. Allowed values for Windows are admin (has administrative privileges like administrator) or administrator.

object

Set attributes in the addons object for the corresponding ones that need to be added to the instance

applicationId
string

Application ID

Responses

Request samples

Content type
application/json
{
  • "imageId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752",
  • "productId": "V92",
  • "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": {
    },
  • "applicationId": "3f184ab8-a600-4e7c-8c9b-3413e21a3752"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Get specific instance by id

Get attributes values to a specific instance on your account.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Update specific instance

Update specific instance by instanceId.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

header Parameters
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.

Request Body schema: application/json
required
displayName
string <= 255 characters

The display name of the instance

Responses

Request samples

Content type
application/json
{
  • "displayName": "VPS"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Reinstall specific instance

You can reinstall a specific instance with a new image and optionally add ssh keys, a root password or cloud-init.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

header Parameters
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.

Request Body schema: application/json
required
imageId
required
string

ImageId to be used to setup the compute instance.

sshKeys
Array of integers <int64> [ items <int64 > ]

Array of secretIds of public SSH keys for logging into as defaultUser with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API.

rootPassword
integer <int64>

secretId of the password for the defaultUser with administrator/root privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer to Secrets Management API.

userData
string

Cloud-Init Config in order to customize during start of compute instance.

defaultUser
string
Enum: "root" "admin" "administrator"

Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are admin (use sudo to apply administrative privileges like root) or root. Allowed values for Windows are admin (has administrative privileges like administrator) or administrator.

applicationId
string

Application ID

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Cancel specific instance by id

Your are free to cancel a previously created instance at any time.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

header Parameters
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.

Request Body schema: application/json
required
cancelDate
string <date-time>

Date of cancellation

Responses

Request samples

Content type
application/json
{
  • "cancelDate": "15-8-2021"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Upgrading instance capabilities

In order to enhance your instance with additional features you can purchase add-ons. Currently only firewalling and private network addon is allowed.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

header Parameters
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.

Request Body schema: application/json
required
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.

backup
object

Set this attribute if you want to upgrade your instance with the Automated Backup addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future.

Responses

Request samples

Content type
application/json
{
  • "privateNetworking": { },
  • "backup": { }
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

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.

List history about your instances (audit)

List and filters the history about your instances.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Instance Actions

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.

Start a compute instance / resource identified by its id

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.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the compute instance / resource to be started in rescue mode.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Restart a compute instance / resource identified by its id.

To restart a compute instance that has been identified by its id, you should perform a restart action on it.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the compute instance / resource to be started in rescue mode.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Stop compute instance / resource by its id

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.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the compute instance / resource to be started in rescue mode.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Shutdown compute instance / resource by its id

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.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the compute instance / resource to be started in rescue mode.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Rescue a compute instance / resource identified by its id

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.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the compute instance / resource to be started in rescue mode.

header Parameters
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.

Request Body schema: application/json
required
rootPassword
integer <int64>

secretId of the password to login into rescue system for the root user.

sshKeys
Array of integers <int64> [ items <int64 > ]

Array of secretIds of public SSH keys for logging into rescue system as root user.

userData
string

Cloud-Init Config in order to customize during start of compute instance.

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Reset password for a compute instance / resource referenced by an id

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.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the compute instance / resource to be started in rescue mode.

header Parameters
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.

Request Body schema: application/json
required
sshKeys
Array of integers <int64> [ items <int64 > ]

Array of secretIds of public SSH keys for logging into as defaultUser with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API.

rootPassword
integer <int64>

secretId of the password for the defaultUser with administrator/root privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer to Secrets Management API.

userData
string

Cloud-Init Config in order to customize during start of compute instance.

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Instance Actions 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 history about your actions (audit) triggered via the API

List and filters the history about your actions your triggered via the API.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Snapshots

List snapshots

List and filter all your snapshots for a specific instance

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

query Parameters
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 field:ASC|DESC.

name
string
Example: name=Snapshot.Server

Filter as substring match for snapshots names.

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Create a new instance snapshot

Create a new snapshot for instance, with name and description attributes

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

header Parameters
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.

Request Body schema: application/json
required
name
required
string [ 1 .. 30 ] characters

The name of the snapshot. It may contain letters, numbers, spaces, dashes. There is a limit of 30 characters per snapshot.

description
string [ 1 .. 255 ] characters

The description of the snapshot. There is a limit of 255 characters per snapshot.

Responses

Request samples

Content type
application/json
{
  • "name": "Snapshot-Server",
  • "description": "Snapshot-Description"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Retrieve a specific snapshot by id

Get all attributes for a specific snapshot

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

snapshotId
required
string
Example: snap1628603855

The identifier of the snapshot

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Update specific snapshot by id

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.

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

snapshotId
required
string
Example: snap1628603855

The identifier of the snapshot

header Parameters
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.

Request Body schema: application/json
required
name
string [ 1 .. 30 ] characters

The name of the snapshot. Tags may contain only letters, numbers, spaces, dashes. There is a limit of 30 characters per snapshot.

description
string [ 1 .. 255 ] characters

The description of the snapshot. There is a limit of 255 characters per snapshot.

Responses

Request samples

Content type
application/json
{
  • "name": "Snapshot-Server",
  • "description": "Snapshot-Description"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Delete existing snapshot by id

Delete existing instance snapshot by id

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

snapshotId
required
string
Example: snap1628603855

The identifier of the snapshot

header Parameters
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.

Responses

Request samples

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' -d '{}' -H 'x-trace-id: 123213'

Revert the instance to a particular snapshot based on its identifier

Rollback the instance to a specific snapshot. In case the snapshot is not the latest one, it will automatically delete all the newer snapshots of the instance

Authorizations:
bearer
path Parameters
instanceId
required
integer <int64>
Example: 12345

The identifier of the instance

snapshotId
required
string
Example: snap1628603855

The identifier of the snapshot

header Parameters
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.

Request Body schema: application/json
required
object (RollbackSnapshotRequest)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "_links": {
    }
}

Snapshots Audits

List history about your snapshots (audit) triggered via the API

List and filters the history about your snapshots your triggered via the API.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Images

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 available standard and custom images

List and filter all available standard images provided by Contabo and your uploaded custom images.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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)

search
string
Example: search=windows or Debian

full text search on image name or image os type

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Provide a custom image

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.

Authorizations:
bearer
header Parameters
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.

Request Body schema: application/json
required
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 Windows for MS Windows and Linux for other OS. Specifying wrong OS type may lead to disfunctional cloud instance.

version
required
string

Version number to distinguish the contents of an image. Could be the version of the operating system for example.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Get details about a specific image by its id

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

Authorizations:
bearer
path Parameters
imageId
required
string
Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d

The identifier of the image

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Update custom image name by its id

Update name of the custom image

Authorizations:
bearer
path Parameters
imageId
required
string
Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d

The identifier of the image

header Parameters
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.

Request Body schema: application/json
required
name
string

Image Name

description
string

Image Description

Responses

Request samples

Content type
application/json
{
  • "name": "Ubuntu Custom Image",
  • "description": "Ubuntu 20.04 image"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Delete an uploaded custom image by its id

Your are free to delete a previously uploaded custom images at any time

Authorizations:
bearer
path Parameters
imageId
required
string
Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d

The identifier of the image

header Parameters
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.

Responses

Request samples

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' -d '{}' -H 'x-trace-id: 123213'

List statistics regarding the customer's custom images

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

Authorizations:
bearer
header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Images 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 history about your custom images (audit)

List and filters the history about your custom images.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Object Storages

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 all your object storages

List and filter all object storages in your account

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

dataCenterName
string non-empty
Example: dataCenterName=European Union 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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Create a new object storage

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

Authorizations:
bearer
header Parameters
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.

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "region": "EU",
  • "autoScaling": {
    },
  • "totalPurchasedSpaceTB": 6,
  • "displayName": "Object storage 1"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

List data centers

List all data centers and their corresponding regions.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

slug
string non-empty
Example: slug=EU1

Filter as match for data centers.

name
string non-empty
Example: name=European Union 1

Filter for Object Storages regions.

regionName
string non-empty
Example: regionName=European Union

Filter for Object Storage region names.

regionSlug
string non-empty
Example: regionSlug=EU

Filter for Object Storage region slugs.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Get specific object storage by its id

Get data for a specific object storage on your account.

Authorizations:
bearer
path Parameters
objectStorageId
required
string
Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640

The identifier of the object storage.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Modifies the display name of object storage

Modifies the display name of object storage. Display name must be unique.

Authorizations:
bearer
path Parameters
objectStorageId
required
string
Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640

The identifier of the object storage.

header Parameters
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.

Request Body schema: application/json
required
displayName
required
string [ 1 .. 255 ] characters

Display name helps to differentiate between object storages, especially if they are in the same region.

Responses

Request samples

Content type
application/json
{
  • "displayName": "Object storage 1"
}

Response samples

Content type
application/json
{
  • "_links": {
    },
  • "data": [
    ]
}

Upgrade object storage size resp. update autoscaling settings.

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.

Authorizations:
bearer
path Parameters
objectStorageId
required
string
Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640

The identifier of the object storage.

header Parameters
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.

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "autoScaling": {
    },
  • "totalPurchasedSpaceTB": 8
}

Response samples

Content type
application/json
{
  • "_links": {
    },
  • "data": [
    ]
}

List usage statistics about the specified object storage

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.

Authorizations:
bearer
path Parameters
objectStorageId
required
string
Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640

The identifier of the object storage.

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Cancels the specified object storage at the next possible date

Cancels the specified object storage at the next possible date. Please be aware of your contract periods.

Authorizations:
bearer
path Parameters
objectStorageId
required
string
Example: 4a6f95be-2ac0-4e3c-8eed-0dc67afed640

The identifier of the object storage.

header Parameters
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.

Request Body schema: application/json
required
cancelDate
string <date-time>

Date of cancellation

Responses

Request samples

Content type
application/json
{
  • "cancelDate": "2025-01-01"
}

Response samples

Content type
application/json
{
  • "_links": {
    },
  • "data": [
    ]
}

Object Storages 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 history about your object storages (audit)

List and filters the history about your object storages.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Private Networks

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 Private Networks

List and filter all Private Networks in your account

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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 1

The data center where your Private Network is located

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Create a new Private Network

Create a new Private Network in your account.

Authorizations:
bearer
header Parameters
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.

Request Body schema: application/json
required
region
string non-empty
Default: "EU"

Region where the Private Network should be located. Default is EU

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.

Responses

Request samples

Content type
application/json
{
  • "region": "EU",
  • "name": "myPrivateNetwork",
  • "description": "myPrivateNetwork Description"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Update a Private Network by id

Update a Private Network by id in your account.

Authorizations:
bearer
path Parameters
privateNetworkId
required
integer <int64>
Example: 12345

The identifier of the Private Network

header Parameters
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.

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "name": "myPrivateNetwork",
  • "description": "myPrivateNetwork Description"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Get specific Private Network by id

Get attributes values to a specific Private Network on your account.

Authorizations:
bearer
path Parameters
privateNetworkId
required
integer <int64>
Example: 12345

The identifier of the Private Network

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Delete existing Private Network by id

Delete existing Virtual Private Cloud by id and automatically unassign all instances from it

Authorizations:
bearer
path Parameters
privateNetworkId
required
integer <int64>
Example: 12345

The identifier of the Private Network

header Parameters
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.

Responses

Request samples

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" -d '{}' "https://api.contabo.com/v1/private-networks/12345"

Add instance to a Private Network

Add a specific instance to a Private Network

Authorizations:
bearer
path Parameters
privateNetworkId
required
integer <int64>
Example: 12345

The identifier of the Private Network

instanceId
required
integer <int64>
Example: 100

The identifier of the instance

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_links": {
    }
}

Remove instance from a Private Network

Remove a specific instance from a Private Network

Authorizations:
bearer
path Parameters
privateNetworkId
required
integer <int64>
Example: 100

The identifier of the Private Network

instanceId
required
integer <int64>
Example: 100

The identifier of the instance

header Parameters
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.

Responses

Request samples

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" -d '{}' "https://api.contabo.com/v1/private-networks/12345/instances/100"

Response samples

Content type
application/json
{
  • "_links": {
    }
}

Private Networks 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 history about your Private Networks (audit)

List and filters the history about your Private Networks.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Tags

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 tags

List and filter all tags in your account

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Create a new tag

Create a new tag in your account with attribute name and optional attribute color.

Authorizations:
bearer
header Parameters
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.

Request Body schema: application/json
required
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

description
string

The description of the Tag name.

Responses

Request samples

Content type
application/json
{
  • "name": "Web-Server",
  • "color": "#0A78C3",
  • "description": "Tag to differenciate the bad vhosts"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Get specific tag by id

Get attributes values to a specific tag on your account.

Authorizations:
bearer
path Parameters
tagId
required
integer <int64>
Example: 12345

The identifier of the tag

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Update specific tag by id

Update attributes to your tag. Attributes are optional. If not set, the attributes will retain their original values.

Authorizations:
bearer
path Parameters
tagId
required
integer <int64>
Example: 12345

The identifier of the tag

header Parameters
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.

Request Body schema: application/json
required
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

description
string

The description of the Tag name.

Responses

Request samples

Content type
application/json
{
  • "name": "Updated-Web-Server",
  • "color": "#0A78C3",
  • "description": "Tag to differenciate the bad vhosts"
}

Response samples

Content type
application/json
{
  • "_links": {
    }
}

Delete existing tag by id

Your tag can be deleted if it is not assigned to any resource on your account. Check tag assigments before deleting tag.

Authorizations:
bearer
path Parameters
tagId
required
integer <int64>
Example: 12345

The identifier of the tag

header Parameters
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.

Responses

Request samples

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" -d '{}' "https://api.contabo.com/v1/tags/12345"

Tag Assignments

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 tag assignments

List and filter all existing assignments for a tag in your account

Authorizations:
bearer
path Parameters
tagId
required
integer <int64>
Example: 12345

The identifier of the tag.

query Parameters
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 field:ASC|DESC.

resourceType
string
Example: resourceType=instance

Filter as substring match for assignment resource type. Resource type is one of instance|image|object-storage.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Get specific assignment for the tag

Get attributes for a specific tag assignment in your account. For this the resource type and resource id is required.

Authorizations:
bearer
path Parameters
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 instance|image|object-storage.

resourceId
required
string
Example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc

The identifier of the resource id

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Create a new assignment for the tag

Create a new tag assignment. This marks the specified resource with the specified tag for organizing purposes or to restrict access to that resource.

Authorizations:
bearer
path Parameters
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 instance|image|object-storage.

resourceId
required
string
Example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc

The identifier of the resource id

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_links": {
    }
}

Delete existing tag assignment

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.

Authorizations:
bearer
path Parameters
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 instance|image|object-storage.

resourceId
required
string
Example: d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc

The identifier of the resource id

header Parameters
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.

Responses

Request samples

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" -d '{}' "https://api.contabo.com/v1/tags/12345/assignments/instance/d65ecf3b-30db-4dc2-9e88-dfc21a14a6bc"

Tags 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 history about your assignments (audit)

List and filters the history about your assignments.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Tag Assignments 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 history about your assignments (audit)

List and filters the history about your assignments.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Users

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 users

List and filter all your users.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

email
string

Filter as substring match for user emails.

enabled
boolean
Example: enabled=true

Filter if user is enabled or not.

owner
boolean
Example: owner=true

Filter if user is owner or not.

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Create a new user

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.

Authorizations:
bearer
header Parameters
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.

Request Body schema: application/json
required
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" "es" "es-ES"

The locale of the user. This can be de-DE, de, en-US, en, es-ES, es.

roles
Array of integers <int64> [ items <int64 > ]

The roles as list of roleIds of the user.

Responses

Request samples

Content type
application/json
{
  • "firstName": "John",
  • "lastName": "Doe",
  • "email": "[email protected]",
  • "enabled": false,
  • "totp": false,
  • "locale": "de",
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Get specific user by id

Get attributes for a specific user.

Authorizations:
bearer
path Parameters
userId
required
string
Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8

The identifier of the user.

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Update specific user by id

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.

Authorizations:
bearer
path Parameters
userId
required
string
Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8

The identifier of the user.

header Parameters
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.

Request Body schema: application/json
required
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
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" "es" "es-ES"

The locale of the user. This can be de-DE, de, en-US, en, es-ES, es.

roles
Array of integers <int64> [ items <int64 > ]

The roles as list of roleIds of the user.

Responses

Request samples

Content type
application/json
{
  • "firstName": "John",
  • "lastName": "Doe",
  • "email": "[email protected]",
  • "enabled": false,
  • "totp": false,
  • "locale": "de",
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "_links": {
    }
}

Delete existing user by id

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.

Authorizations:
bearer
path Parameters
userId
required
string
Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8

The identifier of the user.

header Parameters
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.

Responses

Request samples

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' -d '{}'

Send reset password email

Send reset password email for a specific user

Authorizations:
bearer
path Parameters
userId
required
string
Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8

The identifier of the user.

query Parameters
redirectUrl
string
Example: redirectUrl=https://test.contabo.de

The redirect url used for resetting password

header Parameters
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.

Responses

Request samples

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

Resend email verification for a specific user

Authorizations:
bearer
path Parameters
userId
required
string
Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8

The identifier of the user.

query Parameters
redirectUrl
string
Example: redirectUrl=https://test.contabo.de

The redirect url used for email verification

header Parameters
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.

Responses

Request samples

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 client

Get idm client.

Authorizations:
bearer
header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Generate new client secret

Generate and get new client secret.

Authorizations:
bearer
header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Get user is password set status

Get info about idm user if the password is set.

Authorizations:
bearer
query Parameters
userId
string
Example: userId=6cdf5968-f9fe-4192-97c2-f349e813c5e8

The user ID for checking if password is set for him

header Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Users Object Storage 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.

Get list of S3 compatible object storage credentials for user.

Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like aws cli.

Authorizations:
bearer
path Parameters
userId
required
string
Example: 6cdf5968-f9fe-4192-97c2-f349e813c5e8

The identifier of the user.

query Parameters
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 field:ASC|DESC.

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, United States (Central)

displayName
string
Example: displayName=Object Storage EU 420

Filter for Object Storage by his displayName.

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Get S3 compatible object storage credentials.

Get S3 compatible object storage credentials for accessing it via S3 compatible tools like aws cli.

Authorizations:
bearer
path Parameters
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

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Regenerates secret key of specified user for the S3 compatible object storages.

Regenerates secret key of specified user for the a specific S3 compatible object storages.

Authorizations:
bearer
path Parameters
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

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Roles

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 roles

List and filter all your roles. A role allows you to specify permission to api endpoints and resources like compute.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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 default or custom

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Create a new role

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.

Authorizations:
bearer
header Parameters
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.

Request Body schema: application/json
required
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.

accessAllResources
required
boolean

Allow access to all resources. This will superseed all assigned resources in a role.

Array of objects (PermissionRequest)

Responses

Request samples

Content type
application/json
{
  • "name": "infrastructure",
  • "admin": false,
  • "accessAllResources": false,
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Get specific role by id

Get attributes of specific role.

Authorizations:
bearer
path Parameters
roleId
required
integer <int64>
Example: 12345

The identifier of the role

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Update specific role by id

Update attributes to your role. Attributes are optional. If not set, the attributes will retain their original values.

Authorizations:
bearer
path Parameters
roleId
required
integer <int64>
Example: 12345

The identifier of the role

header Parameters
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.

Request Body schema: application/json
required
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.

accessAllResources
required
boolean

Allow access to all resources. This will superseed all assigned resources in a role.

Array of objects (PermissionRequest)

Responses

Request samples

Content type
application/json
{
  • "name": "infrastructure",
  • "admin": false,
  • "accessAllResources": false,
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "_links": {
    }
}

Delete existing role by id

You can't delete a role if it is still assigned to a user. In such cases please remove the role from the users.

Authorizations:
bearer
path Parameters
roleId
required
integer <int64>
Example: 12345

The identifier of the role

header Parameters
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.

Responses

Request samples

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' -d '{}'

List of API permissions

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.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

apiName
string
Example: apiName=/v1/compute/instances

The name of api

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

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 history about your users (audit)

List and filter the history about your users.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Roles 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 history about your roles (audit)

List and filter the history about your roles.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Secrets

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 secrets

List and filter all secrets in your account.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

name
string
Example: name=mysecret

Filter secrets by name

type
string
Enum: "password" "ssh"

Filter secrets by type

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Create a new secret

Create a new secret in your account with attributes name, type and value. Attribute type can be password or ssh.

Authorizations:
bearer
header Parameters
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.

Request Body schema: application/json
required
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 !@#$^&*?_~ or at least three numbers with one special character !@#$^&*?_~. This is expressed in the following regular expression: ^((?=.*?[A-Z]{1,})(?=.*?[a-z]{1,}))(((?=(?:[^d]*d){1})(?=([^^&*?_~]*[!@#$^&*?_~]){2,}))|((?=(?:[^d]*d){3})(?=.*?[!@#$^&*?_~]+))).{8,}$

type
required
string
Enum: "password" "ssh"

The type of the secret. Can be password or ssh

Responses

Request samples

Content type
application/json
{
  • "name": "my-password",
  • "value": "PwdA?2092w#",
  • "type": "password"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Get specific secret by id

Get attributes values for a specific secret on your account.

Authorizations:
bearer
path Parameters
secretId
required
integer <int64>
Example: 123

The id of the secret

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Update specific secret by id

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.

Authorizations:
bearer
path Parameters
secretId
required
integer <int64>
Example: 123

The id of the secret

header Parameters
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.

Request Body schema: application/json
required
name
string

The name of the secret to be saved

value
string >= 8 characters

The value of the secret to be saved

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "value": "stringst"
}

Response samples

Content type
application/json
{
  • "_links": {
    }
}

Delete existing secret by id

You can remove a specific secret from your account.

Authorizations:
bearer
path Parameters
secretId
required
integer <int64>
Example: 123

The id of the secret

header Parameters
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.

Responses

Request samples

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" -d '{}' "https://api.contabo.com/v1/secrets/123"

Secrets 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 history about your secrets (audit)

List and filters the history about your secrets.

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

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.

header Parameters
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.

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

VIP

VIP (Virtual IPs) API manages virtual IP adresses including ´additional´ and ´floating´ IPv4 Adresses. Virtual IPs are payed add-ons (Additional IP) which can be freely assigned to Cloud VPS/VDS or Bare Metal. Please note, that assgnments of virtual IPs to servers is only for documentation purposes. Technical Assignemts must be configured on operation system level, see docs.

List VIPs

List and filter all vips in your account

Authorizations:
bearer
query Parameters
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 field:ASC|DESC.

resourceId
string
Example: resourceId=10001

The resourceId using the VIP.

resourceType
string
Enum: "instances" "bare-metal" "null"
Example: resourceType=instances

The resourceType using the VIP.

resourceName
string
Example: resourceName=vmi100101

The name of the resource.

resourceDisplayName
string
Example: resourceDisplayName=my instance

The display name of the resource.

ipVersion
string
Value: "v4"
Example: ipVersion=v4

The VIP version.

ips
string
Example: ips=10.214.121.145, 10.214.121.1, 10.214.121.11

Comma separated IPs

ip
string
Example: ip=10.214.121.145

The ip of the VIP

type
string
Enum: "additional" "floating"
Example: type=additional

The VIP type.

dataCenter
string
Example: dataCenter=European Union (Germany) 3

The dataCenter of the VIP.

region
string
Example: region=EU

The region of the VIP.

header Parameters
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.

Responses

Request samples

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/vips"

Response samples

Content type
application/json
{
  • "_pagination": {
    },
  • "data": [
    ],
  • "_links": {
    }
}

Get specific VIP by ip

Get attributes values to a specific VIP on your account.

Authorizations:
bearer
path Parameters
ip
required
string
Example: 10.214.121.145

The ip of the VIP

header Parameters
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.

Responses

Request samples

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/vips/12345"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Assign a VIP to an VPS/VDS/Bare Metal

Assign a VIP to a VPS/VDS/Bare Metal using the machine id.

Authorizations:
bearer
path Parameters
resourceId
required
integer <int64>
Example: 12345

The identifier of the resource

ip
required
string
Example: 127.0.0.1

The ip you want to add the instance to

resourceType
required
string
Enum: "instances" "bare-metal"
Example: instances

The resourceType using the VIP.

header Parameters
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.

Responses

Request samples

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/vips/127.0.0.1/instances/1001001"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "_links": {
    }
}

Unassign a VIP to a VPS/VDS/Bare Metal

Unassign a VIP from an VPS/VDS/Bare Metal using the machine id.

Authorizations:
bearer
path Parameters
resourceId
required
integer <int64>
Example: 12345

The identifier of the resource

ip
required
string
Example: 127.0.0.1

The ip you want to add the instance to

resourceType
required
string
Enum: "instances" "bare-metal"
Example: instances

The resourceType using the VIP.

header Parameters
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.

Responses

Request samples

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" -d '{}' "https://api.contabo.com/v1/vips/127.0.0.1/instances/1001001"