Volumes

List volumes

get

List all the volumes within the 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
offsetinteger · int32Optional

The first element (from the complete list of the elements) to include in the response (used together with limit for pagination).

Default: 0
limitinteger · int32 · min: 1 · max: 10000Optional

The maximum number of elements to return (use together with offset for pagination).

Default: 1000
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 HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "volume",
      "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",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "My resource",
        "type": "HDD",
        "size": 100,
        "availabilityZone": "AUTO",
        "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
        "imagePassword": "mypass123",
        "imageAlias": "text",
        "sshKeys": [
          "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
          "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
        ],
        "bus": "VIRTIO",
        "licenceType": "LINUX",
        "applicationType": "MSSQL-2019-Standard",
        "cpuHotPlug": true,
        "ramHotPlug": true,
        "nicHotPlug": true,
        "nicHotUnplug": true,
        "discVirtioHotPlug": true,
        "discVirtioHotUnplug": true,
        "exposeSerial": true,
        "requireLegacyBios": true,
        "deviceNumber": 3,
        "pciSlot": 7,
        "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
        "userData": "text",
        "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
        "bootOrder": "AUTO"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create a Volume

post

Creates a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section.

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

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: volume
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

The URL to the object representation (absolute path).

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

{
  "type": "volume",
  "metadata": {},
  "properties": {
    "name": "My resource",
    "type": "HDD",
    "size": 100,
    "availabilityZone": "AUTO",
    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
    "imagePassword": "mypass123",
    "imageAlias": "text",
    "sshKeys": [
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
    ],
    "bus": "VIRTIO",
    "licenceType": "LINUX",
    "applicationType": "MSSQL-2019-Standard",
    "cpuHotPlug": true,
    "ramHotPlug": true,
    "nicHotPlug": true,
    "nicHotUnplug": true,
    "discVirtioHotPlug": true,
    "discVirtioHotUnplug": true,
    "exposeSerial": true,
    "requireLegacyBios": true,
    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "userData": "text",
    "bootOrder": "AUTO"
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "volume",
  "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",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "type": "HDD",
    "size": 100,
    "availabilityZone": "AUTO",
    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
    "imagePassword": "mypass123",
    "imageAlias": "text",
    "sshKeys": [
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
    ],
    "bus": "VIRTIO",
    "licenceType": "LINUX",
    "applicationType": "MSSQL-2019-Standard",
    "cpuHotPlug": true,
    "ramHotPlug": true,
    "nicHotPlug": true,
    "nicHotUnplug": true,
    "discVirtioHotPlug": true,
    "discVirtioHotUnplug": true,
    "exposeSerial": true,
    "requireLegacyBios": true,
    "deviceNumber": 3,
    "pciSlot": 7,
    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "userData": "text",
    "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "bootOrder": "AUTO"
  }
}

Retrieve volumes

get

Retrieve the properties of the specified volume within the data center.

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} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "volume",
  "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",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "type": "HDD",
    "size": 100,
    "availabilityZone": "AUTO",
    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
    "imagePassword": "mypass123",
    "imageAlias": "text",
    "sshKeys": [
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
    ],
    "bus": "VIRTIO",
    "licenceType": "LINUX",
    "applicationType": "MSSQL-2019-Standard",
    "cpuHotPlug": true,
    "ramHotPlug": true,
    "nicHotPlug": true,
    "nicHotUnplug": true,
    "discVirtioHotPlug": true,
    "discVirtioHotUnplug": true,
    "exposeSerial": true,
    "requireLegacyBios": true,
    "deviceNumber": 3,
    "pciSlot": 7,
    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "userData": "text",
    "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "bootOrder": "AUTO"
  }
}

Modify a Volume by ID

put

Modifies the properties of the specified volume within the data center.

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

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: volume
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

The URL to the object representation (absolute path).

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

{
  "type": "volume",
  "metadata": {},
  "properties": {
    "name": "My resource",
    "type": "HDD",
    "size": 100,
    "availabilityZone": "AUTO",
    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
    "imagePassword": "mypass123",
    "imageAlias": "text",
    "sshKeys": [
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
    ],
    "bus": "VIRTIO",
    "licenceType": "LINUX",
    "applicationType": "MSSQL-2019-Standard",
    "cpuHotPlug": true,
    "ramHotPlug": true,
    "nicHotPlug": true,
    "nicHotUnplug": true,
    "discVirtioHotPlug": true,
    "discVirtioHotUnplug": true,
    "exposeSerial": true,
    "requireLegacyBios": true,
    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "userData": "text",
    "bootOrder": "AUTO"
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "volume",
  "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",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "type": "HDD",
    "size": 100,
    "availabilityZone": "AUTO",
    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
    "imagePassword": "mypass123",
    "imageAlias": "text",
    "sshKeys": [
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
    ],
    "bus": "VIRTIO",
    "licenceType": "LINUX",
    "applicationType": "MSSQL-2019-Standard",
    "cpuHotPlug": true,
    "ramHotPlug": true,
    "nicHotPlug": true,
    "nicHotUnplug": true,
    "discVirtioHotPlug": true,
    "discVirtioHotUnplug": true,
    "exposeSerial": true,
    "requireLegacyBios": true,
    "deviceNumber": 3,
    "pciSlot": 7,
    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "userData": "text",
    "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "bootOrder": "AUTO"
  }
}

Delete volumes

delete

Delete the specified volume within the data center. Use with caution, the volume will be permanently removed!

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
202
Successful operation
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

Partially modify volumes

patch

Update the properties of the specified storage volume within the data center.

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
namestringOptional

The name of the resource.

