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 four storage devices can be attached to a server at the same time.

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 two tiers: hdd and maxiops. Storage tiers affect both the performance and price of the storage.

HDD storages

Data is stored on hard disks resulting in lower costs than MaxIOPS.

MaxIOPS storages

Data is stored on MaxIOPS storage arrays resulting in highest throughput and lowest response times.

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 sub-accounts. 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.
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.

Requests

GET /1.2/storage
GET /1.2/storage/public
GET /1.2/storage/private
GET /1.2/storage/normal
GET /1.2/storage/backup
GET /1.2/storage/cdrom
GET /1.2/storage/template
GET /1.2/storage/favorite

Normal response

HTTP/1.0 200 OK
{
  "storages": {
    "storage": [
      {
        "access": "private",
        "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",
        "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"
      }
    ]
  }

}

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.2/storage/01d4fcd4-e446-433b-8a9c-551a1284952e

Normal response

HTTP/1.0 200 OK
{
  "storage": {
    "access": "private",
    "backup_rule": "",
    "backups": {
      "backup": []
    },
    "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.2/storage
{
  "storage": {
    "size": "10",
    "tier": "maxiops",
    "title": "My data collection",
    "zone": "fi-hel1",
    "backup_rule": {
      "interval": "daily",
      "time": "0430",
      "retention": "365"
    }
  }
}

Attributes

Attribute Accepted values Default value Required Description
size 10-1024 yes The size of the storage in gigabytes.
tier hdd / maxiops hdd no The storage tied to use. See Storage tiers.
title 0-64 characters yes A short 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.

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.0 201 Created
{
  "storage": {
    "access": "private",
    "backup_rule" [
    "interval": "daily",
    "hour": "0430",
    "retention": "365"
    ],
    "backups": {
      "backup": []
    },
    "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.
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 and the storage needs to be detached from any servers. 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.2/storage/011d671f-e803-484d-920a-c25b4bb05c01
{
  "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 10-1024 no The size of the storage in gigabytes.
title 0-64 characters no A short description.

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.0 202 Accepted
{
  "storage": {
    "access": "private",
    "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.
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.

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

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

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-7] / virtio:[0-7] Next available no The address where the storage device is attached on the server.
storage A valid storage UUID yes if type is disk The UUID of the storage to attach.

Normal response

HTTP/1.0 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",
          "type": "disk"
        }
      ]
    },
    "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 four 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.

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

POST /1.2/server/009d64ef-31d1-4684-a26b-c86c955cbf46/storage/detach
{
  "storage_device": {
    "address": "scsi:0:0",
  }
}

Attributes

Attribute Accepted values Default value Required Description
address "ide:[01]:[01] /scsi:0:[0-7] / virtio:[0-7]" yes Detach the storage attached to this address.

Normal response

HTTP/1.0 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.
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.

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, cdrom or backup can be loaded as a CD-ROM.

Request

POST /1.2/server/00798b85-efdc-41ca-8021-f6ef457b8531/cdrom/load
{
  "storage_device": {
    "storage": "01000000-0000-4000-8000-000060010101"
  }
}

Attributes

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

Normal response

HTTP/1.0 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.2/server/00798b85-efdc-41ca-8021-f6ef457b8531/cdrom/eject

Normal response

HTTP/1.0 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.

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.2/storage/01eff7ad-168e-413e-83b0-054f6a28fa23/clone
{
  "storage": {
    "zone": "fi-hel1",
    "tier": "maxiops",
    "title": "Clone of operating system disk"
  }
}

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 / maxiops hdd no The storage tier to use. See Storage tiers.
title 0-64 characters yes A short description.

Normal response

HTTP/1.0 201 Created
{
  "storage": {
    "access": "private",
    "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.
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 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.2/storage/01f3286c-a5ea-4670-8121-d0b9767d625b/cancel

Normal response

HTTP/1.0 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 succesful.

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. Only maxiops-type storages can be templatized.

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.2/storage/01eff7ad-168e-413e-83b0-054f6a28fa23/templatize
{
  "storage": {
    "title": "My server template"
  }
}

Attributes

Attribute Accepted values Default value Required Description
title 0-64 characters yes A short description.

Normal response

HTTP/1.0 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_INVALID 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.2/storage/01eff7ad-168e-413e-83b0-054f6a28fa23/backup
{
  "storage": {
    "title": "Manually created backup"
  }
}

Attributes

Attribute Accepted values Default value Required Description
title 0-64 characters yes A short description.

Normal response

HTTP/1.0 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.2/storage/01f3286c-a5ea-4670-8121-d0b9767d625b/restore

Response

HTTP/1.0 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.2/storage/01f3286c-a5ea-4670-8121-d0b9767d625b/favorite

Response

HTTP/1.0 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.2/storage/01f3286c-a5ea-4670-8121-d0b9767d625b/favorite

Response

HTTP/1.0 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

Deleted 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 and can be used to restore the deleted storage resource.

Request

DELETE /1.2/storage/01d4fcd4-e446-433b-8a9c-551a1284952e

Normal response

HTTP/1.0 204 No Content

Error responses

HTTP status Error code Description
400 Bad Request STORAGE_INVALID The attribute storage 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.
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.