Initrd (initial ramdisk) and actual volumes serve different purposes. An initrd is a file system loaded into memory during the boot process of the instance. Any new files created as well as any modifications made to files in the initrd are lost when the instance is stopped. In contrast, a volume is a persistent storage device that keeps data across restarts. In addition, it can be initialized with a set of files with one instance and then be detached and attached to a another one.
List Volumes
Return the current status and the configuration of one or more volumes specified by either UUID(s) or name(s). If no identifier is provided, all volumes are returned.
query Parameters
detailsbooleanWhether to include details about the volume in the response. By default this is set to true, meaning that all information about the volume will be included in the response. If set to false, only the basic information about the volume will be included, such as its name and UUID.
Request Body
uuidstring · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
namestring · requiredMutually exclusive with UUID.
Example: funky-town-g756b5d
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations
Create Volume
Create a volume given the specified configuration parameters.
The volume is automatically initialized with an empty file system.
After initialization, the volume is in the available state and can be
attached to an instance with the PUT /v1/volumes/attach endpoint.
Note that, the size of a volume cannot be changed after creation.
Request Body
namestringThe name of the volume.
This is a human-readable name that can be used to identify the volume. The name must be unique within the context of your account. If no name is specified, a random name of the form
vol-Xis generated for you, whereXis a 5 character long random alphanumeric suffix.. The name can also be used to identify the volume in API calls.Example: funky-vol-t7qumh5j
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations
Delete Volumes
Delete one or more volumes by their UUID(s) or name(s). If the volumes are still attached to an instance, the operation fails. After this call, the IDs associated with the volumes are no longer valid.
Request Body
uuidstring · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
namestring · requiredMutually exclusive with UUID.
Example: funky-town-g756b5d
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations
Update Volumes
Update one or more volumes specified by either UUID(s) or name(s).
Request Body
propstring · enum · enum · requiredThe property to modify.
Enum values:size_mbtagsquota_policydelete_lockExample: size_mbopstring · enum · enum · requiredThe operation to perform.
Enum values:setadddelExample: set
idstring(Optional). A client-provided identifier for tracking this operation in the response.
Example: op-1uuidstring · uuidThe UUID of the volume to update. Mutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000namestringThe name of the volume to update. Mutually exclusive with UUID.
Example: funky-town-g756b5dvalueThe value for the update operation. The type depends on the property and operation:
- For "size_mb": unsigned integer
- For "quota_policy": 1 - static reservation, 2 - dynamic reservation
- For "tags": array of Strings
- For "delete_lock": boolean
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Attach Volumes
Attach one or more volumes specified by ID(s) (name or UUID) to instances
so that the volumes are mounted when the instances start. The volumes need
to be in available state and the instances must be in stopped state.
Request Body
attach_toobject · requiredUUID or name of the instance to attach the volume to.
atstring · regex · pattern:^/(?!.*\.\./|.*\.$|.…· requiredPath of the mountpoint.
The path must be absolute, not contain
.and..components, and not contain colons (:). The path must point to an empty directory. If the directory does not exist, it is created.Example: /mnt/my-volume
uuidstring · uuidThe UUID of the volume to attach. Mutually exclusive with name. Exactly one of uuid or name must be provided.
Example: c1d2e3f4-5678-90ab-cdef-1234567890abnamestringThe name of the volume to attach. Mutually exclusive with UUID. Exactly one of uuid or name must be provided.
Example: funky-vol-g7gum5cjreadonlybooleanWhether the volume should be mounted read-only.
Example: false
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations
Detach Volumes
Detach volumes specified by ID(s) (name or UUID) from instances. If no particular instance is specified the volume is detached from all instances. The instances from which to detach must not have the volumes mounted. The API returns an error for each instance from which it was unable to detach the volume. If the volume has been created together with an instance, detaching the volume will make it persistent (i.e., it survives the deletion of the instance).
Request Body
uuidstring · uuidThe UUID of the volume to detach. Mutually exclusive with name. Exactly one of uuid or name must be provided.
Example: c1d2e3f4-5678-90ab-cdef-1234567890abnamestringThe name of the volume to detach. Mutually exclusive with UUID. Exactly one of uuid or name must be provided.
Example: funky-town-g7gum5cjfromobjectUUID or name of the instance to detach the volume from.
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations
Get Volume by UUID
Return the current status and the configuration of a particular volume by its UUID.
path Parameters
uuidstring · uuid · requiredThe UUID of the volume to retrieve.
Example: c1d2e3f4-5678-90ab-cdef-1234567890ab
query Parameters
detailsbooleanWhether to include details about the volume in the response. By default this is set to true, meaning that all information about the volume will be included in the response. If set to false, only the basic information about the volume will be included, such as its name and UUID.
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations
Delete Volume by UUID
Delete the specified volume by its UUID. If the volume is still attached to an instance, the operation fails. After this call, the IDs associated with the volume are no longer valid.
path Parameters
uuidstring · uuid · requiredThe UUID of the volume to delete.
Example: c1d2e3f4-5678-90ab-cdef-1234567890ab
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations
Update Volume by UUID
Update the specified volume by its UUID.
path Parameters
uuidstring · uuid · requiredThe UUID of the service group to update.
Example: 123e4567-e89b-12d3-a456-426614174000
Request Body
propstring · enum · enum · requiredThe property to modify.
Enum values:size_mbtagsquota_policydelete_lockExample: size_mbopstring · enum · enum · requiredThe operation to perform.
Enum values:setadddelExample: set
idstring(Optional). A client-provided identifier for tracking this operation in the response.
Example: op-1valueThe value for the update operation. The type depends on the property and operation:
- For "size_mb": unsigned integer
- For "quota_policy": "static" or "dynamic"
- For "tags": array of Strings
- For "delete_lock": boolean
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Attach Volume by UUID
Attach a volume by UUID to an instance so that the volume is mounted when
the instance starts. The volume needs to be in available state and the
instance must be in stopped state.
path Parameters
uuidstring · uuid · requiredThe UUID of the volume to attach.
Example: c1d2e3f4-5678-90ab-cdef-1234567890ab
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations
Detach Volume by UUID
Detaches a volume by UUID from instances. If no particular instance is specified the volume is detached from all instances. The instances from which to detach must not have the volume mounted. The API returns an error for each instance from which it was unable to detach the volume. If the volume has been created together with an instance, detaching the volume will make it persistent (i.e., it survives the deletion of the instance).
path Parameters
uuidstring · uuid · requiredThe UUID of the volume to detach.
Example: c1d2e3f4-5678-90ab-cdef-1234567890ab
Responses
messagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operations