Linode Instances

Disk View

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

View Disk information for a Disk associated with this Linode.

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

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

Responses

200: Returns a single Disk object.

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 Disk was created.

updated
string <date-time>

When this Disk was last updated.

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.

size
Filterable
integer

The size of the Disk in MB.

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.

Disk Update

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

Updates a Disk that you have permission to 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.

size
Filterable
integer

The size of the Disk in MB.

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",
  "updated": "2018-01-01T00:01:01",
  "size": 48640,
  "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 Disk was created.

updated
string <date-time>

When this Disk was last updated.

size
Filterable
integer

The size of the Disk in MB.

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.

Disk Delete

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.

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.