Example: My resource
typestring · enumOptional

Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server.

Example: HDDPossible values:
sizenumberRequired

The size of the volume in GB.

Example: 100
availabilityZonestring · enumOptional

The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD.

Example: AUTOPossible values:
imagestringOptional

Image or snapshot ID to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract.

Example: d6ad1576-fde9-4696-aa41-1ebd75bdaf49
imagePasswordstringOptional

Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9.

Example: mypass123
imageAliasstringOptional

Image alias of an image to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract.

sshKeysstring[]Optional

Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation.

Example: ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345","ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"]
busstring · enumOptional

The bus type for this volume; default is VIRTIO.

Example: VIRTIOPossible values:
licenceTypestringOptional

OS type for this volume.

Example: LINUX
applicationTypestringOptional

The type of application that is hosted on this resource. Only public images can have an Application type different than UNKNOWN.

Default: UNKNOWNExample: MSSQL-2019-Standard
cpuHotPlugbooleanOptional

Hot-plug capable CPU (no reboot required).

Example: true
ramHotPlugbooleanOptional

Hot-plug capable RAM (no reboot required).

Example: true
nicHotPlugbooleanOptional

Hot-plug capable NIC (no reboot required).

Example: true
nicHotUnplugbooleanOptional

Hot-unplug capable NIC (no reboot required).

Example: true
discVirtioHotPlugbooleanOptional

Hot-plug capable Virt-IO drive (no reboot required).

Example: true
discVirtioHotUnplugbooleanOptional

Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs.

Example: true
exposeSerialbooleanOptional

If set to true will expose the serial id of the disk attached to the server. If set to false will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior

Default: falseExample: true
requireLegacyBiosbooleanOptional

Indicates if the image requires the legacy BIOS for compatibility or specific needs.

Default: trueExample: true
deviceNumberinteger · int64Read-onlyOptional

The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM.

Example: 3
pciSlotinteger · int32Read-onlyOptional

The PCI slot number of the storage volume. Null for volumes, not mounted to a VM.

Example: 7
backupunitIdstring · uuidOptional

The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.

Example: 25f67991-0f51-4efc-a8ad-ef1fb31a481c
userDatastringOptional

The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property.

bootServerstringRead-onlyOptional

The UUID of the attached server.

Example: 25f67991-0f51-4efc-a8ad-ef1fb31a481c
bootOrderstring · enum | nullableOptional

Determines whether the volume will be used as a boot volume. Set to NONE, the volume will not be used as boot volume. Set to PRIMARY, the volume will be used as boot volume and all other volumes must be set to NONE. Set to AUTO or null requires all volumes to be set to AUTO or null; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices.

Default: AUTOExample: AUTOPossible values:
Responses
202
Successful operation
application/json
patch
PATCH /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 1270

{
  "name": "My resource",
  "type": "HDD",
  "size": 100,
  "availabilityZone": "AUTO",
  "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
  "imagePassword": "mypass123",
  "imageAlias": "text",
  "sshKeys": [
    "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
    "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
  ],
  "bus": "VIRTIO",
  "licenceType": "LINUX",
  "applicationType": "MSSQL-2019-Standard",
  "cpuHotPlug": true,
  "ramHotPlug": true,
  "nicHotPlug": true,
  "nicHotUnplug": true,
  "discVirtioHotPlug": true,
  "discVirtioHotUnplug": true,
  "exposeSerial": true,
  "requireLegacyBios": true,
  "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
  "userData": "text",
  "bootOrder": "AUTO"
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "volume",
  "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",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "type": "HDD",
    "size": 100,
    "availabilityZone": "AUTO",
    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
    "imagePassword": "mypass123",
    "imageAlias": "text",
    "sshKeys": [
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
    ],
    "bus": "VIRTIO",
    "licenceType": "LINUX",
    "applicationType": "MSSQL-2019-Standard",
    "cpuHotPlug": true,
    "ramHotPlug": true,
    "nicHotPlug": true,
    "nicHotUnplug": true,
    "discVirtioHotPlug": true,
    "discVirtioHotUnplug": true,
    "exposeSerial": true,
    "requireLegacyBios": true,
    "deviceNumber": 3,
    "pciSlot": 7,
    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "userData": "text",
    "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
    "bootOrder": "AUTO"
  }
}

Restore volume snapshots

post

Restore a snapshot for the specified volume within the data center. A snapshot is an image of a volume, which can be used to restore this volume at a later time.

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
Responses
202
Successful operation
post
POST /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "properties": {
    "snapshotId": "text"
  }
}

No content

Create volume snapshots

post

Create a snapshot of the specified volume within the data center; this snapshot can later be used to restore this 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
Responses
202
Successful operation
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "properties": {
    "name": "text",
    "description": "text",
    "secAuthProtection": true,
    "licenceType": "LINUX",
    "applicationType": "MSSQL-2019-Standard"
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "snapshot",
  "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",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "description": "Image/Snapshot of Ubuntu ",
    "location": "us/las",
    "size": 100,
    "secAuthProtection": true,
    "cpuHotPlug": true,
    "cpuHotUnplug": true,
    "ramHotPlug": true,
    "ramHotUnplug": true,
    "nicHotPlug": true,
    "nicHotUnplug": true,
    "discVirtioHotPlug": true,
    "discVirtioHotUnplug": true,
    "discScsiHotPlug": true,
    "exposeSerial": true,
    "requireLegacyBios": true,
    "discScsiHotUnplug": true,
    "licenceType": "LINUX",
    "applicationType": "MSSQL-2019-Standard"
  }
}

Was this helpful?