Volumes v4.78.3

Volumes List

GET https://api.linode.com/v4/volumes

Returns a paginated list of Volumes you have permission to view.

Authorizations

personalAccessToken
oauth volumes:read_only

Query Parameters

page
Type:
integer >= 1
Default:
1

The page of a collection to return.

page_size
Type:
integer 25..100
Default:
100

The number of items to return per page.

Request Samples

Response Samples

Responses

Volume Create

POST https://api.linode.com/v4/volumes

Creates a Volume on your Account. In order for this to complete successfully, your User must have the add_volumes grant. Creating a new Volume will start accruing additional charges on your account.

Authorizations

personalAccessToken
oauth volumes:read_write

Request Body Schema

config_id
integer

When creating a Volume attached to a Linode, the ID of the Linode Config to include the new Volume in. This Config must belong to the Linode referenced by linode_id. Must not be provided if linode_id is not sent. If a linode_id is sent without a config_id, the volume will be attached:

  • to the Linode’s only config if it only has one config.
  • to the Linode’s last used config, if possible.

If no config can be selected for attachment, an error will be returned.

label
string 1..32 characters

The Volume’s label, which is also used in the filesystem_path of the resulting volume.

linode_id
integer

The Linode this volume should be attached to upon creation. If not given, the volume will be created without an attachment.

region
string

The Region to deploy this Volume in. This is only required if a linode_id is not given.

size
integer

The initial size of this volume, in GB. Be aware that volumes may only be resized up after creation.

tags
Filterable
array

An array of Tags applied to this object. Tags are for organizational purposes only.

Request Samples

Response Samples

Responses

Volume Delete

DELETE https://api.linode.com/v4/volumes/{volumeId}

Deletes a Volume you have permission to read_write.

Deleting a Volume is a destructive action and cannot be undone.

Deleting stops billing for the Volume. You will be billed for time used within the billing period the Volume was active.

Authorizations

personalAccessToken
oauth volumes:read_write

Path Parameters

volumeId integer Required

ID of the Volume to look up.

Request Samples

Response Samples

Responses

Volume View

GET https://api.linode.com/v4/volumes/{volumeId}

Get information about a single Volume.

Authorizations

personalAccessToken
oauth volumes:read_only

Path Parameters

volumeId integer Required

ID of the Volume to look up.

Query Parameters

page
Type:
integer >= 1
Default:
1

The page of a collection to return.

page_size
Type:
integer 25..100
Default:
100

The number of items to return per page.

Request Samples

Response Samples

Responses

Volume Update

PUT https://api.linode.com/v4/volumes/{volumeId}

Updates a Volume that you have permission to read_write.

Authorizations

personalAccessToken
oauth volumes:read_write

Path Parameters

volumeId integer Required

ID of the Volume to look up.

Request Body Schema

label
Filterable
Required
string 1..32 characters

The Volume’s label is for display purposes only.

tags
Filterable
array

An array of Tags applied to this object. Tags are for organizational purposes only.

Request Samples

Response Samples

Responses

Volume Attach

POST https://api.linode.com/v4/volumes/{volumeId}/attach

Attaches a Volume on your Account to an existing Linode on your Account. In order for this request to complete successfully, your User must have read_only or read_write permission to the Volume and read_write permission to the Linode. Additionally, the Volume and Linode must be located in the same Region.

Authorizations

personalAccessToken
oauth volumes:read_write,linodes:read_write

Path Parameters

volumeId integer Required

ID of the Volume to attach.

Request Body Schema

config_id
integer

The ID of the Linode Config to include this Volume in. Must belong to the Linode referenced by linode_id. If not given, the last booted Config will be chosen.

linode_id
Nullable
Required
integer

If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here.

persist_across_boots
boolean

Defaults to true, if false is provided, the Volume will not be attached to the Linode Config. In this case more than 8 Volumes may be attached to a Linode if a Linode has 16GB of RAM or more. The number of volumes that can be attached is equal to the number of GB of RAM that the Linode has, up to a maximum of 64. config_id should not be passed if this is set to false and linode_id must be passed. The Linode must be running.

Request Samples

Response Samples

Responses

Volume Clone

POST https://api.linode.com/v4/volumes/{volumeId}/clone

Creates a Volume on your Account. In order for this request to complete successfully, your User must have the add_volumes grant. The new Volume will have the same size and data as the source Volume. Creating a new Volume will incur a charge on your Account.

Authorizations

personalAccessToken
oauth volumes:read_write

Path Parameters

volumeId integer Required

ID of the Volume to clone.

Request Body Schema

label
Filterable
Required
string 1..32 characters

The Volume’s label is for display purposes only.

Request Samples

Response Samples

Responses

Volume Detach

POST https://api.linode.com/v4/volumes/{volumeId}/detach

Detaches a Volume on your Account from a Linode on your Account. In order for this request to complete successfully, your User must have read_write access to the Volume and read_write access to the Linode.

Authorizations

personalAccessToken
oauth volumes:read_write,linodes:read_write

Path Parameters

volumeId integer Required

ID of the Volume to detach.

Request Samples

Response Samples

Responses

Volume Resize

POST https://api.linode.com/v4/volumes/{volumeId}/resize

Resize an existing Volume on your Account. In order for this request to complete successfully, your User must have the read_write permissions to the Volume.

  • Volumes can only be resized up.

Authorizations

personalAccessToken
oauth volumes:read_write

Path Parameters

volumeId integer Required

ID of the Volume to resize.

Request Body Schema

size
Required
integer

The Volume’s size, in GiB.

Request Samples

Response Samples

Responses