Skip to content

9. Storages

A storage device is a block device similar to a physical hard disk. It can be used to install an operating system or hold some other filesystem for a server.

Storages can be freely attached to any server within the same zone and under the same account. A maximum of 16 storage devices can be attached to a server at the same time; however, the combined limit for network interfaces and storage devices is 24.

Storage types

There are four different storage types: disk, cdrom, template and backup.

Normal storages

Normal storage resources are used to store operating system and application data. This is the only user writeable storage type.

CD-ROMs

CD-ROM resources are used as a read-only media, typically for server installations or crash recovery.

Templates

Templates are special storage resources which are used to create new servers with a preconfigured operating system.

Backups

Backups are storages containing a point-in-time backup of a normal storage. Data on a normal storage can be restored from one of its backups. Backups can also be cloned to create a new normal storage resource. Backups can be created manually or automatically using backup rules.

Storage tiers

Storage resources are divided into three tiers. Storage tiers affect both the performance and price of the storage.

Storage tier API name Description
MaxIOPS maxiops High performance storage
Standard standard General purpose storage
Archive hdd* High capacity storage

* For backwards compatibility, Archive tier is called hdd on the API.

Read more about Block storage tiers.

Storage access types

Storage access types are public and private.

Public storages

Public storages are visible to all users. Public storages include CD-ROM images and templates. CD-ROM images can be used to install operating systems and to rescue unbootable systems. Templates are used to create servers with a preconfigured operating system.

Private storages

Private storages are visible only to the specific user account and subaccounts. Users can only create private storages.

Storage states

The storage state indicates the storage's current status.

State Description
online The storage resource is ready for use. The storage can be attached or detached.
maintenance Maintenance work is currently performed on the storage. The storage may have been newly created or it is being updated by some API operation.
cloning The storage resource is currently the clone source for another storage.
backuping The storage resource is currently being backed up to another storage.
syncing The storage resource is currently synchronizing its data.
error The storage has encountered an error and is currently inaccessible.

Favorite storages

Storage templates can be added to a list of favorites. This is used to distinguish the most important templates amongst the many available. See List storages on how to retrieve a list of favorite storages. See Add storage to favorites and Remove storage from favorites on how to manage favorite storages.

List storages

Returns a list of all accessible storages. The list can be narrowed down by the storage's access type (public or private), storage type (normal, backup, cdrom or template) or favorite status.

It is also possible to filter storages with label URL parameters, e.g. ?label=env or ?label=env%3Dprod. The URL parameter can be given multiple times to add more filters (e.g. ?label=env%3Dprod&label=v2), where only storages that match all labels are returned. Label keys are matched case insensitively.

Requests

GET /1.3/storage HTTP/1.1
GET /1.3/storage/public HTTP/1.1
GET /1.3/storage/private HTTP/1.1
GET /1.3/storage/normal HTTP/1.1
GET /1.3/storage/backup HTTP/1.1
GET /1.3/storage/cdrom HTTP/1.1
GET /1.3/storage/template HTTP/1.1
GET /1.3/storage/favorite HTTP/1.1

Normal response

HTTP/1.1 200 OK
{
  "storages": {
    "storage": [
      {
        "access": "private",
        "encrypted" : "no",
        "labels": [],
        "license": 0,
        "size": 10,
        "state": "online",
        "tier": "hdd",
        "title": "Operating system disk",
        "type": "normal",
        "uuid": "01eff7ad-168e-413e-83b0-054f6a28fa23",
        "zone": "uk-lon1"
      },
      {
        "access" : "private",
        "encrypted" : "no",
        "labels": [],
        "created" : "2019-09-17T14:34:43Z",
        "license" : 0,
        "origin" : "01eff7ad-168e-413e-83b0-054f6a28fa23",
        "size" : 10,
        "state" : "online",
        "title" : "On demand backup",
        "type" : "backup",
        "uuid" : "01287ad1-496c-4b5f-bb67-0fc2e3494740",
        "zone" : "uk-lon1"
      },
      {
        "access": "private",
        "encrypted" : "no",
        "labels": [],
        "license": 0,
        "part_of_plan": "yes",
        "size": 50,
        "state": "online",
        "tier": "maxiops",
        "title": "Databases",
        "type": "normal",
        "uuid": "01f3286c-a5ea-4670-8121-d0b9767d625b",
        "zone": "fi-hel1"
      },
      {
        "access": "public",
        "encrypted" : "no",
        "labels": [],
        "license": 0,
        "size": 5,
        "state": "online",
        "template_type": "cloud-init",
        "title": "Ubuntu Server 22.04 LTS (Jammy Jellyfish)",
        "type": "template",
        "uuid": "01000000-0000-4000-8000-000030220200"
      }
    ]
  }
}

Get storage details

Returns detailed information about a specific storage resource.

The servers attached to this storage are listed in the servers block of the response body.

Request

GET /1.3/storage/{uuid} HTTP/1.1

Normal response

HTTP/1.1 200 OK
{
  "storage": {
    "access": "private",
    "encrypted" : "yes",
    "backup_rule": "",
    "backups": {
      "backup": []
    },
    "labels": [
      {
        "key": "env",
        "value": "prod"
      }
    ],
    "license": 0,
    "servers": {
      "server": [
        "00798b85-efdc-41ca-8021-f6ef457b8531"
      ]
    },
    "size": 10,
    "state": "online",
    "tier": "maxiops",
    "title": "Operating system disk",
    "type": "normal",
    "uuid": "01d4fcd4-e446-433b-8a9c-551a1284952e",
    "zone": "fi-hel1"
  }
}

Create storage

Creates a new storage resource.

Storages are always created to a specific zone. Storages can be attached to servers within the same zone. See List available zones on how to retrieve a list of available zones.

A newly created storage is not attached to any server. See Attach storage to server.

Request

POST /1.3/storage HTTP/1.1
{
  "storage": {
    "encrypted" : "yes",
    "size": "10",
    "tier": "maxiops",
    "title": "My data collection",
    "zone": "fi-hel1",
    "labels": [
      {
        "key": "env",
        "value": "prod"
      }
    ],
    "backup_rule": {
      "interval": "daily",
      "time": "0430",
      "retention": "365"
    }
  }
}

Attributes

