Linode Instances

View Disk

get
https://api.linode.com/v4/linode/instances/{linodeId}/disks/{diskId}

View Disk information for a Disk associated with this Linode.

Authorizations

Personal Access Token
OAuth: ( linodes:read_only)

Path Parameters

linodeId
Required
integer

ID of the Linode to look up.

diskId
Required
integer

ID of the Disk to look up.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/linode/instances/123/disks/25674

Response Samples

{
  "id": 1234,
  "created": "2018-01-01T00:01:01",
  "status": "ready",
  "label": "Debian 9 Disk",
  "size": 48640,
  "updated": "2018-01-01T00:01:01",
  "filesystem": "ext4"
}

Responses

200: Returns a single Disk object.

id
integer

This Disk's ID which must be provided for all operations impacting this Disk.

created
string <date-time>

When this Linode was created.

status
string
Enum: "ready""not ready""deleting"

A brief description of this Disk's current state. This field may change without direct action from you, as a result of operations performed to the Disk or the Linode containing the Disk.

label
Filterable
string [1 .. 48] characters

The Disk's label is for display purposes only.

size
Filterable
integer

The size of the Disk in MB.

updated
string <date-time>

When this Linode was last updated.

filesystem
string
Enum: "raw""swap""ext3""ext4""initrd"

The Disk filesystem can be one of:

  • raw - No filesystem, just a raw binary stream.
  • swap - Linux swap area.
  • ext3 - The ext3 journaling filesystem for Linux.
  • ext4 - The ext4 journaling filesystem for Linux.
  • initrd - initrd (uncompressed initrd, ext2, max 32 MB).

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

Update Disk

put
https://api.linode.com/v4/linode/instances/{linodeId}/disks/{diskId}

Updates a Disk that you have permission to read_write.

Authorizations

Personal Access Token
OAuth: ( linodes:read_write)

Path Parameters

linodeId
Required
integer

ID of the Linode to look up.

diskId
Required
integer

ID of the Disk to look up.

Request Body Schema

filesystem
string
Enum: "raw""swap""ext3""ext4""initrd"

The Disk filesystem can be one of:

  • raw - No filesystem, just a raw binary stream.
  • swap - Linux swap area.
  • ext3 - The ext3 journaling filesystem for Linux.
  • ext4 - The ext4 journaling filesystem for Linux.
  • initrd - initrd (uncompressed initrd, ext2, max 32 MB).
label
Filterable
string [1 .. 48] characters

The Disk's label is for display purposes only.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X PUT -d '{
      "label": "Debian 9 Disk"
    }' \
    https://api.linode.com/v4/linode/instances/123/disks/25674

Response Samples

{
  "id": 1234,
  "label": "Debian 9 Disk",
  "status": "ready",
  "created": "2018-01-01T00:01:01",
  "size": 48640,
  "updated": "2018-01-01T00:01:01",
  "filesystem": "ext4"
}

Responses

200: The updated Disk.

id
integer

This Disk's ID which must be provided for all operations impacting this Disk.

label
Filterable
string [1 .. 48] characters

The Disk's label is for display purposes only.

status
string
Enum: "ready""not ready""deleting"

A brief description of this Disk's current state. This field may change without direct action from you, as a result of operations performed to the Disk or the Linode containing the Disk.

created
string <date-time>

When this Linode was created.

size
Filterable
integer

The size of the Disk in MB.

updated
string <date-time>

When this Linode was last updated.

filesystem
string
Enum: "raw""swap""ext3""ext4""initrd"

The Disk filesystem can be one of:

  • raw - No filesystem, just a raw binary stream.
  • swap - Linux swap area.
  • ext3 - The ext3 journaling filesystem for Linux.
  • ext4 - The ext4 journaling filesystem for Linux.
  • initrd - initrd (uncompressed initrd, ext2, max 32 MB).

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

Delete Disk

delete
https://api.linode.com/v4/linode/instances/{linodeId}/disks/{diskId}

Deletes a Disk you have permission to read_write.

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

Authorizations

Personal Access Token
OAuth: ( linodes:read_write)

Path Parameters

linodeId
Required
integer

ID of the Linode to look up.

diskId
Required
integer

ID of the Disk to look up.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    -X DELETE \
    https://api.linode.com/v4/linode/instances/123/disks/25674

Response Samples

{}

Responses

200: Delete successful

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.