Labels

List labels

get

List all available labels.

Authorizations
Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "labels",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "urn:label:datacenter:700e1cab-99b2-4c30-ba8c-1d273ddba022:environment",
      "type": "label",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
      },
      "properties": {
        "key": "environment",
        "value": "production",
        "resourceId": "700e1cab-99b2-4c30-ba8c-1d273ddba022",
        "resourceType": "datacenter",
        "resourceHref": "https://<hostname>/datacenters/700e1cab-99b2-4c30-ba8c-1d273ddba022"
      }
    }
  ]
}

Retrieve labels by URN

get

Retrieve a label by label URN.

The URN is unique for each label, and consists of:

urn🏷️<resource_type>:<resource_uuid>:

Authorizations
Path parameters
labelurnstringRequired

The label URN; URN is unique for each label, and consists of:

urn:label:<resource_type>:<resource_uuid>:

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/labels/{labelurn} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "urn:label:datacenter:700e1cab-99b2-4c30-ba8c-1d273ddba022:environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production",
    "resourceId": "700e1cab-99b2-4c30-ba8c-1d273ddba022",
    "resourceType": "datacenter",
    "resourceHref": "https://<hostname>/datacenters/700e1cab-99b2-4c30-ba8c-1d273ddba022"
  }
}

List data center labels

get

List all the the labels for the specified data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "labels",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "environment",
      "type": "label",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
      },
      "properties": {
        "key": "environment",
        "value": "production"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create a Data Center Label

post

Adds a new label to the specified data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
201
Successful operation
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Retrieve data center labels

get

Retrieve the properties of the specified data center label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Modify a Data Center Label by Key

put

Modifies the specified data center label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
200
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Delete data center labels

delete

Delete the specified data center label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

List server labels

get

List all the the labels for the specified server.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

serverIdstringRequired

The unique ID of the server.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "labels",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "environment",
      "type": "label",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
      },
      "properties": {
        "key": "environment",
        "value": "production"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create a Server Label

post

Adds a new label to the specified server.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

serverIdstringRequired

The unique ID of the server.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
201
Successful operation
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Retrieve server labels

get

Retrieve the properties of the specified server label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

serverIdstringRequired

The unique ID of the server.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Modify a Server Label

put

Modifies the specified server label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

serverIdstringRequired

The unique ID of the server.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
200
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Delete server labels

delete

Delete the specified server label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

serverIdstringRequired

The unique ID of the server.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

List volume labels

get

List all the the labels for the specified volume.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

volumeIdstringRequired

The unique ID of the volume.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "labels",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "environment",
      "type": "label",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
      },
      "properties": {
        "key": "environment",
        "value": "production"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create a Volume Label

post

Adds a new label to the specified volume.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

volumeIdstringRequired

The unique ID of the volume.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
201
Successful operation
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Retrieve volume labels

get

Retrieve the properties of the specified volume label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

volumeIdstringRequired

The unique ID of the volume.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Modify a Volume Label

put

Modifies the specified volume label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

volumeIdstringRequired

The unique ID of the volume.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
200
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Delete volume labels

delete

Delete the specified volume label.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

volumeIdstringRequired

The unique ID of the volume.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

List snapshot labels

get

List all the the labels for the specified snapshot.

Authorizations
Path parameters
snapshotIdstringRequired

The unique ID of the snapshot.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/snapshots/{snapshotId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "labels",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "environment",
      "type": "label",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
      },
      "properties": {
        "key": "environment",
        "value": "production"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create a Snapshot Label

post

Adds a new label to the specified snapshot.

Authorizations
Path parameters
snapshotIdstringRequired

The unique ID of the snapshot.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
201
Successful operation
application/json
post
POST /cloudapi/v6/snapshots/{snapshotId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Retrieve snapshot labels

get

Retrieve the properties of the specified snapshot label.

Authorizations
Path parameters
snapshotIdstringRequired

The unique ID of the snapshot.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/snapshots/{snapshotId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Modify a Snapshot Label by ID

put

Modifies the specified snapshot label.

Authorizations
Path parameters
snapshotIdstringRequired

The unique ID of the snapshot.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
200
Successful operation
application/json
put
PUT /cloudapi/v6/snapshots/{snapshotId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Delete snapshot labels

delete

Delete the specified snapshot label.

Authorizations
Path parameters
snapshotIdstringRequired

The unique ID of the snapshot.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
delete
DELETE /cloudapi/v6/snapshots/{snapshotId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

List IP block labels

get

List all the the labels for the specified IP block.

Authorizations
Path parameters
ipblockIdstringRequired

The unique ID of the IP block.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/ipblocks/{ipblockId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "labels",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "environment",
      "type": "label",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
      },
      "properties": {
        "key": "environment",
        "value": "production"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create IP block labels

post

Add a new label to the specified IP block.

Authorizations
Path parameters
ipblockIdstringRequired

The unique ID of the IP block.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
201
Successful operation
application/json
post
POST /cloudapi/v6/ipblocks/{ipblockId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Retrieve IP block labels

get

Retrieve the properties of the specified IP block label.

Authorizations
Path parameters
ipblockIdstringRequired

The unique ID of the IP block.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/ipblocks/{ipblockId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Modify a IP Block Label by ID

put

Modifies the specified IP block label.

Authorizations
Path parameters
ipblockIdstringRequired

The unique ID of the IP block.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
200
Successful operation
application/json
put
PUT /cloudapi/v6/ipblocks/{ipblockId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Delete IP block labels

delete

Delete the specified IP block label.

Authorizations
Path parameters
ipblockIdstringRequired

The unique ID of the IP block.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
delete
DELETE /cloudapi/v6/ipblocks/{ipblockId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

List image labels

get

List all the the labels for the specified image.

Authorizations
Path parameters
imageIdstringRequired

The unique ID of the image.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/images/{imageId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "labels",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "environment",
      "type": "label",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
      },
      "properties": {
        "key": "environment",
        "value": "production"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create an Image Label

post

Adds a new label to the specified image.

Authorizations
Path parameters
imageIdstringRequired

The unique ID of the image

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
201
Successful operation
application/json
post
POST /cloudapi/v6/images/{imageId}/labels HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Retrieve image labels

get

Retrieve the properties of the specified image label.

Authorizations
Path parameters
imageIdstringRequired

The unique ID of the image.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/images/{imageId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Modify an Image Label by Key

put

Modifies the specified data center label.

Authorizations
Path parameters
imageIdstringRequired

The unique ID of the image.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

Label on a resource is identified using label key.

Example: environment
typestring · enumRead-onlyOptional

The type of object that has been created.

Possible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
200
Successful operation
application/json
put
PUT /cloudapi/v6/images/{imageId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {},
  "properties": {
    "key": "environment",
    "value": "production"
  }
}
{
  "id": "environment",
  "type": "label",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90"
  },
  "properties": {
    "key": "environment",
    "value": "production"
  }
}

Delete image label

delete

Delete the specified image label.

Authorizations
Path parameters
imageIdstringRequired

The unique ID of the image.

keystringRequired

The label key

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
delete
DELETE /cloudapi/v6/images/{imageId}/labels/{key} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

Was this helpful?