Attribute Accepted values Default value Required Description
size 1-4096 yes The size of the storage in gigabytes.
tier hdd / standard / maxiops hdd no The storage tier to use. See Storage tiers.
title 1-255 characters yes A short, informational description.
zone A valid zone identifier yes The zone in which the storage will be created, e.g. fi-hel1. See Zones.
backup_rule A backup_rule block no The backup_rule block defines when the storage device is backed up automatically.
labels list of wanted labels for the storage no Labels describing the storage, objects with both "key" and "value" defined.
encrypted yes / no no no All block storage devices can be optionally encrypted at rest.

The backup_rule block contains the following attributes.

Attribute Accepted values Default value Required Description
interval daily / mon / tue / wed / thu / fri / sat / sun yes The weekday when the backup is created. If daily is selected, backups are made every day at the same time.
time 0000-2359 yes The time of day when the backup is created.
retention 1-1095 yes The number of days before a backup is automatically deleted. The maximum retention period is three years (1095 days).

If one of the interval, time or retention attributes is specified, others must also be specified. The backup_rule block can also be left empty.

The labels block may include key-value pairs for classifying the storage.

Attribute Accepted values Default value Required Description
key 2-32 printable ASCII characters (range 0x20-0x7E), must not start with _ yes Label key
value 0-255 characters yes Label value

Labels can include specific service labels that cannot be modified. These always start with _ and do not conflict with normal labels.

Normal response

