Filters
Linode Instances v4.83.1
Linodes List
Returns a paginated list of Linodes you have permission to view.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances
linode-cli linodes list
Response Samples
{
"data": [
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"hypervisor": "kvm",
"id": 123,
"image": null,
"ipv4": [
"123.45.67.890"
],
"ipv6": "c001:d00d::1234",
"label": null,
"region": null,
"specs": {
"disk": 81920,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": null,
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer |
errors | array of objects
|
Linode Create
Creates a Linode Instance on your Account. In order for this
request to complete successfully, your User must have the add_linodes grant. Creating a
new Linode will incur a charge on your Account.
Linodes can be created using one of the available Types. See GET /linode/types to get more information about each Type’s specs and cost.
Linodes can be created in any one of our available Regions for a list of available Regions you can deploy your Linode in.
In an effort to fight spam, Linode restricts outbound connections on ports 25, 465, and 587 on all Linodes for new accounts created after November 5th, 2019. For more information, see Sending Email on Linode.
Linodes can be created in a number of ways:
Using a Linode Linux Distribution image or an Image you created based on another Linode.
- The Linode will be
runningafter it completesprovisioning. - A default config with two Disks, one being a 512 swap disk, is created.
swap_sizecan be used to customize the swap disk size.
- Requires a
root_passbe supplied to use for the root User’s Account. - It is recommended to supply SSH keys for the root User using the
authorized_keysfield. - You may also supply a list of usernames via the
authorized_usersfield.- These users must have an SSH Key associated with your Profile first. See /profile/sshkeys for more information.
- The Linode will be
Using a StackScript.
- See /linode/stackscripts for a list of available StackScripts.
- The Linode will be
runningafter it completesprovisioning. - Requires a compatible Image to be supplied.
- See /linode/stackscript/{stackscriptId} for compatible Images.
- Requires a
root_passbe supplied to use for the root User’s Account. - It is recommended to supply SSH keys for the root User using the
authorized_keysfield. - You may also supply a list of usernames via the
authorized_usersfield.- These users must have an SSH Key associated with your Profile first. See /profile/sshkeys for more information.
Using one of your other Linode’s backups.
- You must create a Linode large enough to accommodate the Backup’s size.
- The Disks and Config will match that of the Linode that was backed up.
- The
root_passwill match that of the Linode that was backed up.
Create an empty Linode.
- The Linode will remain
offlineand must be manually started. - Disks and Configs must be created manually.
- This is only recommended for advanced use cases.
- The Linode will remain
Important: You must be an unrestricted User in order to add or modify tags on Linodes.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Request Body Schema
authorized_keys | array of stringsA list of SSH public keys to deploy for the root user on the newly-created Linode. Only accepted if |
authorized_users | array of stringsA list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root users |
backup_id | integerA Backup ID from another Linode’s available backups. Your User must have
This field and the |
backups_enabled | booleanIf this field is set to This option is always treated as Backup pricing is included in the response from /linodes/types |
booted | booleanWhether to boot this Linode after the deploy is complete. Defaults to true if |
group Filterable | stringA deprecated property denoting a group label for this Linode. |
image | stringAn Image ID to deploy the Disk from. Official Linode Images start with |
label Filterable | The Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
|
private_ip | booleanIf true, the created Linode will have private networking enabled. |
region Required | stringThe Region where the Linode will be located. |
root_pass | string <password>This will set the root user’s password on the newly-created Linode. Linode passwords have the following constraints:
|
stackscript_data | objectAn object containing responses to any User Defined Fields present in the StackScript being deployed to this Linode. Only accepted if |
stackscript_id | integerThe StackScript to deploy to the newly-created Linode. If provided, “image” must also be provided, and must be an Image that is compatible with this StackScript. |
swap_size | integerDefault:
512When deploying from an Image, this field is optional, otherwise it is ignored. This is used to set the swap disk size for the newly-created Linode. |
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. |
type Required | stringThe Linode Type of the Linode you are creating. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"backup_id": 1234,
"backups_enabled": true,
"swap_size": 512,
"image": "linode/debian9",
"root_pass": "aComplexP@ssword",
"stackscript_id": 10079,
"stackscript_data": {
"gh_username": "linode"
},
"authorized_keys": [
"ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
],
"authorized_users": [
"myUser",
"secondaryUser"
],
"booted": true,
"label": "linode123",
"type": "g6-standard-2",
"region": "us-east",
"group": "Linode-Group"
}' \
https://api.linode.com/v4/linode/instances
linode-cli linodes create \
--label linode123 \
--root_pass aComplex@Password \
--booted true \
--stackscript_id 10079 \
--stackscript_data '{"gh_username": "linode"}' \
--region us-east \
--type g6-standard-2 \
--authorized_keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
--authorized_users "myUser"
--authorized_users "secondaryUser"
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"hypervisor": "kvm",
"id": 123,
"image": null,
"ipv4": [
"123.45.67.890"
],
"ipv6": "c001:d00d::1234",
"label": null,
"region": null,
"specs": {
"disk": 81920,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": null,
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
alerts | object
| ||||||||||
backups | objectInformation about this Linode’s backups status. For information about available backups, see /linode/instances/{linodeId}/backups.
| ||||||||||
created | string <date-time>When this Linode was created. | ||||||||||
group Filterable | stringA deprecated property denoting a group label for this Linode. | ||||||||||
hypervisor | stringEnum:
kvmThe virtualization software powering this Linode. | ||||||||||
id Filterable | integerThis Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||
image Filterable Nullable | stringAn Image ID to deploy the Disk from. Official Linode Images start with | ||||||||||
ipv4 | array of stringsThis Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the /networking endpoints for details. | ||||||||||
ipv6 | stringThis Linode’s IPv6 SLAAC addresses. This address is specific to a Linode, and may not be shared. If the Linode has not been assigned an IPv6 address, the return value will be | ||||||||||
label Filterable | string
3..32
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||
region Filterable | stringThis is the location where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||
specs | objectInformation about the resources available to this Linode.
| ||||||||||
status | stringEnum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stoppedA brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||
type | stringThis is the Linode Type that this Linode was deployed with. To change a Linode’s Type, use POST /linode/instances/{linodeId}/resize. | ||||||||||
updated | string <date-time>When this Linode was last updated. | ||||||||||
watchdog_enabled | booleanThe watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array of objects
|
Linode Delete
Deletes a Linode you have permission to read_write.
Deleting a Linode is a destructive action and cannot be undone.
Additionally, deleting a Linode:
- Gives up any IP addresses the Linode was assigned.
- Deletes all Disks, Backups, Configs, etc.
- Stops billing for the Linode and its associated services. You will be billed for time used within the billing period the Linode was active.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/linode/instances/123
linode-cli linodes delete 123
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode View
Get a specific Linode by ID.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123
linode-cli linodes view 123
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"hypervisor": "kvm",
"id": 123,
"image": null,
"ipv4": [
"123.45.67.890"
],
"ipv6": "c001:d00d::1234",
"label": null,
"region": null,
"specs": {
"disk": 81920,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": null,
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
alerts | object
| ||||||||||
backups | objectInformation about this Linode’s backups status. For information about available backups, see /linode/instances/{linodeId}/backups.
| ||||||||||
created | string <date-time>When this Linode was created. | ||||||||||
group Filterable | stringA deprecated property denoting a group label for this Linode. | ||||||||||
hypervisor | stringEnum:
kvmThe virtualization software powering this Linode. | ||||||||||
id Filterable | integerThis Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||
image Filterable Nullable | stringAn Image ID to deploy the Disk from. Official Linode Images start with | ||||||||||
ipv4 | array of stringsThis Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the /networking endpoints for details. | ||||||||||
ipv6 | stringThis Linode’s IPv6 SLAAC addresses. This address is specific to a Linode, and may not be shared. If the Linode has not been assigned an IPv6 address, the return value will be | ||||||||||
label Filterable | string
3..32
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||
region Filterable | stringThis is the location where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||
specs | objectInformation about the resources available to this Linode.
| ||||||||||
status | stringEnum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stoppedA brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||
type | stringThis is the Linode Type that this Linode was deployed with. To change a Linode’s Type, use POST /linode/instances/{linodeId}/resize. | ||||||||||
updated | string <date-time>When this Linode was last updated. | ||||||||||
watchdog_enabled | booleanThe watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array of objects
|
Linode Update
Updates a Linode that you have permission to read_write.
Important: You must be an unrestricted User in order to add or modify tags on Linodes.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up |
Request Body Schema
alerts | object
| ||||||||||
backups | objectInformation about this Linode’s backups status. For information about available backups, see /linode/instances/{linodeId}/backups.
| ||||||||||
group Filterable | stringA deprecated property denoting a group label for this Linode. | ||||||||||
label Filterable | string
3..32
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||
watchdog_enabled | booleanThe watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "linode123",
"group": "Linode-Group",
"alerts": {
"cpu": 180,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80,
"io": 10000
},
"backups": {
"schedule": {
"day": "Saturday",
"window": "W22"
}
}
}' \
https://api.linode.com/v4/linode/instances/123
linode-cli linodes update 7833080 \
--label linode123 \
--backups.schedule.day "Saturday" \
--backups.schedule.window "W22" \
--alerts.cpu 180 \
--alerts.network_in 10 \
--alerts.network_out 10 \
--alerts.transfer_quota 80 \
--alerts.io 10000
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"hypervisor": "kvm",
"id": 123,
"image": null,
"ipv4": [
"123.45.67.890"
],
"ipv6": "c001:d00d::1234",
"label": null,
"region": null,
"specs": {
"disk": 81920,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": null,
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
alerts | object
| ||||||||||
backups | objectInformation about this Linode’s backups status. For information about available backups, see /linode/instances/{linodeId}/backups.
| ||||||||||
created | string <date-time>When this Linode was created. | ||||||||||
group Filterable | stringA deprecated property denoting a group label for this Linode. | ||||||||||
hypervisor | stringEnum:
kvmThe virtualization software powering this Linode. | ||||||||||
id Filterable | integerThis Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||
image Filterable Nullable | stringAn Image ID to deploy the Disk from. Official Linode Images start with | ||||||||||
ipv4 | array of stringsThis Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the /networking endpoints for details. | ||||||||||
ipv6 | stringThis Linode’s IPv6 SLAAC addresses. This address is specific to a Linode, and may not be shared. If the Linode has not been assigned an IPv6 address, the return value will be | ||||||||||
label Filterable | string
3..32
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||
region Filterable | stringThis is the location where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||
specs | objectInformation about the resources available to this Linode.
| ||||||||||
status | stringEnum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stoppedA brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||
type | stringThis is the Linode Type that this Linode was deployed with. To change a Linode’s Type, use POST /linode/instances/{linodeId}/resize. | ||||||||||
updated | string <date-time>When this Linode was last updated. | ||||||||||
watchdog_enabled | booleanThe watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array of objects
|
Backups List
Returns information about this Linode’s available backups.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode the backups belong to. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/backups
linode-cli linodes backups-list 123
Response Samples
{
"automatic": [
null
],
"snapshot": {
"current": {
"configs": [
null
],
"created": "2018-01-15T00:01:01",
"disks": [
{
"filesystem": "ext4",
"label": "My Debian 9 Disk",
"size": 9001
}
],
"finished": "2018-01-15T00:01:01",
"id": 123456,
"label": "Webserver-Backup-2018",
"status": "successful",
"type": "snapshot",
"updated": "2018-01-15T00:01:01"
},
"in_progress": {
"configs": [
null
],
"created": "2018-01-15T00:01:01",
"disks": [
{
"filesystem": "ext4",
"label": "My Debian 9 Disk",
"size": 9001
}
],
"finished": "2018-01-15T00:01:01",
"id": 123456,
"label": "Webserver-Backup-2018",
"status": "successful",
"type": "snapshot",
"updated": "2018-01-15T00:01:01"
}
}
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
automatic | array | ||||||||||||||||||||||||||||||||||||||||||||||||||||
snapshot | object
|
errors | array of objects
|
Snapshot Create
Creates a snapshot Backup of a Linode. ** If you already have a snapshot of this Linode, this is a destructive action. The previous snapshot will be deleted.**
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode the backups belong to. |
Request Body Schema
label Required | string
1..255
characters |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "MyNewSnapshot"
}' \
https://api.linode.com/v4/linode/instances/123/backups
linode-cli linodes snapshot 123
Response Samples
{
"configs": [
null
],
"created": "2018-01-15T00:01:01",
"disks": [
{
"filesystem": "ext4",
"label": "My Debian 9 Disk",
"size": 9001
}
],
"finished": "2018-01-15T00:01:01",
"id": 123456,
"label": "Webserver-Backup-2018",
"status": "successful",
"type": "snapshot",
"updated": "2018-01-15T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
configs | array of stringsA list of the labels of the Configuration profiles that are part of the Backup. | ||||||
created | string <date-time>The date the Backup was taken. | ||||||
disks | array of objectsA list of the disks that are part of the Backup.
| ||||||
finished | string <date-time>The date the Backup completed. | ||||||
id | integerThe unique ID of this Backup. | ||||||
label Nullable | stringA label for Backups that are of type | ||||||
status | stringEnum:
paused
pending
running
needsPostProcessing
successful
failed
userAbortedThe current state of a specific Backup. | ||||||
type | stringEnum:
auto
snapshotThis indicates whether the Backup is an automatic Backup or manual snapshot taken by the User at a specific point in time. | ||||||
updated | string <date-time>The date the Backup was most recently updated. |
errors | array of objects
|
Backups Cancel
Cancels the Backup service on the given Linode. Deletes all of this Linode’s existing backups forever.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode to cancel backup service for. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/backups/cancel
linode-cli linodes backups-cancel 123
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Backups Enable
Enables backups for the specified Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode to enable backup service for. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/backups/enable
linode-cli linodes backups-enable 123
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Backup View
Returns information about a Backup.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode the Backup belongs to. |
| backupId | integerRequiredThe ID of the Backup to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/backups/123456
linode-cli linodes backup-view 123 123456
Response Samples
{
"configs": [
null
],
"created": "2018-01-15T00:01:01",
"disks": [
{
"filesystem": "ext4",
"label": "My Debian 9 Disk",
"size": 9001
}
],
"finished": "2018-01-15T00:01:01",
"id": 123456,
"label": "Webserver-Backup-2018",
"status": "successful",
"type": "snapshot",
"updated": "2018-01-15T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
configs | array of stringsA list of the labels of the Configuration profiles that are part of the Backup. | ||||||
created | string <date-time>The date the Backup was taken. | ||||||
disks | array of objectsA list of the disks that are part of the Backup.
| ||||||
finished | string <date-time>The date the Backup completed. | ||||||
id | integerThe unique ID of this Backup. | ||||||
label Nullable | stringA label for Backups that are of type | ||||||
status | stringEnum:
paused
pending
running
needsPostProcessing
successful
failed
userAbortedThe current state of a specific Backup. | ||||||
type | stringEnum:
auto
snapshotThis indicates whether the Backup is an automatic Backup or manual snapshot taken by the User at a specific point in time. | ||||||
updated | string <date-time>The date the Backup was most recently updated. |
errors | array of objects
|
Backup Restore
Restores a Linode’s Backup to the specified Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode that the Backup belongs to. |
| backupId | integerRequiredThe ID of the Backup to restore. |
Request Body Schema
linode_id Required | integerThe ID of the Linode to restore a Backup to. |
overwrite | booleanIf True, deletes all Disks and Configs on the target Linode before restoring. If False, and the Disk image size is larger than the available space on the Linode, an error message indicating insufficient space is returned. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"linode_id": 234,
"overwrite": true
}' \
https://api.linode.com/v4/linode/instances/123/backups/123456/restore
linode-cli linodes backup-restore 123 123456 \
--linode_id 234 \
--overwrite true
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Boot
Boots a Linode you have permission to modify. If no parameters are given, a Config profile will be chosen for this boot based on the following criteria:
- If there is only one Config profile for this Linode, it will be used.
- If there is more than one Config profile, the last booted config will be used.
- If there is more than one Config profile and none were the last to be booted (because the Linode was never booted or the last booted config was deleted) an error will be returned.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode to boot. |
Request Body Schema
config_id | integerThe Linode Config ID to boot into. If omitted, we will attempt to select a config to use. (This will do the right thing in most cases.) |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/boot
linode-cli linodes boot 123
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Clone
You can clone your Linode’s existing Disks or Configuration profiles to
another Linode on your Account. In order for this request to complete
successfully, your User must have the add_linodes grant. Cloning to a
new Linode will incur a charge on your Account.
If cloning to an existing Linode, any actions currently running or queued must be completed first before you can clone to it.
Up to five clone operations from any given source Linode can be run concurrently. If more concurrent clones are attempted, an HTTP 400 error will be returned by this endpoint.
Any tags existing on the source Linode will be cloned to the target Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to clone. |
Request Body Schema
backups_enabled | booleanIf this field is set to
|
configs | array of integersAn array of configuration profile IDs.
|
disks | array of integersAn array of disk IDs.
|
group | stringA label used to group Linodes for display. Linodes are not required to have a group. |
label | stringThe label to assign this Linode when cloning to a new Linode.
|
linode_id | integerIf an existing Linode is to be the target for the clone, the ID of that Linode. The existing Linode must have enough resources to accept the clone. |
region Required | stringThis is the Region where the Linode will be deployed. To view all available Regions you can deploy to see /regions.
|
type Required | stringA Linode’s Type determines what resources are available to
it, including disk space, memory, and virtual cpus. The
amounts available to a specific Linode are returned as
To view all available Linode Types you can deploy with see /linode/types.
|
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"region": "us-east",
"type": "g6-standard-2",
"linode_id": 124,
"label": "cloned-linode",
"group": "Linode-Group",
"backups_enabled": true,
"disks": [25674],
"configs": [23456]
}' \
https://api.linode.com/v4/linode/instances/123/clone
linode-cli linodes clone 123 \
--linode_id 124 \
--region us-east \
--type g6-standard-2 \
--label cloned-linode \
--backups_enabled true \
--disks 25674 \
--configs 23456
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"hypervisor": "kvm",
"id": 123,
"image": null,
"ipv4": [
"123.45.67.890"
],
"ipv6": "c001:d00d::1234",
"label": null,
"region": null,
"specs": {
"disk": 81920,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": null,
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
alerts | object
| ||||||||||
backups | objectInformation about this Linode’s backups status. For information about available backups, see /linode/instances/{linodeId}/backups.
| ||||||||||
created | string <date-time>When this Linode was created. | ||||||||||
group Filterable | stringA deprecated property denoting a group label for this Linode. | ||||||||||
hypervisor | stringEnum:
kvmThe virtualization software powering this Linode. | ||||||||||
id Filterable | integerThis Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||
image Filterable Nullable | stringAn Image ID to deploy the Disk from. Official Linode Images start with | ||||||||||
ipv4 | array of stringsThis Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the /networking endpoints for details. | ||||||||||
ipv6 | stringThis Linode’s IPv6 SLAAC addresses. This address is specific to a Linode, and may not be shared. If the Linode has not been assigned an IPv6 address, the return value will be | ||||||||||
label Filterable | string
3..32
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||
region Filterable | stringThis is the location where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||
specs | objectInformation about the resources available to this Linode.
| ||||||||||
status | stringEnum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stoppedA brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||
type | stringThis is the Linode Type that this Linode was deployed with. To change a Linode’s Type, use POST /linode/instances/{linodeId}/resize. | ||||||||||
updated | string <date-time>When this Linode was last updated. | ||||||||||
watchdog_enabled | booleanThe watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array of objects
|
Configuration Profiles List
Lists Configuration profiles associated with a Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up Configuration profiles for. |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/configs
linode-cli linodes configs-list 123
Response Samples
{
"data": [
{
"comments": "This is my main Config",
"devices": {
"sda": {
"disk_id": 124458,
"volume_id": null
},
"sdb": {
"disk_id": 124458,
"volume_id": null
},
"sdc": {
"disk_id": 124458,
"volume_id": null
},
"sdd": {
"disk_id": 124458,
"volume_id": null
},
"sde": {
"disk_id": 124458,
"volume_id": null
},
"sdf": {
"disk_id": 124458,
"volume_id": null
},
"sdg": {
"disk_id": 124458,
"volume_id": null
},
"sdh": {
"disk_id": 124458,
"volume_id": null
}
},
"helpers": {
"devtmpfs_automount": false,
"distro": true,
"modules_dep": true,
"network": true,
"updatedb_disabled": true
},
"id": 23456,
"kernel": "linode/latest-64bit",
"label": "My Config",
"memory_limit": 2048,
"root_device": "/dev/sda",
"run_level": "default",
"virt_mode": "paravirt"
}
],
"page": 1,
"pages": 1,
"results": 1
}Responses
data | array of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer |
Configuration Profile Create
Adds a new Configuration profile to a Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up Configuration profiles for. |
Request Body Schema
comments Nullable | stringOptional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices Required | objectA dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | objectHelpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | stringA Kernel ID to boot a Linode with. Defaults to “linode/latest-64bit”. | ||||||||||||||||||||||||||||||||||||||||||||||||
label Filterable Required | string
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | integerDefaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | stringThe root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | stringEnum:
default
single
binbashDefines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | stringEnum:
paravirt
fullvirtControls the virtualization mode. Defaults to
|
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"kernel": "linode/latest-64bit",
"comments": "This is my main Config",
"memory_limit": 2048,
"run_level": "default",
"virt_mode": "paravirt",
"helpers": {
"updatedb_disabled": true,
"distro": true,
"modules_dep": true,
"network": true,
"devtmpfs_automount": false
},
"label": "My Config",
"devices": {
"sda": {
"disk_id": 123456,
"volume_id": null
},
"sdb": {
"disk_id": 123457,
"volume_id": null
}
}
}' \
https://api.linode.com/v4/linode/instances/123/configs
linode-cli linodes config-create 7590910 \
--label "My Config" \
--devices.sda.disk_id 123456 \
--devices.sdb.disk_id 123457
Response Samples
{
"comments": "This is my main Config",
"devices": {
"sda": {
"disk_id": 124458,
"volume_id": null
},
"sdb": {
"disk_id": 124458,
"volume_id": null
},
"sdc": {
"disk_id": 124458,
"volume_id": null
},
"sdd": {
"disk_id": 124458,
"volume_id": null
},
"sde": {
"disk_id": 124458,
"volume_id": null
},
"sdf": {
"disk_id": 124458,
"volume_id": null
},
"sdg": {
"disk_id": 124458,
"volume_id": null
},
"sdh": {
"disk_id": 124458,
"volume_id": null
}
},
"helpers": {
"devtmpfs_automount": false,
"distro": true,
"modules_dep": true,
"network": true,
"updatedb_disabled": true
},
"id": 23456,
"kernel": "linode/latest-64bit",
"label": "My Config",
"memory_limit": 2048,
"root_device": "/dev/sda",
"run_level": "default",
"virt_mode": "paravirt"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
comments Nullable | stringOptional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices Required | objectA dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | objectHelpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
id | integerThe ID of this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | stringA Kernel ID to boot a Linode with. Defaults to “linode/latest-64bit”. | ||||||||||||||||||||||||||||||||||||||||||||||||
label Filterable Required | string
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | integerDefaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | stringThe root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | stringEnum:
default
single
binbashDefines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | stringEnum:
paravirt
fullvirtControls the virtualization mode. Defaults to
|
errors | array of objects
|
Configuration Profile Delete
Deletes the specified Configuration profile from the specified Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode whose Configuration profile to look up. |
| configId | integerRequiredThe ID of the Configuration profile to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/linode/instances/123/configs/23456
linode-cli linodes config-delete 123 23456
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Configuration Profile View
Returns information about a specific Configuration profile.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode whose Configuration profile to look up. |
| configId | integerRequiredThe ID of the Configuration profile to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/configs/23456
linode-cli linodes config-view 123 23456
Response Samples
{
"comments": "This is my main Config",
"devices": {
"sda": {
"disk_id": 124458,
"volume_id": null
},
"sdb": {
"disk_id": 124458,
"volume_id": null
},
"sdc": {
"disk_id": 124458,
"volume_id": null
},
"sdd": {
"disk_id": 124458,
"volume_id": null
},
"sde": {
"disk_id": 124458,
"volume_id": null
},
"sdf": {
"disk_id": 124458,
"volume_id": null
},
"sdg": {
"disk_id": 124458,
"volume_id": null
},
"sdh": {
"disk_id": 124458,
"volume_id": null
}
},
"helpers": {
"devtmpfs_automount": false,
"distro": true,
"modules_dep": true,
"network": true,
"updatedb_disabled": true
},
"id": 23456,
"kernel": "linode/latest-64bit",
"label": "My Config",
"memory_limit": 2048,
"root_device": "/dev/sda",
"run_level": "default",
"virt_mode": "paravirt"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
comments Nullable | stringOptional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices Required | objectA dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | objectHelpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
id | integerThe ID of this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | stringA Kernel ID to boot a Linode with. Defaults to “linode/latest-64bit”. | ||||||||||||||||||||||||||||||||||||||||||||||||
label Filterable Required | string
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | integerDefaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | stringThe root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | stringEnum:
default
single
binbashDefines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | stringEnum:
paravirt
fullvirtControls the virtualization mode. Defaults to
|
errors | array of objects
|
Configuration Profile Update
Updates a Configuration profile.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode whose Configuration profile to look up. |
| configId | integerRequiredThe ID of the Configuration profile to look up. |
Request Body Schema
comments Nullable | stringOptional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices Required | objectA dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | objectHelpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | stringA Kernel ID to boot a Linode with. Defaults to “linode/latest-64bit”. | ||||||||||||||||||||||||||||||||||||||||||||||||
label Filterable Required | string
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | integerDefaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | stringThe root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | stringEnum:
default
single
binbashDefines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | stringEnum:
paravirt
fullvirtControls the virtualization mode. Defaults to
|
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"kernel": "linode/latest-64bit",
"comments": "This is my main Config",
"memory_limit": 2048,
"run_level": "default",
"virt_mode": "paravirt",
"helpers": {
"updatedb_disabled": true,
"distro": true,
"modules_dep": true,
"network": true,
"devtmpfs_automount": false
},
"label": "My Config",
"devices": {
"sda": {
"disk_id": 123456,
"volume_id": null
},
"sdb": {
"disk_id": 123457,
"volume_id": null
}
}
}' \
https://api.linode.com/v4/linode/instances/123/configs/23456
linode-cli linodes config-update 123 23456 \
--kernel "linode/latest-64bit" \
--comments "This is my main Config" \
--memory_limit 2048 \
--run_level default \
--virt_mode paravirt \
--helpers.updatedb_disabled true \
--helpers.distro true \
--helpers.modules_dep true \
--helpers.network true \
--helpers.devtmpfs_automount false \
--label "My Config" \
--devices.sda.disk_id 123456 \
--devices.sdb.disk_id 123457
Response Samples
{
"comments": "This is my main Config",
"devices": {
"sda": {
"disk_id": 124458,
"volume_id": null
},
"sdb": {
"disk_id": 124458,
"volume_id": null
},
"sdc": {
"disk_id": 124458,
"volume_id": null
},
"sdd": {
"disk_id": 124458,
"volume_id": null
},
"sde": {
"disk_id": 124458,
"volume_id": null
},
"sdf": {
"disk_id": 124458,
"volume_id": null
},
"sdg": {
"disk_id": 124458,
"volume_id": null
},
"sdh": {
"disk_id": 124458,
"volume_id": null
}
},
"helpers": {
"devtmpfs_automount": false,
"distro": true,
"modules_dep": true,
"network": true,
"updatedb_disabled": true
},
"id": 23456,
"kernel": "linode/latest-64bit",
"label": "My Config",
"memory_limit": 2048,
"root_device": "/dev/sda",
"run_level": "default",
"virt_mode": "paravirt"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
comments Nullable | stringOptional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices Required | objectA dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | objectHelpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
id | integerThe ID of this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | stringA Kernel ID to boot a Linode with. Defaults to “linode/latest-64bit”. | ||||||||||||||||||||||||||||||||||||||||||||||||
label Filterable Required | string
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | integerDefaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | stringThe root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | stringEnum:
default
single
binbashDefines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | stringEnum:
paravirt
fullvirtControls the virtualization mode. Defaults to
|
errors | array of objects
|
Disks List
View Disk information for Disks associated with this Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/disks
linode-cli linodes disks-list 123
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"filesystem": "ext4",
"id": 25674,
"label": "Debian 9 Disk",
"size": 48640,
"status": "ready",
"updated": "2018-01-01T00:01:01"
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||||||||
page | integer | ||||||||||||||
pages | integer | ||||||||||||||
results | integer |
errors | array of objects
|
Disk Create
Adds a new Disk to a Linode. You can optionally create a Disk from an Image (see /images for a list of available public images, or use one of your own), and optionally provide a StackScript to deploy with this Disk.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
Request Body Schema
authorized_keys | array of stringsA list of public SSH keys that will be automatically appended to the root user’s |
authorized_users | array of stringsA list of usernames that will have their SSH keys, if any, automatically appended to the root user’s |
filesystem | stringEnum:
raw
swap
ext3
ext4
initrdThe Disk filesystem can be one of:
|
image | stringAn Image ID to deploy the Disk from. Official Linode Images start with |
label Filterable Required | string
1..48
charactersThe Disk’s label is for display purposes only. |
read_only | booleanIf true, this Disk is read-only. |
root_pass | string <password>This will set the root user’s password on the newly-created Linode. Linode passwords have the following constraints:
|
size Filterable Required | integer |
stackscript_data | objectThis field is required only if the StackScript being deployed requires input data from the User for successful completion. See Variables and UDFs for more details. This field is required to be valid JSON. |
stackscript_id | integerA StackScript ID that will cause the referenced StackScript to be run during
deployment of this Linode. A compatible |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "Debian 9 Disk",
"image": "linode/debian9",
"size": 1300,
"authorized_keys": [
"ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
],
"authorized_users": [
"myUser",
"secondaryUser"
],
"root_pass": "aComplexP@ssword",
"stackscript_id": 10079,
"stackscript_data": {
"gh_username": "linode"
}
}' \
https://api.linode.com/v4/linode/instances/123/disks
linode-cli linodes disk-create 123 \
--size 1300 \
--authorized_keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer" \
--authorized_users "myUser" \
--authorized_users "secondaryUser" \
--root_pass aComplex@Password \
--image "linode/debian9" \
--stackscript_id 10079 \
--stackscript_data '{"gh_username": "linode"}'
Response Samples
{
"created": "2018-01-01T00:01:01",
"filesystem": "ext4",
"id": 25674,
"label": "Debian 9 Disk",
"size": 48640,
"status": "ready",
"updated": "2018-01-01T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created | string <date-time>When this Disk was created. |
filesystem | stringEnum:
raw
swap
ext3
ext4
initrdThe Disk filesystem can be one of:
|
id | integerThis Disk’s ID which must be provided for all operations impacting this Disk. |
label Filterable | string
1..48
charactersThe Disk’s label is for display purposes only. |
size Filterable | integerThe size of the Disk in MB. |
status | stringEnum:
ready
not ready
deletingA 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. |
updated | string <date-time>When this Disk was last updated. |
errors | array of objects
|
Disk Delete
Deletes a Disk you have permission to read_write.
Deleting a Disk is a destructive action and cannot be undone.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
| diskId | integerRequiredID 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
linode-cli linodes disk-delete 123 24674
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Disk View
View Disk information for a Disk associated with this Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
| diskId | integerRequiredID of the Disk to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/disks/25674
linode-cli linodes disk-view 123 25674
Response Samples
{
"created": "2018-01-01T00:01:01",
"filesystem": "ext4",
"id": 25674,
"label": "Debian 9 Disk",
"size": 48640,
"status": "ready",
"updated": "2018-01-01T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created | string <date-time>When this Disk was created. |
filesystem | stringEnum:
raw
swap
ext3
ext4
initrdThe Disk filesystem can be one of:
|
id | integerThis Disk’s ID which must be provided for all operations impacting this Disk. |
label Filterable | string
1..48
charactersThe Disk’s label is for display purposes only. |
size Filterable | integerThe size of the Disk in MB. |
status | stringEnum:
ready
not ready
deletingA 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. |
updated | string <date-time>When this Disk was last updated. |
errors | array of objects
|
Disk Update
Updates a Disk that you have permission to read_write.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
| diskId | integerRequiredID of the Disk to look up. |
Request Body Schema
filesystem | stringEnum:
raw
swap
ext3
ext4
initrdThe Disk filesystem can be one of:
|
label Filterable | string
1..48
charactersThe 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
linode-cli linodes disk-update 123 25674 \
--label "Debian 9 Disk"
Response Samples
{
"created": "2018-01-01T00:01:01",
"filesystem": "ext4",
"id": 25674,
"label": "Debian 9 Disk",
"size": 48640,
"status": "ready",
"updated": "2018-01-01T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created | string <date-time>When this Disk was created. |
filesystem | stringEnum:
raw
swap
ext3
ext4
initrdThe Disk filesystem can be one of:
|
id | integerThis Disk’s ID which must be provided for all operations impacting this Disk. |
label Filterable | string
1..48
charactersThe Disk’s label is for display purposes only. |
size Filterable | integerThe size of the Disk in MB. |
status | stringEnum:
ready
not ready
deletingA 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. |
updated | string <date-time>When this Disk was last updated. |
errors | array of objects
|
Disk Clone
Copies a disk, byte-for-byte, into a new Disk belonging to the same Linode. The Linode must have enough storage space available to accept a new Disk of the same size as this one or this operation will fail.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
| diskId | integerRequiredID of the Disk to clone. |
Response Samples
{
"created": "2018-01-01T00:01:01",
"filesystem": "ext4",
"id": 25674,
"label": "Debian 9 Disk",
"size": 48640,
"status": "ready",
"updated": "2018-01-01T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created | string <date-time>When this Disk was created. |
filesystem | stringEnum:
raw
swap
ext3
ext4
initrdThe Disk filesystem can be one of:
|
id | integerThis Disk’s ID which must be provided for all operations impacting this Disk. |
label Filterable | string
1..48
charactersThe Disk’s label is for display purposes only. |
size Filterable | integerThe size of the Disk in MB. |
status | stringEnum:
ready
not ready
deletingA 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. |
updated | string <date-time>When this Disk was last updated. |
errors | array of objects
|
Disk Root Password Reset
Resets the password of a Disk you have permission to read_write.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
| diskId | integerRequiredID of the Disk to look up. |
Request Body Schema
password Required | stringThe new root password for the OS installed on this Disk. The password must meet the complexity strength validation requirements for a strong password. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"password": "another@complex^Password123"
}' \
https://api.linode.com/v4/linode/instances/123/disks/25674/password
linode-cli linodes disk-reset-password \
123 25674 \
--password aComplex@Password
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Disk Resize
Resizes a Disk you have permission to read_write.
The Linode this Disk is attached to must be shut down for resizing to take effect.
If you are resizing the Disk to a smaller size, it cannot be made smaller than what is required by the total size of the files current on the Disk. The Disk must not be in use. If the Disk is in use, the request will succeed but the resize will ultimately fail.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
| diskId | integerRequiredID of the Disk to look up. |
Request Body Schema
size | integer
>= 1The desired size, in MB, of the disk. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"size": 2048
}' \
https://api.linode.com/v4/linode/instances/123/disks/25674/resize
linode-cli linodes disk-resize 123 25674 \
--size 2048
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Networking Information List
Returns networking information for a single Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
Request Samples
curl -H "Content-Type: application/json" \
https://api.linode.com/v4/linode/instances/123/ips
linode-cli linodes 123 ips-list
Response Samples
{
"ipv4": {
"private": [
{
"address": "192.168.133.234",
"gateway": null,
"linode_id": 123,
"prefix": 17,
"public": false,
"rdns": null,
"region": "us-east",
"subnet_mask": "255.255.128.0",
"type": "ipv4"
}
],
"public": [
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}
],
"reserved": [
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}
],
"shared": [
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}
]
},
"ipv6": {
"global": {
"prefix": 124,
"range": "2600:3c01::2:5000:0",
"region": "us-east",
"route_target": "2600:3c01::2:5000:f"
},
"link_local": {
"address": "fe80::f03c:91ff:fe24:3a2f",
"gateway": "fe80::1",
"linode_id": 123,
"prefix": 64,
"public": false,
"rdns": null,
"region": "us-east",
"subnet_mask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
"type": "ipv6"
},
"slaac": {
"address": "2600:3c03::f03c:91ff:fe24:3a2f",
"gateway": "fe80::1",
"linode_id": 123,
"prefix": 64,
"public": true,
"rdns": null,
"region": "us-east",
"subnet_mask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
"type": "ipv6"
}
}
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
ipv4 | objectInformation about this Linode’s IPv4 addresses.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipv6 | objectInformation about this Linode’s IPv6 addresses.
|
errors | array of objects
|
IPv4 Address Allocate
Allocates a public or private IPv4 address to a Linode. Public IP Addresses, after the one included with each Linode, incur an additional monthly charge. If you need an additional public IP Address you must request one - please open a support ticket. You may not add more than one private IPv4 address to a single Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
Request Body Schema
public Required | booleanWhether to create a public or private IPv4 address. |
type Required | stringEnum:
ipv4The type of address you are allocating. Only IPv4 addresses may be allocated through this endpoint. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"type": "ipv4",
"public": true
}' \
https://api.linode.com/v4/linode/instances/123/ips
linode-cli linodes ip-add 123 \
--type ipv4 \
--public true
Response Samples
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
address | string <ip>The IP address. |
gateway Nullable | string <ip>The default gateway for this address. |
linode_id | integerThe ID of the Linode this address currently belongs to. For IPv4 addresses, this is by default the Linode that this address was assigned to on creation, and these addresses my be moved using the /networking/ipv4/assign endpoint. For SLAAC and link-local addresses, this value may not be changed. |
prefix | integerThe number of bits set in the subnet mask. |
public | booleanWhether this is a public or private IP address. |
rdns | stringThe reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set. |
region Filterable | stringThe Region this IP address resides in. |
subnet_mask | string <ip>The mask that separates host bits from network bits for this address. |
type | stringEnum:
ipv4
ipv6
ipv6/pool
ipv6/rangeThe type of address this is. |
errors | array of objects
|
IPv4 Address Delete
Deletes a public IPv4 address associated with this Linode. This will fail if it is the Linode’s last remaining public IPv4 address. Private IPv4 addresses cannot be removed via this endpoint.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode to look up. |
| address | string <ip>RequiredThe IP address to look up. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/linode/instances/123/ips/97.107.143.141
linode-cli linodes ip-delete 97.107.143.141
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
IP Address View
View information about the specified IP address associated with the specified Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode to look up. |
| address | string <ip>RequiredThe IP address to look up. |
Request Samples
curl -H "Content-Type: application/json" \
https://api.linode.com/v4/linode/instances/123/ips/97.107.143.141
linode-cli linodes ip-view 123 97.107.143.141
Response Samples
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
address | string <ip>The IP address. |
gateway Nullable | string <ip>The default gateway for this address. |
linode_id | integerThe ID of the Linode this address currently belongs to. For IPv4 addresses, this is by default the Linode that this address was assigned to on creation, and these addresses my be moved using the /networking/ipv4/assign endpoint. For SLAAC and link-local addresses, this value may not be changed. |
prefix | integerThe number of bits set in the subnet mask. |
public | booleanWhether this is a public or private IP address. |
rdns | stringThe reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set. |
region Filterable | stringThe Region this IP address resides in. |
subnet_mask | string <ip>The mask that separates host bits from network bits for this address. |
type | stringEnum:
ipv4
ipv6
ipv6/pool
ipv6/rangeThe type of address this is. |
errors | array of objects
|
IP Address Update
Updates a particular IP Address associated with this Linode. Only allows setting/resetting reverse DNS.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredThe ID of the Linode to look up. |
| address | string <ip>RequiredThe IP address to look up. |
Request Body Schema
rdns | stringThe reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"rdns": "test.example.org"
}' \
https://api.linode.com/v4/linode/instances/123/ips/97.107.143.141
linode-cli linodes ip-update 123 \
97.107.143.141 \
--rdns test.example.org
Response Samples
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
address | string <ip>The IP address. |
gateway Nullable | string <ip>The default gateway for this address. |
linode_id | integerThe ID of the Linode this address currently belongs to. For IPv4 addresses, this is by default the Linode that this address was assigned to on creation, and these addresses my be moved using the /networking/ipv4/assign endpoint. For SLAAC and link-local addresses, this value may not be changed. |
prefix | integerThe number of bits set in the subnet mask. |
public | booleanWhether this is a public or private IP address. |
rdns | stringThe reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set. |
region Filterable | stringThe Region this IP address resides in. |
subnet_mask | string <ip>The mask that separates host bits from network bits for this address. |
type | stringEnum:
ipv4
ipv6
ipv6/pool
ipv6/rangeThe type of address this is. |
errors | array of objects
|
DC Migration/Pending Host Migration Initiate
Initiate a pending host migration that has been scheduled by Linode or initiate a cross data center (DC) migration. A list of pending migrations, if any, can be accessed from GET /account/notifications. When the migration begins, your Linode will be shutdown if not already off. If the migration initiated the shutdown, it will reboot the Linode when completed.
To initiate a cross DC migration, you must pass a region parameter to the request body specifying the target data center region. You can view a list of all available regions and their feature capabilities from
GET /regions. If your Linode has a DC migration already queued or you have initiated a previously scheduled migration, you will not be able to initiate a DC migration until it has completed.
Note: Next Generation Network (NGN) data centers do not support IPv6 /116 pools or IP Failover. If you have these features enabled on your Linode and attempt to migrate to an NGN data center, the migration will not initiate. If a Linode cannot be migrated because of an incompatibility, you will be prompted to select a different data center or contact support.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to migrate. |
Request Body Schema
region | stringThe region to which the Linode will be migrated. Must be a valid region slug. A list of regions can be viewed by using the
GET /regions endpoint. A cross data center migration will cancel a pending migration that has not yet been initiated.
A cross data center migration will initiate a |
upgrade | booleanWhen initiating a cross DC migration, setting this value to true will also ensure that the Linode is upgraded to the latest generation of hardware that corresponds to your Linode’s Type, if any free upgrades are available for it.
If no free upgrades are available, and this value is set to true, then the endpoint will return a 400 error code and the migration will not be performed.
If the data center set in the |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"region": "us-central"
}' \
https://api.linode.com/v4/linode/instances/123/migrate
linode-cli linodes migrate 123 --region us-central
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Upgrade
Linodes created with now-deprecated Types are entitled to a free upgrade to the next generation. A mutating Linode will be allocated any new resources the upgraded Type provides, and will be subsequently restarted if it was currently running. If any actions are currently running or queued, those actions must be completed first before you can initiate a mutate.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to mutate. |
Request Body Schema
allow_auto_disk_resize | booleanDefault:
trueAutomatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s data must fit within the smaller disk size. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/mutate
linode-cli linodes upgrade 123
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Root Password Reset
Resets the root password for this Linode.
- Your Linode must be shut down for a password reset to complete.
- If your Linode has more than one disk (not counting its swap disk), use the Reset Disk Root Password endpoint to update a specific disk’s root password.
- A
password_resetevent is generated when a root password reset is successful.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode for which to reset its root password. |
Request Body Schema
root_pass Required | stringThe root user’s password on this Linode. Linode passwords must meet a password strength score requirement that is calculated internally by the API. If the strength requirement is not met, you will receive a Password does not meet strength requirement error. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"root_pass": "a$eCure4assw0rd!43v51"
}' \
https://api.linode.com/v4/linode/instances/123/password
linode-cli linodes linode-reset-password 123 a$eCure4assw0rd!43v51
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Reboot
Reboots a Linode you have permission to modify. If any actions are currently running or queued, those actions must be completed first before you can initiate a reboot.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the linode to reboot. |
Request Body Schema
config_id | integerThe Linode Config ID to reboot into. If null or omitted, the last booted config will be used. If there was no last booted config and this Linode only has one config, it will be used. If a config cannot be determined, an error will be returned. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/reboot
linode-cli linodes reboot 123
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Rebuild
Rebuilds a Linode you have the read_write permission to modify.
A rebuild will first shut down the Linode, delete all disks and configs on the Linode, and then deploy a new image to the Linode with the given attributes. Additionally:
- Requires an
imagebe supplied. - Requires a
root_passbe supplied to use for the root User’s Account. - It is recommended to supply SSH keys for the root User using the
authorized_keysfield.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to rebuild. |
Request Body Schema
authorized_keys | array of stringsA list of public SSH keys that will be automatically appended to the root user’s |
authorized_users | array of stringsA list of usernames that will have their SSH keys, if any, automatically appended to the root user’s |
booted | booleanThis field defaults to |
image Required | stringAn Image ID to deploy the Disk from. Official Linode Images start with |
root_pass Required | string <password>This will set the root user’s password on the newly-created Linode. Linode passwords have the following constraints:
|
stackscript_data | objectThis field is required only if the StackScript being deployed requires input data from the User for successful completion. See Variables and UDFs for more details. This field is required to be valid JSON. |
stackscript_id | integerA StackScript ID that will cause the referenced StackScript to be run during
deployment of this Linode. A compatible |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"image": "linode/debian9",
"root_pass": "aComplexP@ssword",
"authorized_keys": [
"ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
],
"authorized_users": [
"myUsername",
"secondaryUsername"
],
"booted": true,
"stackscript_id": 10079,
"stackscript_data": {
"gh_username": "linode"
}
}' \
https://api.linode.com/v4/linode/instances/123/rebuild
linode-cli linodes rebuild 123 \
--image "linode/debian9" \
--root_pass aComplex@Password \
--authorized_keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer" \
--authorized_users "myUsername" \
--authorized_users "secondaryUsername" \
--booted true \
--stackscript_id 10079 \
--stackscript_data '{"gh_username": "linode"}'
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"hypervisor": "kvm",
"id": 123,
"image": null,
"ipv4": [
"123.45.67.890"
],
"ipv6": "c001:d00d::1234",
"label": null,
"region": null,
"specs": {
"disk": 81920,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": null,
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
alerts | object
| ||||||||||
backups | objectInformation about this Linode’s backups status. For information about available backups, see /linode/instances/{linodeId}/backups.
| ||||||||||
created | string <date-time>When this Linode was created. | ||||||||||
group Filterable | stringA deprecated property denoting a group label for this Linode. | ||||||||||
hypervisor | stringEnum:
kvmThe virtualization software powering this Linode. | ||||||||||
id Filterable | integerThis Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||
image Filterable Nullable | stringAn Image ID to deploy the Disk from. Official Linode Images start with | ||||||||||
ipv4 | array of stringsThis Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the /networking endpoints for details. | ||||||||||
ipv6 | stringThis Linode’s IPv6 SLAAC addresses. This address is specific to a Linode, and may not be shared. If the Linode has not been assigned an IPv6 address, the return value will be | ||||||||||
label Filterable | string
3..32
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||
region Filterable | stringThis is the location where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||
specs | objectInformation about the resources available to this Linode.
| ||||||||||
status | stringEnum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stoppedA brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||
type | stringThis is the Linode Type that this Linode was deployed with. To change a Linode’s Type, use POST /linode/instances/{linodeId}/resize. | ||||||||||
updated | string <date-time>When this Linode was last updated. | ||||||||||
watchdog_enabled | booleanThe watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array of objects
|
Linode Boot into Rescue Mode
Rescue Mode is a safe environment for performing many system recovery and disk management tasks. Rescue Mode is based on the Finnix recovery distribution, a self-contained and bootable Linux distribution. You can also use Rescue Mode for tasks other than disaster recovery, such as formatting disks to use different filesystems, copying data between disks, and downloading files from a disk via SSH and SFTP.
- Note that “sdh” is reserved and unavailable during rescue.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to rescue. |
Request Body Schema
devices | object
|
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"devices": {
"sda": {
"disk_id": 124458,
"volume_id": null
},
"sdb": {
"disk_id": null,
"volume_id": null
}
}
}' \
https://api.linode.com/v4/linode/instances/123/rescue
linode-cli linodes rescue 123 \
--devices.sda.disk_id 124458
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Resize
Resizes a Linode you have the read_write permission to a different Type. If any actions are currently running or queued, those actions must be completed first before you can initiate a resize. Additionally, the following criteria must be met in order to resize a Linode:
- The Linode must not have a pending migration.
- Your Account cannot have an outstanding balance.
- The Linode must not have more disk allocation than the new Type allows.
- In that situation, you must first delete or resize the disk to be smaller.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to resize. |
Request Body Schema
allow_auto_disk_resize | booleanDefault:
trueAutomatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s data must fit within the smaller disk size. |
type Required | stringThe ID representing the Linode Type. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"type": "g6-standard-2"
}' \
https://api.linode.com/v4/linode/instances/123/resize
linode-cli linodes resize 123 \
--type g6-standard-2
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Shut Down
Shuts down a Linode you have permission to modify. If any actions are currently running or queued, those actions must be completed first before you can initiate a shutdown.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_write |
Path Parameters
| linodeId | integerRequiredID of the Linode to shutdown. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/shutdown
linode-cli linodes shutdown 123
Response Samples
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Linode Statistics View
Returns CPU, IO, IPv4, and IPv6 statistics for your Linode for the past 24 hours.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/stats
Response Samples
{
"cpu": [
null
],
"io": {
"io": [
null
],
"swap": [
null
]
},
"netv4": {
"in": [
null
],
"out": [
null
],
"private_in": [
null
],
"private_out": [
null
]
},
"netv6": {
"in": [
null
],
"out": [
null
],
"private_in": [
null
],
"private_out": [
null
]
},
"title": "linode.com - my-linode (linode123456) - day (5 min avg)"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
cpu | array of arraysPercentage of CPU used. | ||||||||
io | objectInput/Output statistics.
| ||||||||
netv4 | objectIPv4 statistics.
| ||||||||
netv6 | objectIPv6 statistics.
| ||||||||
title | stringThe title for this data set. |
errors | array of objects
|
Statistics View (year/month)
Returns statistics for a specific month. The year/month values must be either a date in the past, or the current month. If the current month, statistics will be retrieved for the past 30 days.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
| year | integerRequiredNumeric value representing the year to look up. |
| month | integer
1..12RequiredNumeric value representing the month to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/stats/2018/01
Response Samples
{
"cpu": [
null
],
"io": {
"io": [
null
],
"swap": [
null
]
},
"netv4": {
"in": [
null
],
"out": [
null
],
"private_in": [
null
],
"private_out": [
null
]
},
"netv6": {
"in": [
null
],
"out": [
null
],
"private_in": [
null
],
"private_out": [
null
]
},
"title": "linode.com - my-linode (linode123456) - day (5 min avg)"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
cpu | array of arraysPercentage of CPU used. | ||||||||
io | objectInput/Output statistics.
| ||||||||
netv4 | objectIPv4 statistics.
| ||||||||
netv6 | objectIPv6 statistics.
| ||||||||
title | stringThe title for this data set. |
errors | array of objects
|
Network Transfer View
Returns a Linode’s network transfer pool statistics for the current month.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/transfer
linode-cli linodes transfer-view 123
Response Samples
{
"billable": 0,
"quota": 2000,
"used": 22956600198
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
billable | integerThe amount of network transfer this Linode has used, in GB, past your monthly quota. |
quota | integerThe amount of network transfer this Linode adds to your transfer pool, in GB, for the current month’s billing cycle. |
used | integerThe amount of network transfer used by this Linode, in bytes, for the current month’s billing cycle. |
errors | array of objects
|
Network Transfer View (year/month)
Returns a Linode’s network transfer statistics for a specific month. The year/month values must be either a date in the past, or the current month.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
| year | integer
2000..2037RequiredNumeric value representing the year to look up. |
| month | integer
1..12RequiredNumeric value representing the month to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/transfer/2018/01
Response Samples
{
"bytes_in": 30471077120,
"bytes_out": 22956600198,
"bytes_total": 53427677318
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
bytes_in | integerThe amount of inbound public network traffic received by this Linode, in bytes, for a specific year/month. |
bytes_out | integerThe amount of outbound public network traffic sent by this Linode, in bytes, for a specific year/month. |
bytes_total | integerThe total amount of public network traffic sent and received by this Linode, in bytes, for a specific year/month. |
errors | array of objects
|
Linode's Volumes List
View Block Storage Volumes attached to this Linode.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Path Parameters
| linodeId | integerRequiredID of the Linode to look up. |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/volumes
linode-cli linode volumes 123
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"filesystem_path": "/dev/disk/by-id/scsi-0Linode_Volume_my-volume",
"id": 12345,
"label": "my-volume",
"linode_id": 12346,
"linode_label": "linode123",
"region": "us-east",
"size": 30,
"status": "active",
"tags": [
"example tag",
"another example"
],
"updated": "2018-01-01T00:01:01"
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||||||||||||||||
page | integer | ||||||||||||||||||||||
pages | integer | ||||||||||||||||||||||
results | integer |
errors | array of objects
|
Kernels List
Lists available Kernels.
Authorizations
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/linode/kernels
linode-cli kernels list
Response Samples
{
"data": [
{
"architecture": "x86_64",
"deprecated": false,
"id": "linode/latest-64bit",
"kvm": true,
"label": "Latest 64 bit (4.15.7-x86_64-linode102)",
"pvops": false,
"version": "4.15.7",
"xen": false
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||||||||||
page | integer | ||||||||||||||||
pages | integer | ||||||||||||||||
results | integer |
errors | array of objects
|
Kernel View
Returns information about a single Kernel.
Authorizations
Path Parameters
| kernelId | stringRequiredID of the Kernel to look up. |
Request Samples
curl https://api.linode.com/v4/linode/kernels/linode/latest-64bit
linode-cli kernels view latest-64bit
Response Samples
{
"architecture": "x86_64",
"deprecated": false,
"id": "linode/latest-64bit",
"kvm": true,
"label": "Latest 64 bit (4.15.7-x86_64-linode102)",
"pvops": false,
"version": "4.15.7",
"xen": false
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
architecture Filterable | stringEnum:
x86_64
i386The architecture of this Kernel. |
deprecated Filterable | booleanIf this Kernel is marked as deprecated, this field has a value of true; otherwise, this field is false. |
id | stringThe unique ID of this Kernel. |
kvm Filterable | booleanIf this Kernel is suitable for KVM Linodes. |
label Filterable | stringThe friendly name of this Kernel. |
pvops Filterable | booleanIf this Kernel is suitable for paravirtualized operations. |
version Filterable | stringLinux Kernel version. |
xen Filterable | booleanIf this Kernel is suitable for Xen Linodes. |
errors | array of objects
|


