Linode Instances
Disk View
https://api.linode.com/v4/linode/instances/{linodeId}/disks/{diskId}
View Disk information for a Disk associated with this Linode.
Path Parameters
ID of the Linode to look up.
ID of the Disk to look up.
Request Samples
- Shell
- CLI
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/disks/25674
Response Samples
- 200
- default
{
"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.
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.
When this Disk was created.
When this Disk was last updated.
This Disk's ID which must be provided for all operations impacting this Disk.
The Disk's label is for display purposes only.
The size of the Disk in MB.
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
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.
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
https://api.linode.com/v4/linode/instances/{linodeId}/disks/{diskId}
Updates a Disk that you have permission to read_write
.
Path Parameters
ID of the Linode to look up.
ID of the Disk to look up.
Request Body Schema
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).
The Disk's label is for display purposes only.
The size of the Disk in MB.
Request Samples
- Shell
- CLI
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
- 200
- default
{
"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.
This Disk's ID which must be provided for all operations impacting this Disk.
The Disk's label is for display purposes only.
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.
When this Disk was created.
When this Disk was last updated.
The size of the Disk in MB.
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
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.
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
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
ID of the Linode to look up.
ID of the Disk to look up.
Request Samples
- Shell
- CLI
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/linode/instances/123/disks/25674
Response Samples
- 200
- default
{}
Responses
200: Delete successful
default: Error
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.
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.