HTTP/1.1 201 Created
{
  "storage": {
    "access": "private",
    "encrypted" : "no",
    "backup_rule": {
      "interval": "daily",
      "hour": "0430",
      "retention": "365"
    },
    "backups": {
      "backup": []
    },
    "labels": [
      {
        "key": "env",
        "value": "prod"
      }
    ],
    "license": 0,
    "servers": {
      "server": []
    },
    "size": 10,
    "state": "online",
    "tier": "maxiops",
    "title": "test",
    "type": "normal",
    "uuid": "01d4fcd4-e446-433b-8a9c-551a1284952e",
    "zone": "fi-hel1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request BACKUP_RULE_INVALID The backup_rule block has an invalid value.
400 Bad Request INTERVAL_INVALID The attribute interval has an invalid value.
400 Bad Request INTERVAL_MISSING The required attribute interval is missing from the request.
400 Bad Request HOUR_INVALID The attribute hour has an invalid value.
400 Bad Request HOUR_MISSING The required attribute hour is missing from the request.
400 Bad Request RETENTION_INVALID The attribute retention has an invalid value.
400 Bad Request RETENTION_MISSING The required attribute retention is missing from the request.
400 Bad Request SIZE_INVALID The attribute size has an invalid value.
400 Bad Request SIZE_MISSING The required attribute size is missing from the request.
400 Bad Request TIER_INVALID The attribute tier has an invalid value.
400 Bad Request TITLE_INVALID The attribute title has an invalid value.
400 Bad Request TITLE_MISSING The required attribute title is missing from the request.
400 Bad Request ZONE_INVALID The attribute zone has an invalid value.
400 Bad Request ZONE_MISSING The required attribute zone is missing from the request.
402 Payment Required INSUFFICIENT_CREDITS There are not enough credits to perform the requested action. See Credits.
403 Forbidden TRIAL_SERVER_LIMIT_REACHED Trial mode server limit reached.
403 Forbidden TRIAL_CORE_LIMIT_REACHED Trial mode core limit reached.
403 Forbidden TRIAL_NETWORK_LIMIT_REACHED Trial mode network limit reached.
403 Forbidden TRIAL_DETACHED_FLOATING_IP_LIMIT_REACHED Trial mode detached floating IP limit reached.
403 Forbidden TRIAL_MEMORY_LIMIT_REACHED Trial mode memory limit reached.
403 Forbidden TRIAL_STORAGE_LIMIT_REACHED Trial mode storage limit reached.
403 Forbidden TRIAL_STORAGE_SIZE_LIMIT_REACHED Trial mode storage size limit reached.
403 Forbidden TRIAL_IP_LIMIT_REACHED Trial mode IP limit reached.
403 Forbidden SERVER_CORE_LIMIT_REACHED Server core account quota limit reached.
403 Forbidden SERVER_MEMORY_LIMIT_REACHED Server memory account quota limit reached.
403 Forbidden HDD_STORAGE_LIMIT_REACHED Archive storage account quota limit reached.
403 Forbidden STANDARD_STORAGE_LIMIT_REACHED Standard storage account quota limit reached.
403 Forbidden MAXIOPS_STORAGE_LIMIT_REACHED MaxIOPS storage account quota limit reached.
403 Forbidden SERVER_IP_LIMIT_REACHED Server IP account quota limit reached.
403 Forbidden NETWORK_LIMIT_REACHED Network account quota limit reached.
403 Forbidden DETACHED_FLOATING_IP_LIMIT_REACHED Detached floating IP account quota limit reached.
403 Forbidden NETWORK_PEERING_LIMIT_REACHED Network peering account quota limit reached.
409 Conflict LABEL_LIMIT_REACHED Maximum number of labels per resource reached.
404 Not Found ZONE_NOT_FOUND The zone does not exist.
409 Conflict STORAGE_RESOURCES_UNAVAILABLE There are not enough storage resources available in the specified zone and tier to create the requested storage.

Modify storage

Modifies an existing storage resource. This operation is used to rename or resize the storage.

If the storage is going to be resized, the new size must be greater than the old size. The storage state must be online. If the storage is attached to a server, the server must be stopped for certain operations such as resize. Note that neither the partition table nor the file system on the storage device is resized and such changes have to be made once the storage is attached to a server. A partition table change and a filesystem resize is required to use the available space.

Transferring storage resources between zones is possible using the Clone storage operation.

Request

PUT /1.3/storage/{uuid} HTTP/1.1
{
  "storage": {
    "size": "20",
    "title": "A larger storage"
  }
}

Attributes

Attribute Accepted values Default value Required Description
backup_rule A backup_rule block. no A backup rule used to schedule automatic backups on the storage.
size 1-4096 no The size of the storage in gigabytes.
title 1-255 characters no A short, informational description.
labels list of wanted labels for the storage no See [Create storage] for more information.

The backup_rule block contains the following attributes.

Attribute Accepted values Default value Required Description
interval daily / mon / tue / wed / thu / fri / sat / sun yes The weekday when the backup is created. If daily is selected, backups are made every day at the same time.
time 0000-2359 yes The time of day when the backup is created.
retention 1-1095 yes The number of days before a backup is automatically deleted. The maximum retention period is three years (1095 days).

If one of the interval, time or retention attributes is specified, others must also be specified. The backup_rule block can also be left empty.

Normal response

HTTP/1.1 202 Accepted
{
  "storage": {
    "access": "private",
    "encrypted": "no",
    "backup_rule": "",
    "backups": {
      "backup": []
    },
    "license": 0,
    "servers": {
      "server": []
    },
    "size": 20,
    "state": "online",
    "tier": "maxiops",
    "title": "A larger storage",
    "type": "normal",
    "uuid": "011d671f-e803-484d-920a-c25b4bb05c01",
    "zone": "uk-lon1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request BACKUP_RULE_INVALID The backup_rule block has an invalid value.
400 Bad Request INTERVAL_INVALID The attribute interval has an invalid value.
400 Bad Request INTERVAL_MISSING The required attribute interval is missing from the request.
400 Bad Request HOUR_INVALID The attribute hour has an invalid value.
400 Bad Request HOUR_MISSING The required attribute hour is missing from the request.
400 Bad Request RETENTION_INVALID The attribute retention has an invalid value.
400 Bad Request RETENTION_MISSING The required attribute retention is missing from the request.
400 Bad Request SIZE_INVALID The attribute size has an invalid value. If action is clone, size must be greater than the size of the cloned storage.
400 Bad Request STORAGE_INVALID The attribute storage has an invalid value.
400 Bad Request TITLE_INVALID The attribute title has an invalid value.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
403 Forbidden TRIAL_SERVER_LIMIT_REACHED Trial mode server limit reached.
403 Forbidden TRIAL_CORE_LIMIT_REACHED Trial mode core limit reached.
403 Forbidden TRIAL_NETWORK_LIMIT_REACHED Trial mode network limit reached.
403 Forbidden TRIAL_DETACHED_FLOATING_IP_LIMIT_REACHED Trial mode detached floating IP limit reached.
403 Forbidden TRIAL_MEMORY_LIMIT_REACHED Trial mode memory limit reached.
403 Forbidden TRIAL_STORAGE_LIMIT_REACHED Trial mode storage limit reached.
403 Forbidden TRIAL_STORAGE_SIZE_LIMIT_REACHED Trial mode storage size limit reached.
403 Forbidden TRIAL_IP_LIMIT_REACHED Trial mode IP limit reached.
403 Forbidden SERVER_CORE_LIMIT_REACHED Server core account quota limit reached.
403 Forbidden SERVER_MEMORY_LIMIT_REACHED Server memory account quota limit reached.
403 Forbidden HDD_STORAGE_LIMIT_REACHED Archive storage account quota limit reached.
403 Forbidden STANDARD_STORAGE_LIMIT_REACHED Standard storage account quota limit reached.
403 Forbidden MAXIOPS_STORAGE_LIMIT_REACHED MaxIOPS storage account quota limit reached.
403 Forbidden SERVER_IP_LIMIT_REACHED Server IP account quota limit reached.
403 Forbidden NETWORK_LIMIT_REACHED Network account quota limit reached.
403 Forbidden DETACHED_FLOATING_IP_LIMIT_REACHED Detached floating IP account quota limit reached.
403 Forbidden NETWORK_PEERING_LIMIT_REACHED Network peering account quota limit reached.
409 Conflict LABEL_LIMIT_REACHED Maximum number of labels per resource reached.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
409 Conflict STORAGE_ATTACHED The storage is currently attached to a server. To resize a storage, it must first be detached from any servers.
409 Conflict STORAGE_RESOURCES_UNAVAILABLE There are not enough storage resources available in the specified zone to resize the storage.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
409 Conflict STORAGE_TYPE_ILLEGAL The type of the storage to be attached is illegal. Only storages of type normal can be resized. See Storage types.
409 Conflict BACKUP_RULE_CONFLICT The backup rule of the storage conflicts with the simple backup rule of the server.

Resize storage partition & filesystem

Resizes the last partition of a storage and the ext3/ext4/XFS/NTFS filesystem on that partition if the partition does not extend to the end of the storage yet.

Before the resize is attempted, a backup is taken from the storage. If the resize succeeds, backup details are returned. It is advisable to keep the backup until you have ensured that everything works after the resize.

If the resize fails, backup is used to restore the storage to the state where it was before the resize. After that the backup is deleted automatically.

Request

POST /1.3/storage/{uuid}/resize HTTP/1.1

Normal response

HTTP/1.1 200 OK
{
   "resize_backup" : {
      "access" : "private",
      "created" : "2021-12-03T06:25:15Z",
      "license" : 0,
      "origin" : "017ca4cc-def2-458d-a797-7782959b30a7",
      "servers" : {
         "server" : []
      },
      "size" : 30,
      "state" : "online",
      "title" : "Resize Backup",
      "type" : "backup",
      "uuid" : "01beec3a-14ac-4f71-9c63-3338341121c3",
      "zone" : "uk-lon1"
   }
}

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The attribute storage has an invalid value.
402 Payment Required INSUFFICIENT_CREDITS There are not enough credits to create the backup. See Credits.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
409 Conflict RESIZE_FAILED The resize operation did not succeed. The error message contains a more specific reason.
409 Conflict STORAGE_RESOURCES_UNAVAILABLE There were not enough storage resources available to create the backup.
409 Conflict SERVER_STATE_ILLEGAL The server where the storage is attached to is not in stopped state. See Server states.
409 Conflict STORAGE_STATE_ILLEGAL The storage is not in online state. See Storage states.
409 Conflict STORAGE_TYPE_ILLEGAL The type of the storage is illegal. Only storages of type normal can be resized. See Storage types.

Attach storage

Attaches a storage as a device to a server.

Attaching normal storages

In order to attach an IDE device, the server state must be stopped. SCSI and virtio devices may also be attached while the server state is started.

Attaching CD-ROM devices

A storage resource can be attached as a disk or a cdrom. Only one cdrom device may attached on a server at the same time. A CD-ROM device can be empty, i.e. it does not need to have a storage loaded. The storage loaded to the CD-ROM device may be changed by using the Eject CD-ROM and Load CD-ROM operations.

In order to attach a CD-ROM device, the server state must be stopped.

Request (via Server API)

POST /1.3/server/{uuid}/storage/attach HTTP/1.1
{
  "storage_device": {
    "type": "disk",
    "address": "scsi",
    "storage": "00798b85-efdc-41ca-8021-f6ef457b8531",
    "boot_disk": "0"
  }
}

Attributes

Attribute Accepted values Default value Required Description
type disk / cdrom disk no The type of the attached storage.
address ide[:[01]:[01]] / scsi[:0:[0-15]] / virtio[:[0-15]] Next available address in virtio bus no The address where the storage device is attached on the server. Specify only the bus name (ide/scsi/virtio) to auto-select next available address from that bus.
storage A valid storage UUID yes if type is disk The UUID of the storage to attach.
boot_disk 0/1 0 no If the value is 1 the storage device will be used as a boot disk, unless overridden with the server boot_order attribute.

Normal response

HTTP/1.1 200 OK
{
  "server": {
    "boot_order": "disk",
    "core_number": "4",
    "firewall": "on",
    "hostname": "debian.example.com",
    "host": 8055964291,
    "ip_addresses": {
      "ip_address": [
        {
            "access": "private",
            "address": "10.0.0.0",
            "family": "IPv4"
        },
        {
            "access": "public",
            "address": "x.x.x.x",
            "family": "IPv4"
        },
        {
            "access": "public",
            "address": "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx",
            "family": "IPv6"
        }
      ]
    },
    "license": 0,
    "memory_amount": "8192",
    "nic_model": "virtio",
    "plan": "custom",
    "plan_ipv4_bytes": "0",
    "plan_ipv6_bytes": "0",
    "state": "started",
    "storage_devices": {
      "storage_device": [
        {
          "address": "scsi:0:0",
          "storage": "00798b85-efdc-41ca-8021-f6ef457b8531",
          "storage_size": "10",
          "storage_title": "Debian from a template",
          "storage_encrypted" : "yes",
          "type": "disk",
          "boot_disk": "0"
        }
      ]
    },
    "tags": {
      "tag": []
    },
    "timezone": "UTC",
    "title": "My Debian server",
    "uuid": "00c78863-db86-44ea-af70-d6edc4d162bf",
    "video_model": "cirrus",
    "vnc_password": "aabbccdd",
    "vnc": "off",
    "zone": "fi-hel1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request ADDRESS_INVALID The attribute address has an invalid value.
400 Bad Request SERVER_INVALID The server UUID has an invalid value.
400 Bad Request STORAGE_INVALID The attribute storage has an invalid value.
400 Bad Request STORAGE_MISSING The required attribute storage is missing from the request.
400 Bad Request TYPE_INVALID The attribute type has an invalid value.
403 Forbidden SERVER_FORBIDDEN The server exists, but is owned by another account.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
404 Not Found SERVER_NOT_FOUND The server does not exist.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
409 Conflict CDROM_DEVICE_IN_USE There is already a CD-ROM device attached on the server. Only one CD-ROM device can be attached per server.
409 Conflict CDROM_HOTPLUG_UNSUPPORTED Hotplugging CD-ROM devices is not supported.
409 Conflict DEVICE_ADDRESS_IN_USE The device address is already in use.
409 Conflict IDE_HOTPLUG_UNSUPPORTED Hotplugging IDE devices is not supported.
409 Conflict PUBLIC_STORAGE_ATTACH Attaching a storage of access type public is not allowed. See Storage access types.
409 Conflict SERVER_STATE_ILLEGAL The server is in a state in which it cannot be used. See Server states.
409 Conflict STORAGE_ATTACHED The storage is already attached to the specified server.
409 Conflict STORAGE_ATTACHED_AS_CDROM The storage to be attached as a disk is already attached to some server as a CD-ROM.
409 Conflict STORAGE_ATTACHED_AS_DISK The storage to be attached as a CD-ROM is already attached to some server as a disk.
409 Conflict STORAGE_DEVICE_LIMIT_REACHED The limit of the number of attached devices has been reached. It is possible to attach 16 storage devices per server.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
409 Conflict STORAGE_TYPE_ILLEGAL The type of the storage to be attached is illegal. Attaching a cdrom or a template as a disk is not possible. See Storage types.
409 Conflict ZONE_MISMATCH The storage is located in a different zone than the one the server is created in.
409 Conflict TOO_MANY_BOOT_DISKS Too many boot disks: Only one storage can have boot_disk defined.
409 Conflict BACKUP_RULE_CONFLICT The backup rule of the storage conflicts with the simple backup rule of the server.

Request (via Storage API)

POST /1.3/storage/00798b85-efdc-41ca-8021-f6ef457b8531/attach HTTP/1.1
{
  "storage_device": {
    "type": "disk",
    "address": "scsi",
    "server": "009d64ef-31d1-4684-a26b-c86c955cbf46",
    "boot_disk": "0"
  }
}

Attributes

Attribute Accepted values Default value Required Description
type disk / cdrom disk no The type of the attached storage.
address ide[:[01]:[01]] / scsi[:0:[0-15]] / virtio[:[0-15]] Next available no The address where the storage device is attached on the server. Specify only the bus name (ide/scsi/virtio) to auto-select next available address from that bus.
server A valid server UUID yes The UUID of the server to attach the storage.
boot_disk 0/1 0 no If the value is 1 the storage device will be used as a boot disk, unless overridden with the server boot_order attribute.

Normal response

HTTP/1.1 200 OK
{
  "storage": {
    "access": "private",
    "encrypted" : "yes",
    "backup_rule": "",
    "backups": {
      "backup": []
    },
    "license": 0,
    "servers": {
      "server": [
        "009d64ef-31d1-4684-a26b-c86c955cbf46"
      ]
    },
    "size": 10,
    "state": "online",
    "tier": "maxiops",
    "title": "Debian from a template",
    "type": "normal",
    "uuid": "00798b85-efdc-41ca-8021-f6ef457b8531",
    "zone": "fi-hel1"
  }
}

Error responses

Same as with Server API

Detach storage

Detaches a storage resource from a server.

The detached storage is identified by the device address on the attached server.

IDE devices cannot be detached while the server state is started.

Request (via Server API)

POST /1.3/server/{uuid}/storage/detach HTTP/1.1
{
  "storage_device": {
    "address": "scsi:0:0"
  }
}

Attributes

Attribute Accepted values Default value Required Description
address "ide:[01]:[01] /scsi:0:[0-15] / virtio:[0-15]" yes if storage is not specified Detach the storage attached to this address.
storage UUID yes if address is not specified Detach the storage by this UUID.

Normal response

HTTP/1.1 200 OK
{
  "server": {
    "boot_order": "disk",
    "core_number": "4",
    "firewall": "on",
    "hostname": "debian.example.com",
    "host": 8055964291,
    "ip_addresses": {
      "ip_address": [
        {
          "access": "private",
          "address": "10.0.0.0",
          "family": "IPv4"
        },
        {
          "access": "public",
          "address": "x.x.x.x",
          "family": "IPv4"
        },
        {
          "access": "public",
          "address": "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx",
          "family": "IPv6"
        }
      ]
    },
    "license": 0,
    "memory_amount": "8192",
    "nic_model": "virtio",
    "plan": "custom",
    "plan_ipv4_bytes": "0",
    "plan_ipv6_bytes": "0",
    "state": "stopped",
    "storage_devices": {
      "storage_device": [ ]
    },
    "tags": {
      "tag": []
    },
    "timezone": "UTC",
    "title": "My Debian server",
    "uuid": "00c78863-db86-44ea-af70-d6edc4d162bf",
    "video_model": "cirrus",
    "vnc": "off",
    "vnc_password": "aabbccdd",
    "zone": "fi-hel1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request ADDRESS_INVALID The attribute address has an invalid value.
400 Bad Request ADDRESS_MISSING The required attribute address is missing from the request.
400 Bad Request SERVER_INVALID The server UUID has an invalid value.
400 Bad Request ADDRESS_OR_UUID_REQUIRED Either an address or a UUID must be given.
403 Forbidden SERVER_FORBIDDEN The server exists, but is owned by another account.
404 Not Found SERVER_NOT_FOUND The server does not exist.
409 Conflict CDROM_HOTPLUG_UNSUPPORTED Hotplugging CD-ROM devices is not supported.
409 Conflict DEVICE_ADDRESS_NOT_IN_USE There was no storage device attached to the specified device address.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
409 Conflict SERVER_STATE_ILLEGAL The server is in a state in which it cannot be used. See Server states.
409 Conflict IDE_HOTPLUG_UNSUPPORTED Hotplugging IDE devices is not supported.
511 Operation Failed HOTPLUG_FAILED The hotplug operation failed.

Request (via Storage API)

POST /1.3/storage/00c78863-db86-44ea-af70-d6edc4d162b/detach HTTP/1.1

Normal response

HTTP/1.1 200 OK
{
  "storage": {
    "access": "private",
    "encrypted" : "no",
    "backup_rule": "",
    "backups": {
      "backup": []
    },
    "license": 0,
    "servers": {
      "server": []
    },
    "size": 10,
    "state": "online",
    "tier": "maxiops",
    "title": "Debian from a template",
    "type": "normal",
    "uuid": "00798b85-efdc-41ca-8021-f6ef457b8531",
    "zone": "fi-hel1"
  }
}

Error responses

Same as with Server API.

Load CD-ROM

Loads a storage as a CD-ROM in the CD-ROM device of a server.

This operation requires that a CD-ROM device is attached to the server. A CD-ROM device can be attached using the Attach storage operation.

Any storage of type normal or cdrom can be loaded as a CD-ROM.

Request

POST /1.3/server/{uuid}/cdrom/load HTTP/1.1
{
  "storage_device": {
    "storage": "01000000-0000-4000-8000-000060010101"
  }
}

Attributes

Attribute Accepted values Default value Required Description
storage UUID of a storage of type normal or cdrom. yes The UUID of the storage to be loaded in the CD-ROM device.

Normal response

HTTP/1.1 200 OK
{
  "server": {
    "boot_order": "cdrom,disk",
    "core_number": "0",
    "firewall": "on",
    "hostname": "test.example.com",
    "host": 8055964291,
    "ip_addresses": {
      "ip_address": [
        {
          "access": "private",
          "address": "10.0.0.0",
          "family": "IPv4"
        },
        {
          "access": "public",
          "address": "x.x.x.x",
          "family": "IPv4"
        },
        {
          "access": "public",
          "address": "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx",
          "family": "IPv6"
        }
      ]
    },
    "license": 0,
    "memory_amount": "512",
    "nic_model": "virtio",
    "state": "started",
    "storage_devices": {
      "storage_device": [
        {
          "type": "cdrom",
          "address": "ide:0:1",
          "storage": "01000000-0000-4000-8000-000060010101"
        },
        {
          "type": "disk",
          "address": "ide:0:0",
          "storage": "01d4fcd4-e446-433b-8a9c-551a1284952e"
        }
      ]
    },
    "tags": {
      "tag": []
    },
    "timezone": "UTC",
    "title": "Example server",
    "uuid": "00798b85-efdc-41ca-8021-f6ef457b8531",
    "video_model": "cirrus",
    "vnc_password": "aabbccdd",
    "vnc": "off",
    "zone": "fi-hel1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The attribute storage has an invalid value.
400 Bad Request STORAGE_MISSING The required attribute storage is missing from the request.
400 Bad Request SERVER_INVALID The server UUID has an invalid value.
403 Forbidden SERVER_FORBIDDEN The server exists, but it is owned by another account.
403 Forbidden STORAGE_FORBIDDEN The server exists, but is owned by another account.
404 Not Found SERVER_NOT_FOUND The server does not exist.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
409 Conflict NO_CDROM_DEVICE There is no CD-ROM device attached to the server.
409 Conflict SERVER_STATE_ILLEGAL The server is in a state in which it cannot be used. See Server states.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
409 Conflict STORAGE_TYPE_ILLEGAL The type of the storage to be attached is illegal. Only storages of type normal and cdrom can be loaded as CD-ROMs.
409 Conflict STORAGE_ATTACHED The specified storage is already loaded as a CD-ROM in the specified server.
409 Conflict STORAGE_ATTACHED_AS_DISK The storage to be loaded is already attached to some server as a disk.
409 Conflict ZONE_MISMATCH The storage is located in a different zone than the server.

Eject CD-ROM

Ejects the storage from the CD-ROM device of a server.

Request

POST /1.3/server/{uuid}/cdrom/eject HTTP/1.1

Normal response

HTTP/1.1 200 OK
{
  "server": {
    "boot_order": "cdrom,disk",
    "core_number": "1",
    "firewall": "on",
    "hostname": "test.example.com",
    "ip_addresses": {
      "ip_address": [
        {
          "access": "private",
          "address": "10.0.0.0",
          "family": "IPv4"
        },
        {
          "access": "public",
          "address": "x.x.x.x",
          "family": "IPv4"
        },
        {
          "access": "public",
          "address": "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx",
          "family": "IPv6"
        }
      ]
    },
    "license": 0,
    "memory_amount": "512",
    "nic_model": "virtio",
    "state": "started",
    "storage_devices": {
      "storage_device": [
        {
          "type": "cdrom",
          "address": "ide:0:1",
          "storage": ""
        },
        {
          "type": "disk",
          "address": "ide:0:0",
          "storage": "01d4fcd4-e446-433b-8a9c-551a1284952e"
        }
      ]
    },
    "tags": {
      "tag": []
    },
    "timezone": "UTC",
    "title": "Example server",
    "uuid": "00798b85-efdc-41ca-8021-f6ef457b8531",
    "video_model": "cirrus",
    "vnc_password": "aabbccdd",
    "vnc": "off",
    "zone": "fi-hel1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request SERVER_INVALID The server UUID has an invalid value.
403 Forbidden SERVER_FORBIDDEN The server exists, but is owned by another account.
404 Not Found SERVER_NOT_FOUND The server does not exist.
409 Conflict NO_CDROM_DEVICE There is no CD-ROM device attached to the server.
409 Conflict SERVER_STATE_ILLEGAL The server is in a state in which it cannot be used. See Server states.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
511 Operation Failed CDROM_EJECT_FAILED Could not eject the CD-ROM. It may still be mounted on the server.

Create import

Creates an import task to import data into an existing storage. If the storage has been attached to a server, the server must be in stopped state.

The supported data type is raw (extension .raw, .img or .iso). However, the data can be compressed either with GZip or XZ (extensions .gz or .xz) in which case it will be transparently decompressed.

Note that the size of the data to be imported cannot exceed the size of a storage. The data will be written starting from the beginning of the storage, and the storage will not be truncated before starting to write.

After data has been successfully written the storage will transition into syncing state to resync all the data. During this the storage can be used by a server.

Import modes

Import from HTTP source (http_import)

The data will be imported from a publicly reachable HTTP server. Requires source_location to be set to a URL to the data resource.

Both http and https schemes are supported. If the source HTTP server requires authentication the username and password can be embedded into the URL: https://username:[email protected]/path/to/data.raw

Import by directly uploading into a storage (direct_upload)

In this mode the data can be actively pushed into the storage. A temporary URL will be returned in a direct_upload_url field in the response. One can then send the data by issuing an HTTP PUT request to that URL.

Example with cURL:

curl -XPUT --data-binary @/path/to/data.raw https://fi-hel1.img.upcloud.com/uploader/session/07a6c9a3-300e-4d0e-b935-624f3dbdff3f

Request

POST /1.3/storage/{uuid}/import HTTP/1.1
{
  "storage_import": {
    "source": "http_import",
    "source_location": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso"
  }
}

Attributes

Attribute Accepted values Default value Required Description
source http_import or direct_upload yes The mode of the import task.
source_location A valid URL if source is http_import The URL to the data to import.

Normal response

HTTP/1.1 201 Created

HTTP Import

{
  "storage_import": {
    "client_content_length": 0,
    "client_content_type": "",
    "completed": "",
    "created": "2020-06-26T08:51:07Z",
    "error_code": "",
    "error_message": "",
    "md5sum": "",
    "read_bytes": 0,
    "sha256sum": "",
    "source": "http_import",
    "source_location": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso",
    "state": "prepared",
    "uuid": "07a6c9a3-300e-4d0e-b935-624f3dbdff3f",
    "written_bytes": 0
  }
}

Direct Upload

{
  "storage_import": {
    "client_content_length": 0,
    "client_content_type": "",
    "completed": "",
    "created": "2020-06-26T08:51:07Z",
    "direct_upload_url": "https://fi-hel1.img.upcloud.com/uploader/session/07a6c9a3-300e-4d0e-b935-624f3dbdff3f",
    "error_code": "",
    "error_message": "",
    "md5sum": "",
    "read_bytes": 0,
    "sha256sum": "",
    "source": "direct_upload",
    "state": "prepared",
    "uuid": "07a6c9a3-300e-4d0e-b935-624f3dbdff3f",
    "written_bytes": 0
  }
}

Error responses

HTTP status Error code Description
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
400 Bad Request STORAGE_TYPE_ILLEGAL Only normal storages are supported for import.
409 Conflict SERVER_STATE_ILLEGAL The server must be stopped in order to create an import.
503 Service Unavailable IMPORT_UNAVAILABLE Creating an import task is temporarily not possible.
503 Service Unavailable STORAGE_INCONSISTENT Creating an import task is temporarily not possible.

Get import details

Returns detailed information of an ongoing or finished import task. If the task is in progress the counter values and state will reflect the current state of the import. Once the task finishes the md5sum and sha256sum fields will be updated.

Upon error the error_code and error_message fields will be updated.

States

State Description
prepared The task has been submitted. Initial state of a task.
pending The task is waiting for data transfer to start.
importing The data is been written.
failed The import task failed. Please check the error fields.
cancelling The import task cancellation was requested by the user.
cancelled The import task was cancelled by the user.
completed The import task was completed successfully.

Request

GET /1.3/storage/{uuid}/import HTTP/1.1

Normal response

HTTP/1.1 200 OK
{
  "storage_import": {
    "client_content_length": 0,
    "client_content_type": "",
    "completed": "",
    "created": "2020-06-26T08:51:07Z",
    "error_code": "",
    "error_message": "",
    "md5sum": "",
    "read_bytes": 0,
    "sha256sum": "",
    "source": "http_import",
    "source_location": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso",
    "state": "pending",
    "uuid": "07a6c9a3-300e-4d0e-b935-624f3dbdff3f",
    "written_bytes": 0
  }
}

Error responses

HTTP status Error code Description
404 Not Found STORAGE_IMPORT_NOT_FOUND The storage has no existing import task.

Cancel import

Cancels an ongoing import task. The task will transition into cancelling state. Once the import task has been fully cancelled the storage will transition into syncing or online state depending on whether any data has been written. If so, the storage contents will be rolled back to the state before starting the import task.

Request

POST /1.3/storage/{uuid}/import/cancel HTTP/1.1

Normal response

HTTP/1.1 202 Accepted
{
  "storage_import": {
    "client_content_length": 0,
    "client_content_type": "",
    "completed": "",
    "created": "2020-06-26T08:51:07Z",
    "error_code": "",
    "error_message": "",
    "md5sum": "",
    "read_bytes": 0,
    "sha256sum": "",
    "source": "http_import",
    "source_location": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso",
    "state": "cancelling",
    "uuid": "07a6c9a3-300e-4d0e-b935-624f3dbdff3f",
    "written_bytes": 0
  }
}

Error responses

HTTP status Error code Description
404 Not Found STORAGE_IMPORT_NOT_FOUND The storage has no existing import task.
409 Conflict STORAGE_IMPORT_NOT_IN_PROGRESS Only tasks in pending, prepared or importing states can be cancelled

Clone storage

Creates an exact copy of an existing storage resource.

The speed of the clone operation depends on the size of the storage and whether the source and target storages are in the same zone. A clone operation between different zones takes a considerably longer time than a clone operation within the same zone.

This operation is asynchronous. The state of the cloned storage is maintenance and changes to online after the clone process is complete. The status of the operation can be monitored by polling the storage with the Get storage details operation.

Cloning can be cancelled while in progress by issuing the Cancel storage operation request.

Request

POST /1.3/storage/{uuid}/clone HTTP/1.1
{
  "storage": {
    "zone": "fi-hel1",
    "tier": "maxiops",
    "title": "Clone of operating system disk",
    "encrypted": "yes"
  }
}

Attributes

Attribute Accepted values Default value Required Description
zone Valid zone id yes The zone in which the storage will be created, e.g. fi-hel1. See Zones.
tier hdd / standard / maxiops hdd no The storage tier to use. See Storage tiers.
title 1-255 characters yes A short, informational description.
encrypted yes / no no no All block storage devices can be optionally encrypted at rest.

Normal response

HTTP/1.1 201 Created
{
  "storage": {
    "access": "private",
    "encrypted": "yes",
    "license": 0,
    "servers": {
      "server": []
    },
    "size": "10",
    "state": "maintenance",
    "tier": "maxiops",
    "title": "Clone of operating system disk",
    "type": "normal",
    "uuid": "01f3286c-a5ea-4670-8121-d0b9767d625b",
    "zone": "fi-hel1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The storage UUID has an invalid value.
400 Bad Request TIER_INVALID The attribute tier has an invalid value.
400 Bad Request TITLE_INVALID The attribute title has an invalid value.
400 Bad Request TITLE_INVALID The required attribute title is missing from the request.
400 Bad Request ZONE_INVALID The attribute zone has an invalid value.
400 Bad Request ZONE_MISSING The required attribute zone is missing from the request.
402 Payment Required INSUFFICIENT_CREDITS There are not enough credits to perform the requested action. See Credits.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
403 Forbidden TRIAL_SERVER_LIMIT_REACHED Trial mode server limit reached.
403 Forbidden TRIAL_CORE_LIMIT_REACHED Trial mode core limit reached.
403 Forbidden TRIAL_NETWORK_LIMIT_REACHED Trial mode network limit reached.
403 Forbidden TRIAL_DETACHED_FLOATING_IP_LIMIT_REACHED Trial mode detached floating IP limit reached.
403 Forbidden TRIAL_MEMORY_LIMIT_REACHED Trial mode memory limit reached.
403 Forbidden TRIAL_STORAGE_LIMIT_REACHED Trial mode storage limit reached.
403 Forbidden TRIAL_STORAGE_SIZE_LIMIT_REACHED Trial mode storage size limit reached.
403 Forbidden TRIAL_IP_LIMIT_REACHED Trial mode IP limit reached.
403 Forbidden SERVER_CORE_LIMIT_REACHED Server core account quota limit reached.
403 Forbidden SERVER_MEMORY_LIMIT_REACHED Server memory account quota limit reached.
403 Forbidden HDD_STORAGE_LIMIT_REACHED Archive storage account quota limit reached.
403 Forbidden STANDARD_STORAGE_LIMIT_REACHED Standard storage account quota limit reached.
403 Forbidden MAXIOPS_STORAGE_LIMIT_REACHED MaxIOPS storage account quota limit reached.
403 Forbidden SERVER_IP_LIMIT_REACHED Server IP account quota limit reached.
403 Forbidden NETWORK_LIMIT_REACHED Network account quota limit reached.
403 Forbidden DETACHED_FLOATING_IP_LIMIT_REACHED Detached floating IP account quota limit reached.
403 Forbidden NETWORK_PEERING_LIMIT_REACHED Network peering account quota limit reached.
409 Conflict LABEL_LIMIT_REACHED Maximum number of labels per resource reached.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
404 Not Found ZONE_NOT_FOUND The zone does not exist.
409 Conflict STORAGE_RESOURCES_UNAVAILABLE There were not enough storage resources available in the specified zone to create the storage.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
409 Conflict STORAGE_TYPE_ILLEGAL The type of the storage to be attached is illegal. See Storage types.

Cancel storage operation

Cancels a running cloning operation and deletes the incomplete copy.

A running cloning operation can be cancelled if it is e.g. taking too much time or was not intentional. Cancelling the cloning will stop the cloning operation, remove the incomplete new storage and return the source storage back to online state.

Note that it might take several seconds to source storage to reset back to online state after the cancellation request is completed.

Request

POST /1.3/storage/{uuid}/cancel HTTP/1.1

Normal response

HTTP/1.1 204 No Content

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The storage UUID has an invalid value.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
409 Conflict UNABLE_TO_CANCEL The cancellation was not successful.

Templatize storage

Creates an exact copy of an existing storage resource which can be used as a template for creating new servers.

The speed of the operation depends on the size of the storage. Templates can be created from any MaxIOPS, Standard or Archive block storage device. Deployments from custom templates are restricted to use the same storage tier.

This operation is asynchronous and similar to cloning. The state of the templatized storage is maintenance and changes to online after the process is complete. The status of the operation can be monitored by polling the storage with the Get storage details operation.

Request

POST /1.3/storage/{uuid}/templatize HTTP/1.1
{
  "storage": {
    "title": "My server template"
  }
}

Attributes

Attribute Accepted values Default value Required Description
title 1-255 characters yes A short, informational description.

Normal response

HTTP/1.1 201 Created
{
  "storage": {
    "access": "private",
    "license": 0,
    "servers": {
        "server": []
    },
    "size": 10,
    "state": "maintenance",
    "tier": "maxiops",
    "title": "My server template",
    "type": "template",
    "uuid": "012cfe08-ed18-4dce-93c0-c7e39e6276c8",
    "zone": "fi-hel1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The storage UUID has an invalid value.
400 Bad Request TITLE_INVALID The attribute title has an invalid value.
400 Bad Request TITLE_MISSING The required attribute title is missing from the request.
402 Payment Required INSUFFICIENT_CREDITS There are not enough credits to perform the requested action. See Credits.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
409 Conflict STORAGE_RESOURCES_UNAVAILABLE There were not enough storage resources available in the specified zone to create the storage.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. Storage should not be attached to running server.
409 Conflict STORAGE_TIER_ILLEGAL Only maxiops storages can be templatized.

Create backup

Creates a point-in-time backup of a storage resource. For automatic, scheduled backups, see backup_rule in Create storage or Modify storage.

This operation is asynchronous. The state of the storage changes to backuping and changes back to online after the backup process is complete. The status of the operation can be monitored by polling the storage with the Get storage details operation.

Request

POST /1.3/storage/{uuid}/backup HTTP/1.1
{
  "storage": {
    "title": "Manually created backup"
  }
}

Attributes

Attribute Accepted values Default value Required Description
title 1-255 characters yes A short, informational description.

Normal response

HTTP/1.1 201 Created
{
  "storage": {
    "access": "private",
    "created": "2015-03-27T10:02:05Z",
    "license": 0,
    "origin": "01eff7ad-168e-413e-83b0-054f6a28fa23",
    "progress": "0",
    "servers": {
      "server": []
    },
    "size": "10",
    "state": "maintenance",
    "title": "Manually created backup",
    "type": "normal",
    "uuid": "01f3286c-a5ea-4670-8121-d0b9767d625b",
    "zone": "fi-hel1"
  }
}

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The storage UUID has an invalid value.
400 Bad Request TITLE_INVALID The attribute title has an invalid value.
400 Bad Request TITLE_MISSING The required attribute title is missing from the request.
402 Payment Required INSUFFICIENT_CREDITS There are not enough credits to perform the requested action. See Credits.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
409 Conflict STORAGE_RESOURCES_UNAVAILABLE There were not enough storage resources available in the specified zone to create the storage.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
409 Conflict STORAGE_TYPE_ILLEGAL The type of the storage to be attached is illegal. See Storage types.

Restore backup

Restores the origin storage with data from the specified backup storage.

If the origin storage is attached to a server, the server must first be stopped.

Request

POST /1.3/storage/{uuid}/restore HTTP/1.1

Response

HTTP/1.1 204 No Content

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The storage UUID has an invalid value.
400 Bad Request TITLE_INVALID The attribute title has an invalid value.
400 Bad Request TITLE_INVALID The required attribute title is missing from the request.
400 Bad Request ZONE_INVALID The attribute zone has an invalid value.
400 Bad Request ZONE_MISSING The required attribute zone is missing from the request.
402 Payment Required INSUFFICIENT_CREDITS There are not enough credits to perform the requested action. See Credits.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
404 Not Found ZONE_NOT_FOUND The zone does not exist.
409 Conflict SERVER_STATE_ILLEGAL The origin storage is attached to a started server. The server must be stopped in order to revert the storage.
409 Conflict STORAGE_RESOURCES_UNAVAILABLE There were not enough storage resources available in the specified zone to create the storage.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used. See Storage states.
409 Conflict STORAGE_TYPE_ILLEGAL The type of the storage to be attached is illegal. See Storage types.

Add storage to favorites

Adds a storage to the list of favorite storages. To list favorite storages, see List storages. This operations succeeds even if the storage is already on the list of favorites.

Request

POST /1.3/storage/{uuid}/favorite HTTP/1.1

Response

HTTP/1.1 204 No Content

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The storage UUID has an invalid value.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.

Remove storage from favorites

Adds a storage to the list of favorite storages. To list favorite storages, see List storages. This operations succeeds even if the storage is already on the list of favorites.

Request

DELETE /1.3/storage/{uuid}/favorite HTTP/1.1

Response

HTTP/1.1 204 No Content

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The storage UUID has an invalid value.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.

Delete storage

Delete an existing storage resource.

The state of the storage must be online. The storage must not be attached to any server.

Backups of the deleted storage resource are not deleted by default, but passing in the query parameter backups allows them (or all but the latest one) to be deleted with the same request.

Request

DELETE /1.3/storage/{uuid}?backups={backups} HTTP/1.1

Query parameters

Parameter Description Accepted values Default value
backups Controls what to do with backups related to the storages. keep, keep_latest, delete keep

Normal response

HTTP/1.1 204 No Content

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The attribute storage has an invalid value.
400 Bad Request BACKUP_DELETION_POLICY_INVALID The deletion policy for backups is invalid. Allowed values are 'keep', 'keep_latest' and 'delete'.
403 Forbidden STORAGE_FORBIDDEN The storage exists, but is owned by another account.
404 Not Found STORAGE_NOT_FOUND The storage does not exist.
409 Conflict STORAGE_ATTACHED The storage is currently attached to a server.
409 Conflict STORAGE_STATE_ILLEGAL The storage is in a state in which it cannot be used.