POST /volumes

Creates a new Volume attached to a Server. If you want to create a Volume that is not attached to a Server, you need to provide the location key instead of server. This can be either the ID or the name of the Location this Volume will be created in. Note that a Volume can be attached to a Server only in the same Location as the Volume itself.

Specifying the Server during Volume creation will automatically attach the Volume to that Server after it has been initialized. In that case, the next_actions key in the response is an array which contains a single attach_volume action.

The minimum Volume size is 10GB and the maximum size is 10TB (10240GB).

A volume’s name can consist of alphanumeric characters, dashes, underscores, and dots, but has to start and end with an alphanumeric character. The total length is limited to 64 characters. Volume names must be unique per Project.

Call specific error codes

CodeDescription
no_space_left_in_locationThere is no volume space left in the given location

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
size Integer Yes

Size of the Volume in GB

name String Yes

Name of the volume

format String No

Format Volume after creation. One of: xfs, ext4

labels Object No

User-defined labels (key/value pairs) for the Resource. For more information, see "Labels".

location String No

Location to create the Volume in (can be omitted if Server is specified)

automount Boolean No

Auto-mount Volume after attach. server must be provided.

server Integer No

Server to which to attach the Volume once it's created (Volume will be created in the same Location as the server)

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.