Linode Instances v4.175.0
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": null,
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": null
}
Responses
data | [array] |
page | [integer] The current page. |
pages | [integer] The total number of pages. |
results | [integer] The total number of results. |
errors | [array] |
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 Types List ( 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, which are accessible from the Regions List ( GET /regions) endpoint.
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 our guide on Running a Mail Server.
Important: You must be an unrestricted User in order to add or modify tags on Linodes.
Linodes can be created in a number of ways:
Using a Linode Public Image distribution or a Private Image you created based on another Linode.
- Access the Images List ( GET /images) endpoint with authentication to view all available Images.
- The Linode will be
running
after it completesprovisioning
. - A default config with two Disks, one being a 512 swap disk, is created.
swap_size
can be used to customize the swap disk size.
- Requires a
root_pass
be supplied to use for the root User’s Account. - It is recommended to supply SSH keys for the root User using the
authorized_keys
field. - You may also supply a list of usernames via the
authorized_users
field.- These users must have an SSH Key associated with your Profile first. See SSH Key Add ( POST /profile/sshkeys) for more information.
Using cloud-init with Metadata.
- Automate system configuration and software installation by providing a base-64 encoded cloud-config file.
- Requires a compatible Image. You can determine compatible Images by checking for
cloud-init
undercapabilities
when using Images List ( GET /images). - Requires a compatible Region. You can determine compatible Regions by checking for
Metadata
undercapabilities
when using Regions List ( GET /regions).
Using a StackScript.
- See StackScripts List ( GET /linode/stackscripts) for a list of available StackScripts.
- The Linode will be
running
after it completesprovisioning
. - Requires a compatible Image to be supplied.
- See StackScript View ( GET /linode/stackscript/{stackscriptId}) for compatible Images.
- Requires a
root_pass
be supplied to use for the root User’s Account. - It is recommended to supply SSH keys for the root User using the
authorized_keys
field. - You may also supply a list of usernames via the
authorized_users
field.- These users must have an SSH Key associated with your Profile first. See SSH Key Add ( POST /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_pass
will match that of the Linode that was backed up.
Attached to a private VLAN.
- Review the
interfaces
property of the Request Body Schema for details. - For more information, see our guide on Getting Started with VLANs.
- Review the
Create an empty Linode.
- The Linode will remain
offline
and must be manually started.- See Linode Boot ( POST /linode/instances/{linodeId}/boot).
- Disks and Configs must be created manually.
- This is only recommended for advanced use cases.
- The Linode will remain
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
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/ubuntu22.04",
"root_pass": "aComplexP@ssword",
"stackscript_id": 10079,
"stackscript_data": {
"gh_username": "linode"
},
"interfaces": [
{
"purpose": "public",
"label": "",
"ipam_address": ""
},
{
"purpose": "vlan",
"label": "vlan-1",
"ipam_address": "10.0.0.1/24"
},
{
"purpose": "vpc",
"primary": false,
"label": "",
"ipam_address": "",
"subnet_id": 101,
"ipv4": {
"vpc": "10.0.1.2",
"nat_1_1": "any"
}
}
],
"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",
"metadata": {
"user_data": "I2Nsb3VkLWNvbmZpZw=="
},
"firewall_id": 9000
}' \
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" \
--metadata.user_data "I2Nsb3VkLWNvbmZpZw==" \
--firewall_id 9000
Request Body Schema
authorized_keys | [array] A list of public SSH keys that will be automatically appended
to the root user’s | ||
authorized_users | [array] A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root users | ||
backup_id | [integer] A Backup ID from another Linode’s available backups. Your User must have
This field and the | ||
backups_enabled | [boolean] If this field is set to This option is always treated as Backup pricing is included in the response from /linodes/types | ||
booted | [boolean] Default:
true This field defaults to | ||
firewall_id | [integer] The | ||
group | [string] A deprecated property denoting a group label for this Linode. | ||
image | [string] An Image ID to deploy the Linode Disk from. Access the Images List (
GET /images) endpoint with authentication to view
all available Images. Official Linode Images start with | ||
interfaces | [array] An array of Network Interfaces to add to this Linode’s Configuration Profile. At least one and up to three Interface objects can exist in this array. The position in the array determines which of the Linode’s network Interfaces is configured:
When updating a Linode’s Interfaces, each Interface must be redefined. An empty If no public Interface is configured, public IP addresses are still assigned to the Linode but will not be usable without manual configuration. Note: Changes to Linode Interface configurations can be enabled by rebooting the Linode.
See the VPC documentation guide for its specifications and limitations.
| ||
label | [string]
3..64
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:
| ||
metadata | [object] An object containing user-defined data relevant to the creation of Linodes.
| ||
private_ip | [boolean] If true, the created Linode will have private networking enabled and assigned a private IPv4 address. | ||
region Required | [string] The Region where the Linode will be located. | ||
root_pass | [string]<password>
7..128
charactersThis sets the root user’s password on a newly-created Linode Disk when deploying from an Image.
| ||
stackscript_data | [object]
<=
65535
charactersThis field is required only if the StackScript being deployed requires input data from the User for successful completion. See User Defined Fields (UDFs) for more details. This field is required to be valid JSON. Total length cannot exceed 65,535 characters. | ||
stackscript_id | [integer] A StackScript ID that will cause the referenced StackScript to be run during
deployment of this Linode. A compatible | ||
swap_size | [integer] Default:
512 When 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 | [array] An array of tags applied to this object. Tags are for organizational purposes only. | ||
type Required | [string] The Linode Type of the Linode you are creating. |
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": null
}
Responses
alerts | [object]
| ||||||||||||
backups | [object] Information 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 | [string] A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | [boolean] Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | [string]<uuid> The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | [string] Enum:
kvm The virtualization software powering this Linode. | ||||||||||||
id | [integer] This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | [string] An Image ID to deploy the Linode Disk from. Access the Images List (
GET /images) endpoint with authentication to view
all available Images. Official Linode Images start with | ||||||||||||
ipv4 | [array]<ipv4> This 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 Nullable | [string]<ipv6/128> This Linode’s IPv6 SLAAC address. 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 | [string]
3..64
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 | [string] This is the Region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | [object] Information about the resources available to this Linode.
| ||||||||||||
status | [string] Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension A 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 | [array] An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | [string] This 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 | [boolean] The 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] |
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.
- Detaches any Volumes associated with the Linode.
- Stops billing for the Linode and its associated services. You will be billed for time used within the billing period the Linode was active.
Linodes that are in the process of cloning or backup restoration cannot be deleted.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID 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": null
}
Responses
errors | [array] |
Linode View
Get a specific Linode by ID.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID 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": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": null
}
Responses
alerts | [object]
| ||||||||||||
backups | [object] Information 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 | [string] A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | [boolean] Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | [string]<uuid> The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | [string] Enum:
kvm The virtualization software powering this Linode. | ||||||||||||
id | [integer] This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | [string] An Image ID to deploy the Linode Disk from. Access the Images List (
GET /images) endpoint with authentication to view
all available Images. Official Linode Images start with | ||||||||||||
ipv4 | [array]<ipv4> This 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 Nullable | [string]<ipv6/128> This Linode’s IPv6 SLAAC address. 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 | [string]
3..64
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 | [string] This is the Region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | [object] Information about the resources available to this Linode.
| ||||||||||||
status | [string] Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension A 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 | [array] An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | [string] This 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 | [boolean] The 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] |
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 | [integer] RequiredID of the Linode to look up |
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
Request Body Schema
alerts | [object]
| ||||||||||
backups | [object] Information about this Linode’s backups status. For information about available backups, see /linode/instances/{linodeId}/backups.
| ||||||||||
group | [string] A deprecated property denoting a group label for this Linode. | ||||||||||
label | [string]
3..64
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 | [array] An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||
watchdog_enabled | [boolean] The 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. |
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": null
}
Responses
alerts | [object]
| ||||||||||||
backups | [object] Information 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 | [string] A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | [boolean] Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | [string]<uuid> The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | [string] Enum:
kvm The virtualization software powering this Linode. | ||||||||||||
id | [integer] This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | [string] An Image ID to deploy the Linode Disk from. Access the Images List (
GET /images) endpoint with authentication to view
all available Images. Official Linode Images start with | ||||||||||||
ipv4 | [array]<ipv4> This 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 Nullable | [string]<ipv6/128> This Linode’s IPv6 SLAAC address. 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 | [string]
3..64
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 | [string] This is the Region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | [object] Information about the resources available to this Linode.
| ||||||||||||
status | [string] Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension A 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 | [array] An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | [string] This 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 | [boolean] The 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] |
Backups List
Returns information about this Linode’s available backups.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredThe 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": {
"available": true,
"configs": null,
"created": "2018-01-15T00:01:01",
"disks": null,
"finished": "2018-01-15T00:01:01",
"id": 123456,
"label": "Webserver-Backup-2018",
"status": "successful",
"type": "snapshot",
"updated": "2018-01-15T00:01:01"
},
"in_progress": {
"available": true,
"configs": null,
"created": "2018-01-15T00:01:01",
"disks": null,
"finished": "2018-01-15T00:01:01",
"id": 123456,
"label": "Webserver-Backup-2018",
"status": "successful",
"type": "snapshot",
"updated": "2018-01-15T00:01:01"
}
}
}
{
"errors": null
}
Responses
automatic | [array] | ||||||||||||||||||||||||||||||||||||||||||||
snapshot | [object]
|
errors | [array] |
Snapshot Create
Creates a snapshot Backup of a Linode.
Important: 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 | [integer] RequiredThe ID of the Linode the backups belong to. |
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
Request Body Schema
label Required | [string]
1..255
charactersThe label for the new snapshot. |
Response Samples
{
"available": true,
"configs": null,
"created": "2018-01-15T00:01:01",
"disks": null,
"finished": "2018-01-15T00:01:01",
"id": 123456,
"label": "Webserver-Backup-2018",
"status": "successful",
"type": "snapshot",
"updated": "2018-01-15T00:01:01"
}
{
"errors": null
}
Responses
available | [boolean] Whether this Backup is available for restoration. Backups undergoing maintenance are not available for restoration. |
configs | [array] A 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] A list of the disks that are part of the Backup. |
finished | [string]<date-time> The date the Backup completed. |
id | [integer] The unique ID of this Backup. |
label Nullable | [string] A label for Backups that are of type |
status | [string] Enum:
paused
pending
running
needsPostProcessing
successful
failed
userAborted The current state of a specific Backup. |
type | [string] Enum:
auto
snapshot This 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] |
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 | [integer] RequiredThe 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": null
}
Responses
errors | [array] |
Backups Enable
Enables backups for the specified Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe 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": null
}
Responses
errors | [array] |
Backup View
Returns information about a Backup.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredThe ID of the Linode the Backup belongs to. |
backupId | [integer] RequiredThe 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
{
"available": true,
"configs": null,
"created": "2018-01-15T00:01:01",
"disks": null,
"finished": "2018-01-15T00:01:01",
"id": 123456,
"label": "Webserver-Backup-2018",
"status": "successful",
"type": "snapshot",
"updated": "2018-01-15T00:01:01"
}
{
"errors": null
}
Responses
available | [boolean] Whether this Backup is available for restoration. Backups undergoing maintenance are not available for restoration. |
configs | [array] A 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] A list of the disks that are part of the Backup. |
finished | [string]<date-time> The date the Backup completed. |
id | [integer] The unique ID of this Backup. |
label Nullable | [string] A label for Backups that are of type |
status | [string] Enum:
paused
pending
running
needsPostProcessing
successful
failed
userAborted The current state of a specific Backup. |
type | [string] Enum:
auto
snapshot This 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] |
Backup Restore
Restores a Linode’s Backup to the specified Linode.
The following conditions apply:
- Backups may not be restored across Regions.
- Only successfully completed Backups that are not undergoing maintenance can be restored.
- The Linode that the Backup is being restored to must not itself be in the process of creating a Backup.
When you restore a backup, the restored disk is assigned the same UUID as the original disk. In most cases, this is acceptable and does not cause issues. However, if you attempt to mount both the original disk and the corresponding restore disk at the same time (by assigning them both to devices in your Configuration Profile’s Block Device Assignment), you will encounter a UUID “collision”.
When this happens, the system selects, and mounts, only one of the disks at random. This is due to both disks sharing the same UUID, and your instance may fail to boot since it will not be clear which disk is root. If your system does boot, you will not see any immediate indication if you are booted into the restored disk or the original disk, and you will be unable to access both disks at the same time.
To avoid this, we recommend only restoring a backup to the same Compute Instance if you do not intend on mounting them at the same time or are comfortable modifying UUIDs. If you need access to files on both the original disk and the restored disk simultaneously (such as needing to copy files between them), we suggest either restoring the backup to a separate Compute Instance or
creating a new Compute Instance with the desired backup_id
.
To learn more about block device assignments and viewing your disks’ UUIDs, see our guide on Configuration Profiles.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe ID of the Linode that the Backup belongs to. |
backupId | [integer] RequiredThe ID of the Backup to restore. |
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
Request Body Schema
linode_id Required | [integer] The ID of the Linode to restore a Backup to. |
overwrite | [boolean] If 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. |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
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 | [integer] RequiredThe ID of the Linode to boot. |
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
Request Body Schema
config_id | [integer] The Linode Config ID to boot into. |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
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.
Linodes utilizing Metadata ("has_user_data": true
) must be cloned to a new Linode with metadata.user_data
included with the clone request.
vpc
details
- If the Linode you are cloning has a
vpc
purpose Interface on its active Configuration Profile that includes a 1:1 NAT, the resulting clone is configured with anany
1:1 NAT. - See the VPC documentation guide for its specifications and limitations.
vlan
details
- Only Next Generation Network (NGN) data centers support VLANs. If a VLAN is attached to your Linode and you attempt clone it to a non-NGN data center, the cloning will not initiate. If a Linode cannot be cloned because of an incompatibility, you will be prompted to select a different data center or contact support.
- See the VLANs Overview guide to view additional specifications and limitations.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID of the Linode to clone. |
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],
"private_ip": true,
"metadata": {
"user_data": "I2Nsb3VkLWNvbmZpZw=="
}
}' \
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 \
--private_ip true \
--metadata.user_data I2Nsb3VkLWNvbmZpZw==
Request Body Schema
backups_enabled | [boolean] If this field is set to
| ||
configs | [array] An array of configuration profile IDs.
| ||
disks | [array] An array of disk IDs.
| ||
group | [string] A label used to group Linodes for display. Linodes are not required to have a group. | ||
label | [string]
3..64
charactersThe label to assign this Linode when cloning to a new Linode.
| ||
linode_id | [integer] If an existing Linode is the target for the clone, the ID of that Linode. The existing Linode must have enough resources to accept the clone. | ||
metadata | [object] An object containing user-defined data relevant to the creation of Linodes.
| ||
private_ip | [boolean] If true, the created Linode will have private networking enabled and assigned a private IPv4 address.
| ||
region | [string] This is the Region where the Linode will be deployed. To view all available Regions you can deploy to see GET /regions.
| ||
type | [string] A 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.
|
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": null
}
Responses
alerts | [object]
| ||||||||||||
backups | [object] Information 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 | [string] A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | [boolean] Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | [string]<uuid> The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | [string] Enum:
kvm The virtualization software powering this Linode. | ||||||||||||
id | [integer] This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | [string] An Image ID to deploy the Linode Disk from. Access the Images List (
GET /images) endpoint with authentication to view
all available Images. Official Linode Images start with | ||||||||||||
ipv4 | [array]<ipv4> This 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 Nullable | [string]<ipv6/128> This Linode’s IPv6 SLAAC address. 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 | [string]
3..64
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 | [string] This is the Region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | [object] Information about the resources available to this Linode.
| ||||||||||||
status | [string] Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension A 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 | [array] An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | [string] This 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 | [boolean] The 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] |
Configuration Profiles List
Lists Configuration profiles associated with a Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID 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": null,
"page": 1,
"pages": 1,
"results": 1
}
Responses
Configuration Profile Create
Adds a new Configuration profile to a Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID of the Linode to look up Configuration profiles for. |
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",
"interfaces": [
{
"purpose": "public",
"label": "",
"ipam_address": ""
},
{
"purpose": "vlan",
"label": "vlan-1",
"ipam_address": "10.0.0.1/24"
}
],
"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
Request Body Schema
comments Nullable | [string] Optional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices Required | [object] A dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | [object] Helpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
interfaces | [array] An array of Network Interfaces to add to this Linode’s Configuration Profile. At least one and up to three Interface objects can exist in this array. The position in the array determines which of the Linode’s network Interfaces is configured:
When updating a Linode’s Interfaces, each Interface must be redefined. An empty If no public Interface is configured, public IP addresses are still assigned to the Linode but will not be usable without manual configuration. Note: Changes to Linode Interface configurations can be enabled by rebooting the Linode.
See the VPC documentation guide for its specifications and limitations.
| ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | [string] Default:
linode/latest-64bit A Kernel ID to boot a Linode with. Here are examples of commonly-used kernels:
For a complete list of options, use the Kernels List command. | ||||||||||||||||||||||||||||||||||||||||||||||||
label Required | [string]
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | [integer] Defaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | [string] The root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | [string] Enum:
default
single
binbash Defines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | [string] Enum:
paravirt
fullvirt Controls the virtualization mode. Defaults to
|
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,
"interfaces": [
{
"id": 101,
"ipam_address": null,
"ipv4": null,
"label": null,
"primary": false,
"purpose": "public",
"subnet_id": null,
"vpc_id": null
},
{
"id": 102,
"ipam_address": "10.0.0.1/24",
"ipv4": {
"nat_1_1": null,
"vpc": "10.0.0.2"
},
"label": "vlan-1",
"primary": false,
"purpose": "vlan",
"subnet_id": null,
"vpc_id": null
},
{
"id": 103,
"ipam_address": null,
"ipv4": {
"nat_1_1": "203.0.113.2",
"vpc": "10.0.1.2"
},
"label": null,
"primary": true,
"purpose": "vpc",
"subnet_id": 101,
"vpc_id": 111
}
],
"kernel": "linode/latest-64bit",
"label": "My Config",
"memory_limit": 2048,
"root_device": "/dev/sda",
"run_level": "default",
"virt_mode": "paravirt"
}
{
"errors": null
}
Responses
comments Nullable | [string] Optional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices | [object] A dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | [object] Helpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
id | [integer] The ID of this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
interfaces | [array] An array of Network Interfaces to add to this Linode’s Configuration Profile. At least one and up to three Interface objects can exist in this array. The position in the array determines which of the Linode’s network Interfaces is configured:
When updating a Linode’s Interfaces, each Interface must be redefined. An empty If no public Interface is configured, public IP addresses are still assigned to the Linode but will not be usable without manual configuration. Note: Changes to Linode Interface configurations can be enabled by rebooting the Linode.
See the VPC documentation guide for its specifications and limitations.
| ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | [string] Default:
linode/latest-64bit A Kernel ID to boot a Linode with. Here are examples of commonly-used kernels:
For a complete list of options, use the Kernels List command. | ||||||||||||||||||||||||||||||||||||||||||||||||
label | [string]
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | [integer] Defaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | [string] The root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | [string] Enum:
default
single
binbash Defines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | [string] Enum:
paravirt
fullvirt Controls the virtualization mode. Defaults to
|
errors | [array] |
Configuration Profile Delete
Deletes the specified Configuration profile from the specified Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
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": null
}
Responses
errors | [array] |
Configuration Profile View
Returns information about a specific Configuration profile.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
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,
"interfaces": [
{
"id": 101,
"ipam_address": null,
"ipv4": null,
"label": null,
"primary": false,
"purpose": "public",
"subnet_id": null,
"vpc_id": null
},
{
"id": 102,
"ipam_address": "10.0.0.1/24",
"ipv4": {
"nat_1_1": null,
"vpc": "10.0.0.2"
},
"label": "vlan-1",
"primary": false,
"purpose": "vlan",
"subnet_id": null,
"vpc_id": null
},
{
"id": 103,
"ipam_address": null,
"ipv4": {
"nat_1_1": "203.0.113.2",
"vpc": "10.0.1.2"
},
"label": null,
"primary": true,
"purpose": "vpc",
"subnet_id": 101,
"vpc_id": 111
}
],
"kernel": "linode/latest-64bit",
"label": "My Config",
"memory_limit": 2048,
"root_device": "/dev/sda",
"run_level": "default",
"virt_mode": "paravirt"
}
{
"errors": null
}
Responses
comments Nullable | [string] Optional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices | [object] A dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | [object] Helpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
id | [integer] The ID of this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
interfaces | [array] An array of Network Interfaces to add to this Linode’s Configuration Profile. At least one and up to three Interface objects can exist in this array. The position in the array determines which of the Linode’s network Interfaces is configured:
When updating a Linode’s Interfaces, each Interface must be redefined. An empty If no public Interface is configured, public IP addresses are still assigned to the Linode but will not be usable without manual configuration. Note: Changes to Linode Interface configurations can be enabled by rebooting the Linode.
See the VPC documentation guide for its specifications and limitations.
| ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | [string] Default:
linode/latest-64bit A Kernel ID to boot a Linode with. Here are examples of commonly-used kernels:
For a complete list of options, use the Kernels List command. | ||||||||||||||||||||||||||||||||||||||||||||||||
label | [string]
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | [integer] Defaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | [string] The root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | [string] Enum:
default
single
binbash Defines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | [string] Enum:
paravirt
fullvirt Controls the virtualization mode. Defaults to
|
errors | [array] |
Configuration Profile Update
Updates a Configuration profile.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
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",
"interfaces": [
{
"purpose": "public",
"label": "",
"ipam_address": ""
},
{
"purpose": "vlan",
"label": "vlan-1",
"ipam_address": "10.0.0.1/24"
}
],
"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
Request Body Schema
comments Nullable | [string] Optional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices | [object] A dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | [object] Helpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
interfaces | [array] An array of Network Interfaces to add to this Linode’s Configuration Profile. At least one and up to three Interface objects can exist in this array. The position in the array determines which of the Linode’s network Interfaces is configured:
When updating a Linode’s Interfaces, each Interface must be redefined. An empty If no public Interface is configured, public IP addresses are still assigned to the Linode but will not be usable without manual configuration. Note: Changes to Linode Interface configurations can be enabled by rebooting the Linode.
See the VPC documentation guide for its specifications and limitations.
| ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | [string] Default:
linode/latest-64bit A Kernel ID to boot a Linode with. Here are examples of commonly-used kernels:
For a complete list of options, use the Kernels List command. | ||||||||||||||||||||||||||||||||||||||||||||||||
label | [string]
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | [integer] Defaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | [string] The root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | [string] Enum:
default
single
binbash Defines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | [string] Enum:
paravirt
fullvirt Controls the virtualization mode. Defaults to
|
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,
"interfaces": [
{
"id": 101,
"ipam_address": null,
"ipv4": null,
"label": null,
"primary": false,
"purpose": "public",
"subnet_id": null,
"vpc_id": null
},
{
"id": 102,
"ipam_address": "10.0.0.1/24",
"ipv4": {
"nat_1_1": null,
"vpc": "10.0.0.2"
},
"label": "vlan-1",
"primary": false,
"purpose": "vlan",
"subnet_id": null,
"vpc_id": null
},
{
"id": 103,
"ipam_address": null,
"ipv4": {
"nat_1_1": "203.0.113.2",
"vpc": "10.0.1.2"
},
"label": null,
"primary": true,
"purpose": "vpc",
"subnet_id": 101,
"vpc_id": 111
}
],
"kernel": "linode/latest-64bit",
"label": "My Config",
"memory_limit": 2048,
"root_device": "/dev/sda",
"run_level": "default",
"virt_mode": "paravirt"
}
{
"errors": null
}
Responses
comments Nullable | [string] Optional field for arbitrary User comments on this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
devices | [object] A dictionary of device disks to use as a device map in a Linode’s configuration profile.
| ||||||||||||||||||||||||||||||||||||||||||||||||
helpers | [object] Helpers enabled when booting to this Linode Config.
| ||||||||||||||||||||||||||||||||||||||||||||||||
id | [integer] The ID of this Config. | ||||||||||||||||||||||||||||||||||||||||||||||||
interfaces | [array] An array of Network Interfaces to add to this Linode’s Configuration Profile. At least one and up to three Interface objects can exist in this array. The position in the array determines which of the Linode’s network Interfaces is configured:
When updating a Linode’s Interfaces, each Interface must be redefined. An empty If no public Interface is configured, public IP addresses are still assigned to the Linode but will not be usable without manual configuration. Note: Changes to Linode Interface configurations can be enabled by rebooting the Linode.
See the VPC documentation guide for its specifications and limitations.
| ||||||||||||||||||||||||||||||||||||||||||||||||
kernel | [string] Default:
linode/latest-64bit A Kernel ID to boot a Linode with. Here are examples of commonly-used kernels:
For a complete list of options, use the Kernels List command. | ||||||||||||||||||||||||||||||||||||||||||||||||
label | [string]
1..48
charactersThe Config’s label is for display purposes only. | ||||||||||||||||||||||||||||||||||||||||||||||||
memory_limit | [integer] Defaults to the total RAM of the Linode. | ||||||||||||||||||||||||||||||||||||||||||||||||
root_device | [string] The root device to boot.
| ||||||||||||||||||||||||||||||||||||||||||||||||
run_level | [string] Enum:
default
single
binbash Defines the state of your Linode after booting. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||
virt_mode | [string] Enum:
paravirt
fullvirt Controls the virtualization mode. Defaults to
|
errors | [array] |
Configuration Profile Interfaces List
Returns an ordered array of all Interfaces associated with this Configuration Profile.
- The User accessing this command must have at least
read_only
grants to the Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
Request Samples
curl https://api.linode.com/v4/linode/instances/$linodeId/configs/$configId/interfaces \
-H "Authorization: Bearer $TOKEN"
linode-cli linodes config-interfaces-list $linodeId $configId
Response Samples
[
{
"id": 101,
"ipam_address": null,
"ipv4": null,
"label": null,
"primary": false,
"purpose": "public",
"subnet_id": null,
"vpc_id": null
},
{
"id": 102,
"ipam_address": "10.0.0.1/24",
"ipv4": {
"nat_1_1": null,
"vpc": "10.0.0.2"
},
"label": "vlan-1",
"primary": false,
"purpose": "vlan",
"subnet_id": null,
"vpc_id": null
},
{
"id": 103,
"ipam_address": null,
"ipv4": {
"nat_1_1": "203.0.113.2",
"vpc": "10.0.1.2"
},
"label": null,
"primary": true,
"purpose": "vpc",
"subnet_id": 101,
"vpc_id": 111
}
]
{
"errors": null
}
Responses
An array of Network Interfaces to add to this Linode’s Configuration Profile. At least one and up to three Interface objects can exist in this array. The position in the array determines which of the Linode’s network Interfaces is configured:
- First [0]: eth0
- Second [1]: eth1
- Third [2]: eth2
When updating a Linode’s Interfaces, each Interface must be redefined. An empty interfaces
array results in a default public
type Interface configuration only.
If no public Interface is configured, public IP addresses are still assigned to the Linode but will not be usable without manual configuration.
Note: Changes to Linode Interface configurations can be enabled by rebooting the Linode.
vpc
details
See the VPC documentation guide for its specifications and limitations.
vlan
details
- Only Next Generation Network (NGN) data centers support VLANs. Use the Regions ( /regions) endpoint to view the capabilities of data center regions. If a VLAN is attached to your Linode and you attempt to migrate or clone it to a non-NGN data center, the migration or cloning will not initiate. If a Linode cannot be migrated or cloned because of an incompatibility, you will be prompted to select a different data center or contact support.
- See the VLANs Overview guide to view additional specifications and limitations.
errors | [array] |
Configuration Profile Interface Add
Creates and appends a single Interface to the end of the interfaces
array for an existing Configuration Profile.
- The User accessing this command must have
read_write
grants to the Linode. - A successful request triggers a
linode_config_update
event. - If the new Interface is added with
"primary": true
, then any existing primary Interface is changed to"primary": false
.
Reboot the Linode with this Configuration Profile to activate an Interface that was added with this command.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
Request Samples
curl https://api.linode.com/v4/linode/instances/$linodeId/configs/$configId/interfaces \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-X POST -d '{
"purpose": "vpc",
"primary": false,
"label": "",
"ipam_address": "",
"subnet_id": 101,
"ipv4": {
"vpc": "10.0.1.2",
"nat_1_1": "203.0.113.2"
}
}'
linode-cli linodes config-interface-add $linodeId $configId \
--purpose vpc \
--primary false \
--subnet_id 101 \
--ipv4.vpc "10.0.1.2" \
--ipv4.nat_1_1 "203.0.113.2"
Request Body Schema
active | [boolean] Returns | ||||
ip_ranges Nullable | [array] An array of IPv4 CIDR VPC Subnet ranges that are routed to this Interface.
For requests:
| ||||
ipam_address Nullable | [string]<ip/netmask> This Network Interface’s private IP address in Classless Inter-Domain Routing (CIDR) notation. For
For
For
| ||||
ipv4 | [object] IPv4 addresses configured for this Interface. Only allowed for
| ||||
label Nullable | [string]
1..64
charactersThe name of this Interface. For
For
For
| ||||
primary | [boolean] The primary Interface is configured as the default route to the Linode. Each Configuration Profile can have up to one Must be If no Interface is configured as the primary, the first non- | ||||
purpose Required | [string] Enum:
public
vlan
vpc The type of Interface.
| ||||
subnet_id Nullable | [integer] The In requests, this value is used to assign a Linode to a VPC Subnet.
|
Response Samples
{
"active": true,
"id": 101,
"ip_ranges": [
"10.0.0.64/26",
"fd04:495a:691c:971c::1:0/112"
],
"ipam_address": "10.0.0.1/24",
"ipv4": {
"nat_1_1": "203.0.113.2",
"vpc": "10.0.0.2"
},
"label": "example-interface",
"primary": true,
"purpose": "vlan",
"subnet_id": 101,
"vpc_id": 111
}
{
"errors": null
}
Responses
active | [boolean] Returns | ||||
id | [integer] The unique ID representing this Interface. | ||||
ip_ranges Nullable | [array] An array of IPv4 CIDR VPC Subnet ranges that are routed to this Interface.
For requests:
| ||||
ipam_address Nullable | [string]<ip/netmask> This Network Interface’s private IP address in Classless Inter-Domain Routing (CIDR) notation. For
For
For
| ||||
ipv4 | [object] IPv4 addresses configured for this Interface. Only allowed for
| ||||
label Nullable | [string]
1..64
charactersThe name of this Interface. For
For
For
| ||||
primary | [boolean] The primary Interface is configured as the default route to the Linode. Each Configuration Profile can have up to one Must be If no Interface is configured as the primary, the first non- | ||||
purpose | [string] Enum:
public
vlan
vpc The type of Interface.
| ||||
subnet_id Nullable | [integer] The In requests, this value is used to assign a Linode to a VPC Subnet.
| ||||
vpc_id Nullable | [integer] The |
errors | [array] |
Configuration Profile Interfaces Order
Reorders the existing Interfaces of a Configuration Profile.
- The User accessing this command must have
read_write
grants to the Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
Request Samples
curl https://api.linode.com/v4/linode/instances/$linodeId/configs/$configId/interfaces/order \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-X POST -d '{
"ids": [
101,
102,
103
]
}'
linode-cli linodes config-interfaces-order $linodeId $configId \
--ids 101 --ids 102 --ids 103
Request Body Schema
ids Required | [array] An ordered array of existing Configuration Profile Interface
The position in the array determines which of the Linode’s network Interfaces is configured:
|
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
Configuration Profile Interface Delete
Deletes an Interface from the Configuration Profile.
- The User accessing this command must have
read_write
grants to the Linode. - A successful request triggers a
linode_config_update
event. - Active Interfaces cannot be deleted. The associated Linode must first be shut down (or restarted using another Configuration Profile) before such Interfaces can be deleted from a Configuration Profile.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
interfaceId | [integer] RequiredThe |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/linode/instances/$linodeId/configs/$configId/interfaces/$interfaceId
linode-cli linodes config-delete $linodeId $configId $interfaceId
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
Configuration Profile Interface View
Returns a single Configuration Profile Interface.
- The User accessing this command must have at least
read_only
grants to the Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
interfaceId | [integer] RequiredThe |
Request Samples
curl https://api.linode.com/v4/linode/instances/$linodeId/configs/$configId/interfaces/$interfaceId \
-H "Authorization: Bearer $TOKEN"
linode-cli linodes config-interface-view $linodeId $configId $interfaceId
Response Samples
{
"active": true,
"id": 101,
"ip_ranges": [
"10.0.0.64/26",
"fd04:495a:691c:971c::1:0/112"
],
"ipam_address": "10.0.0.1/24",
"ipv4": {
"nat_1_1": "203.0.113.2",
"vpc": "10.0.0.2"
},
"label": "example-interface",
"primary": true,
"purpose": "vlan",
"subnet_id": 101,
"vpc_id": 111
}
{
"errors": null
}
Responses
active | [boolean] Returns | ||||
id | [integer] The unique ID representing this Interface. | ||||
ip_ranges Nullable | [array] An array of IPv4 CIDR VPC Subnet ranges that are routed to this Interface.
For requests:
| ||||
ipam_address Nullable | [string]<ip/netmask> This Network Interface’s private IP address in Classless Inter-Domain Routing (CIDR) notation. For
For
For
| ||||
ipv4 | [object] IPv4 addresses configured for this Interface. Only allowed for
| ||||
label Nullable | [string]
1..64
charactersThe name of this Interface. For
For
For
| ||||
primary | [boolean] The primary Interface is configured as the default route to the Linode. Each Configuration Profile can have up to one Must be If no Interface is configured as the primary, the first non- | ||||
purpose | [string] Enum:
public
vlan
vpc The type of Interface.
| ||||
subnet_id Nullable | [integer] The In requests, this value is used to assign a Linode to a VPC Subnet.
| ||||
vpc_id Nullable | [integer] The |
errors | [array] |
Configuration Profile Interface Update
Updates a vpc
or public
purpose Interface for this Configuration Profile.
- The User accessing this command must have
read_write
grants to the Linode. - A successful request triggers a
linode_config_update
event. - The Interface
purpose
cannot be updated with this command. - VPC Subnets cannot be updated on an Interface. A new
vpc
purpose Interface must be created to assign a different Subnet to a Configuration Profile. - Only
primary
can be updated forpublic
purpose Interfaces. - This command not currently allowed for
vlan
purpose Interfaces.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe |
configId | [integer] RequiredThe |
interfaceId | [integer] RequiredThe |
Request Samples
curl https://api.linode.com/v4/linode/instances/$linodeId/configs/$configId/interfaces/$interfaceId \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-X PUT -d '{
"primary": true,
"ipv4": {
"vpc": "10.0.1.2",
"nat_1_1": "203.0.113.2"
}
}'
linode-cli linodes config-interface-update $linodeId $configId $interfaceId \
--primary true \
--ipv4.vpc "10.0.1.2" \
--ipv4.nat_1_1 "203.0.113.2"
Request Body Schema
ip_ranges Nullable | [array] An array of IPv4 CIDR VPC Subnet ranges that are routed to this Interface.
For requests:
| ||||
ipv4 | [object] IPv4 addresses configured for this Interface. Only allowed for
| ||||
primary | [boolean] The primary Interface is configured as the default route to the Linode. Each Configuration Profile can have up to one Must be If no Interface is configured as the primary, the first non- |
Response Samples
{
"active": true,
"id": 101,
"ip_ranges": [
"10.0.0.64/26",
"fd04:495a:691c:971c::1:0/112"
],
"ipam_address": "10.0.0.1/24",
"ipv4": {
"nat_1_1": "203.0.113.2",
"vpc": "10.0.0.2"
},
"label": "example-interface",
"primary": true,
"purpose": "vlan",
"subnet_id": 101,
"vpc_id": 111
}
{
"errors": null
}
Responses
active | [boolean] Returns | ||||
id | [integer] The unique ID representing this Interface. | ||||
ip_ranges Nullable | [array] An array of IPv4 CIDR VPC Subnet ranges that are routed to this Interface.
For requests:
| ||||
ipam_address Nullable | [string]<ip/netmask> This Network Interface’s private IP address in Classless Inter-Domain Routing (CIDR) notation. For
For
For
| ||||
ipv4 | [object] IPv4 addresses configured for this Interface. Only allowed for
| ||||
label Nullable | [string]
1..64
charactersThe name of this Interface. For
For
For
| ||||
primary | [boolean] The primary Interface is configured as the default route to the Linode. Each Configuration Profile can have up to one Must be If no Interface is configured as the primary, the first non- | ||||
purpose | [string] Enum:
public
vlan
vpc The type of Interface.
| ||||
subnet_id Nullable | [integer] The In requests, this value is used to assign a Linode to a VPC Subnet.
| ||||
vpc_id Nullable | [integer] The |
errors | [array] |
Disks List
View Disk information for Disks associated with this Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID 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": null,
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": null
}
Responses
data | [array] |
page | [integer] The current page. |
pages | [integer] The total number of pages. |
results | [integer] The total number of results. |
errors | [array] |
Disk Create
Adds a new Disk to a Linode.
You can optionally create a Disk from an Image or an Empty Disk if no Image is provided with a request.
When creating an Empty Disk, providing a
label
is required.If no
label
is provided, animage
is required instead.When creating a Disk from an Image,
root_pass
is required.The default filesystem for new Disks is
ext4
. If creating a Disk from an Image, the filesystem of the Image is used unless otherwise specified.When deploying a StackScript on a Disk:
- See StackScripts List ( GET /linode/stackscripts) for a list of available StackScripts.
- Requires a compatible Image to be supplied.
- See StackScript View ( GET /linode/stackscript/{stackscriptId}) for compatible Images.
- It is recommended to supply SSH keys for the root User using the
authorized_keys
field. - You may also supply a list of usernames via the
authorized_users
field.- These users must have an SSH Key associated with their Profiles first. See SSH Key Add ( POST /profile/sshkeys) for more information.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID of the Linode to look up. |
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"}'
Request Body Schema
authorized_keys | [array] A list of public SSH keys that will be automatically appended
to the root user’s |
authorized_users | [array] A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root users |
filesystem | [string] Enum:
raw
swap
ext3
ext4
initrd The Disk filesystem can be one of:
|
image | [string] An Image ID to deploy the Linode Disk from. Access the Images List (
GET /images) endpoint with authentication to view
all available Images. Official Linode Images start with |
label | [string]
1..48
charactersThe Disk’s label is for display purposes only. |
root_pass | [string]<password>
7..128
charactersThis sets the root user’s password on a newly-created Linode Disk when deploying from an Image.
|
size Required | [integer] The size of the Disk in MB. Images require a minimum size. Access the Image View ( GET /images/{imageID}) endpoint to view its size. |
stackscript_data | [object]
<=
65535
charactersThis field is required only if the StackScript being deployed requires input data from the User for successful completion. See User Defined Fields (UDFs) for more details. This field is required to be valid JSON. Total length cannot exceed 65,535 characters. |
stackscript_id | [integer] A StackScript ID that will cause the referenced StackScript to be run during
deployment of this Linode. A compatible |
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": null
}
Responses
created | [string]<date-time> When this Disk was created. |
filesystem | [string] Enum:
raw
swap
ext3
ext4
initrd The Disk filesystem can be one of:
|
id | [integer] This Disk’s ID which must be provided for all operations impacting this Disk. |
label | [string]
1..48
charactersThe Disk’s label is for display purposes only. |
size | [integer] The size of the Disk in MB. |
status | [string] Enum:
ready
not ready
deleting A brief description of this Disk’s current state. This field may change without direct action from you, as a result of operations performed to the Disk or the Linode containing the Disk. |
updated | [string]<date-time> When this Disk was last updated. |
errors | [array] |
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 | [integer] RequiredID of the Linode to look up. |
diskId | [integer] RequiredID 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": null
}
Responses
errors | [array] |
Disk View
View Disk information for a Disk associated with this Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID of the Linode to look up. |
diskId | [integer] RequiredID 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": null
}
Responses
created | [string]<date-time> When this Disk was created. |
filesystem | [string] Enum:
raw
swap
ext3
ext4
initrd The Disk filesystem can be one of:
|
id | [integer] This Disk’s ID which must be provided for all operations impacting this Disk. |
label | [string]
1..48
charactersThe Disk’s label is for display purposes only. |
size | [integer] The size of the Disk in MB. |
status | [string] Enum:
ready
not ready
deleting A brief description of this Disk’s current state. This field may change without direct action from you, as a result of operations performed to the Disk or the Linode containing the Disk. |
updated | [string]<date-time> When this Disk was last updated. |
errors | [array] |
Disk Update
Updates a Disk that you have permission to read_write
.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID of the Linode to look up. |
diskId | [integer] RequiredID of the Disk to look up. |
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"
Request Body Schema
label | [string]
1..48
charactersThe Disk’s label is for display purposes only. |
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": null
}
Responses
created | [string]<date-time> When this Disk was created. |
filesystem | [string] Enum:
raw
swap
ext3
ext4
initrd The Disk filesystem can be one of:
|
id | [integer] This Disk’s ID which must be provided for all operations impacting this Disk. |
label | [string]
1..48
charactersThe Disk’s label is for display purposes only. |
size | [integer] The size of the Disk in MB. |
status | [string] Enum:
ready
not ready
deleting A brief description of this Disk’s current state. This field may change without direct action from you, as a result of operations performed to the Disk or the Linode containing the Disk. |
updated | [string]<date-time> When this Disk was last updated. |
errors | [array] |
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 | [integer] RequiredID of the Linode to look up. |
diskId | [integer] RequiredID 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": null
}
Responses
created | [string]<date-time> When this Disk was created. |
filesystem | [string] Enum:
raw
swap
ext3
ext4
initrd The Disk filesystem can be one of:
|
id | [integer] This Disk’s ID which must be provided for all operations impacting this Disk. |
label | [string]
1..48
charactersThe Disk’s label is for display purposes only. |
size | [integer] The size of the Disk in MB. |
status | [string] Enum:
ready
not ready
deleting A brief description of this Disk’s current state. This field may change without direct action from you, as a result of operations performed to the Disk or the Linode containing the Disk. |
updated | [string]<date-time> When this Disk was last updated. |
errors | [array] |
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 | [integer] RequiredID of the Linode to look up. |
diskId | [integer] RequiredID of the Disk to look up. |
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
Request Body Schema
password Required | [string] The new root password for the OS installed on this Disk. The password must meet the complexity strength validation requirements for a strong password. |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
Disk Resize
Resizes a Disk you have permission to read_write
.
The Disk must not be in use. If the Disk is in use, the request will succeed but the resize will ultimately fail. For a request to succeed, the Linode must be shut down prior to resizing the Disk, or the Disk must not be assigned to the Linode’s active Configuration Profile.
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.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID of the Linode to look up. |
diskId | [integer] RequiredID of the Disk to look up. |
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
Request Body Schema
size Required | [integer]
>=
1The desired size, in MB, of the disk. |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
Firewalls List
View Firewall information for Firewalls assigned to this Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID of the Linode to access. |
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/firewalls
linode-cli linodes firewalls-list 123
Response Samples
{
"data": null,
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": null
}
Responses
data | [array] |
page | [integer] The current page. |
pages | [integer] The total number of pages. |
results | [integer] The total number of results. |
errors | [array] |
Networking Information List
Returns networking information for a single Linode.
Note: If the target Linode has several configuration profiles that include a Virtual Private Cloud (VPC) interface, address information for all of VPCs will be listed in the response.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID of the Linode to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/ips
linode-cli linodes ips-list 123
Response Samples
{
"ipv4": {
"private": null,
"public": null,
"reserved": null,
"shared": null,
"vpc": null
},
"ipv6": {
"global": null,
"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::",
"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::",
"type": "ipv6"
}
}
}
{
"errors": null
}
Responses
ipv4 | [object] Information about this Linode’s IPv4 addresses.
| ||||||||||||||||||||||||||||||||||||||||||
ipv6 | [object] Information about this Linode’s IPv6 addresses.
|
errors | [array] |
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 | [integer] RequiredID of the Linode to look up. |
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
Request Body Schema
public Required | [boolean] Whether to create a public or private IPv4 address. |
type Required | [string] Enum:
ipv4 The type of address you are allocating. Only IPv4 addresses may be allocated through this endpoint. |
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",
"vpc_nat_1_1": {
"address": "192.0.2.1",
"subnet_id": 101,
"vpc_id": 111
}
}
{
"errors": null
}
Responses
address | [string]<ip> The IP address. | ||||||
gateway Nullable | [string]<ip> The default gateway for this address. | ||||||
linode_id | [integer] The 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 | [integer] The number of bits set in the subnet mask. | ||||||
public | [boolean] Whether this is a public or private IP address. | ||||||
rdns Nullable | [string] The 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 | [string] The Region this IP address resides in. | ||||||
subnet_mask | [string]<ip> The mask that separates host bits from network bits for this address. | ||||||
type | [string] Enum:
ipv4
ipv6
ipv6/pool
ipv6/range The type of address this is. | ||||||
vpc_nat_1_1 | [object] IPv4 address configured as a 1:1 NAT for this Interface. If no address is configured as a 1:1 NAT, Note: Only allowed for
|
errors | [array] |
IPv4 Address Delete
Deletes a public or private IPv4 address associated with this Linode. This will fail if it is the Linode’s last remaining public IPv4 address, or if the address has a 1:1 NAT with an active VPC Subnet address.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe ID of the Linode. |
address | [string]<ip> RequiredThe IP address. |
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": null
}
Responses
errors | [array] |
IP Address View
View information about the specified IP address associated with the specified Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredThe ID of the Linode. |
address | [string]<ip> RequiredThe IP address. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
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",
"vpc_nat_1_1": {
"address": "192.0.2.1",
"subnet_id": 101,
"vpc_id": 111
}
}
{
"errors": null
}
Responses
address | [string]<ip> The IP address. | ||||||
gateway Nullable | [string]<ip> The default gateway for this address. | ||||||
linode_id | [integer] The 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 | [integer] The number of bits set in the subnet mask. | ||||||
public | [boolean] Whether this is a public or private IP address. | ||||||
rdns Nullable | [string] The 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 | [string] The Region this IP address resides in. | ||||||
subnet_mask | [string]<ip> The mask that separates host bits from network bits for this address. | ||||||
type | [string] Enum:
ipv4
ipv6
ipv6/pool
ipv6/range The type of address this is. | ||||||
vpc_nat_1_1 | [object] IPv4 address configured as a 1:1 NAT for this Interface. If no address is configured as a 1:1 NAT, Note: Only allowed for
|
errors | [array] |
IP Address RDNS Update
Updates the reverse DNS (RDNS) for a Linode’s IP Address. This may be done for both IPv4 and IPv6 addresses.
Setting the RDNS to null
for a public IPv4 address, resets it to the default “ip.linodeusercontent.com” RDNS value.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredThe ID of the Linode. |
address | [string]<ip> RequiredThe IP address. |
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/203.0.113.1
linode-cli linodes ip-update 123 \
203.0.113.1 \
--rdns test.example.org
Request Body Schema
rdns Nullable Required | [string] The 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. |
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",
"vpc_nat_1_1": {
"address": "192.0.2.1",
"subnet_id": 101,
"vpc_id": 111
}
}
{
"errors": null
}
Responses
address | [string]<ip> The IP address. | ||||||
gateway Nullable | [string]<ip> The default gateway for this address. | ||||||
linode_id | [integer] The 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 | [integer] The number of bits set in the subnet mask. | ||||||
public | [boolean] Whether this is a public or private IP address. | ||||||
rdns Nullable | [string] The 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 | [string] The Region this IP address resides in. | ||||||
subnet_mask | [string]<ip> The mask that separates host bits from network bits for this address. | ||||||
type | [string] Enum:
ipv4
ipv6
ipv6/pool
ipv6/range The type of address this is. | ||||||
vpc_nat_1_1 | [object] IPv4 address configured as a 1:1 NAT for this Interface. If no address is configured as a 1:1 NAT, Note: Only allowed for
|
errors | [array] |
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. See our Pricing Page for Region-specific pricing, which applies after migration is complete. 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.
vpc
details
- Cross DC migrations are not allowed for Linodes that have a
vpc
purpose Configuration Profile Interface. Host migrations within the same DC are permitted. - See the VPC documentation guide for its specifications and limitations.
vlan
details
- Only Next Generation Network (NGN) data centers support VLANs. Use the Regions ( /regions) endpoint to view the capabilities of data center regions. If a VLAN is attached to your Linode and you attempt to migrate or clone it to a non-NGN data center, the migration or cloning will not initiate. If a Linode cannot be migrated or cloned because of an incompatibility, you will be prompted to select a different data center or contact support.
- 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. - See the VLANs Overview guide to view additional specifications and limitations.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID of the Linode to migrate. |
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
Request Body Schema
region | [string] The 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 |
type | [string] Enum:
warm
cold
Default:
cold Type of migration used in moving to a new host or Linode type.
|
upgrade | [boolean] Default:
false When 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 |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
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 | [integer] RequiredID of the Linode to mutate. |
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
Request Body Schema
allow_auto_disk_resize | [boolean] Default:
true Automatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s data must fit within the smaller disk size. |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
Linode NodeBalancers View
Returns a list of NodeBalancers that are assigned to this Linode and readable by the requesting User.
Read permission to a NodeBalancer can be given to a User by accessing the User’s Grants Update ( PUT /account/users/{username}/grants) endpoint.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID of the Linode to look up |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123/nodebalancers
linode-cli linodes nodebalancers 123
Response Samples
{
"data": null,
"page": 1,
"pages": 1,
"results": 1
}
Responses
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_reset
event is generated when a root password reset is successful.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID of the Linode for which to reset its root password. |
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
Request Body Schema
root_pass Required | [string] The 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. |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
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 | [integer] RequiredID of the linode to reboot. |
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
Request Body Schema
config_id | [integer] The 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. |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
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
image
be supplied. - Requires a
root_pass
be supplied to use for the root User’s Account. - It is recommended to supply SSH keys for the root User using the
authorized_keys
field. - Linodes utilizing Metadata (
"has_user_data": true
) should includemetadata.user_data
in the rebuild request to continue using the service.
You also have the option to resize the Linode to a different plan by including the type
parameter with your request. Note that resizing involves migrating the Linode to a new hardware host, while rebuilding without resizing maintains the same hardware host. Resizing also requires significantly more time for completion of this command. The following additional conditions apply:
- 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 | [integer] RequiredID of the Linode to rebuild. |
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"
},
"type": "g6-standard-2",
"metadata": {
"user_data": "I2Nsb3VkLWNvbmZpZw=="
}
}' \
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"}' \
--type "g6-standard-2" \
--metadata.userdata "I2Nsb3VkLWNvbmZpZw=="
Request Body Schema
authorized_keys | [array] A list of public SSH keys that will be automatically appended
to the root user’s | ||
authorized_users | [array] A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root users | ||
booted | [boolean] Default:
true This field defaults to | ||
image Required | [string] An Image ID to deploy the Linode Disk from. Access the Images List (
GET /images) endpoint with authentication to view
all available Images. Official Linode Images start with | ||
metadata | [object] An object containing user-defined data relevant to the creation of Linodes.
| ||
root_pass Required | [string]<password>
7..128
charactersThis sets the root user’s password on a newly-created Linode Disk when deploying from an Image.
| ||
stackscript_data | [object]
<=
65535
charactersThis field is required only if the StackScript being deployed requires input data from the User for successful completion. See User Defined Fields (UDFs) for more details. This field is required to be valid JSON. Total length cannot exceed 65,535 characters. | ||
stackscript_id | [integer] A StackScript ID that will cause the referenced StackScript to be run during
deployment of this Linode. A compatible | ||
type | [string] The ID of the Linode Type to resize to with this request. |
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": null
}
Responses
alerts | [object]
| ||||||||||||
backups | [object] Information 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 | [string] A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | [boolean] Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | [string]<uuid> The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | [string] Enum:
kvm The virtualization software powering this Linode. | ||||||||||||
id | [integer] This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | [string] An Image ID to deploy the Linode Disk from. Access the Images List (
GET /images) endpoint with authentication to view
all available Images. Official Linode Images start with | ||||||||||||
ipv4 | [array]<ipv4> This 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 Nullable | [string]<ipv6/128> This Linode’s IPv6 SLAAC address. 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 | [string]
3..64
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 | [string] This is the Region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | [object] Information about the resources available to this Linode.
| ||||||||||||
status | [string] Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension A 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 | [array] An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | [string] This 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 | [boolean] The 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] |
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 | [integer] RequiredID of the Linode to rescue. |
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
Request Body Schema
devices | [object]
|
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
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.
You can also resize a Linode when using the Linode Rebuild command.
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | [integer] RequiredID of the Linode to resize. |
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
Request Body Schema
allow_auto_disk_resize | [boolean] Default:
true Automatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s data must fit within the smaller disk size. |
migration_type | [string] Enum:
warm
cold
Default:
cold Type of migration used in moving to a new host or Linode type.
|
type Required | [string] The ID representing the Linode Type. |
Response Samples
{}
{
"errors": null
}
Responses
errors | [array] |
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 | [integer] RequiredID 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": null
}
Responses
errors | [array] |
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 | [integer] RequiredID 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": null
}
Responses
cpu | [array] Percentage of CPU used. | ||||||||
io | [object] Input/Output statistics.
| ||||||||
netv4 | [object] IPv4 statistics.
| ||||||||
netv6 | [object] IPv6 statistics.
| ||||||||
title | [string] The title for this data set. |
errors | [array] |
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 | [integer] RequiredID of the Linode to look up. |
year | [integer] RequiredNumeric 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": null
}
Responses
cpu | [array] Percentage of CPU used. | ||||||||
io | [object] Input/Output statistics.
| ||||||||
netv4 | [object] IPv4 statistics.
| ||||||||
netv6 | [object] IPv6 statistics.
| ||||||||
title | [string] The title for this data set. |
errors | [array] |
Network Transfer View
Returns a Linode’s network transfer pool statistics for the current month.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID 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": null
}
Responses
billable | [integer] The amount of network transfer this Linode has used, in GB, past your monthly quota. |
quota | [integer] The amount of network transfer this Linode adds to your transfer pool, in GB, for the current month’s billing cycle. |
used | [integer] The amount of network transfer used by this Linode, in bytes, for the current month’s billing cycle. |
errors | [array] |
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 | [integer] RequiredID 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": null
}
Responses
bytes_in | [integer] The amount of inbound public network traffic received by this Linode, in bytes, for a specific year/month. |
bytes_out | [integer] The amount of outbound public network traffic sent by this Linode, in bytes, for a specific year/month. |
bytes_total | [integer] The total amount of public network traffic sent and received by this Linode, in bytes, for a specific year/month. |
errors | [array] |
Linode's Volumes List
View Block Storage Volumes attached to this Linode.
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | [integer] RequiredID 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": null,
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": null
}
Responses
data | [array] |
page | [integer] The current page. |
pages | [integer] The total number of pages. |
results | [integer] The total number of results. |
errors | [array] |
Kernels List
Lists available Kernels.
Due to the extensive list of available kernels, please keep pagination controls in mind when managing responses to this command.
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": null,
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": null
}
Responses
data | [array] |
page | [integer] The current page. |
pages | [integer] The total number of pages. |
results | [integer] The total number of results. |
errors | [array] |
Kernel View
Returns information about a single Kernel.
Authorizations
Path Parameters
kernelId | [string] RequiredID 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",
"built": "2018-01-01T00:01:01",
"deprecated": false,
"id": "linode/latest-64bit",
"kvm": true,
"label": "Latest 64 bit (4.15.7-x86_64-linode102)",
"pvops": false,
"version": "4.15.7"
}
{
"errors": null
}
Responses
architecture | [string] Enum:
x86_64
i386 The architecture of this Kernel. |
built | [string]<date-time> The date on which this Kernel was built. |
deprecated | [boolean] If this Kernel is marked as deprecated, this field has a value of true; otherwise, this field is false. |
id | [string] The unique ID of this Kernel. |
kvm | [boolean] If this Kernel is suitable for KVM Linodes. |
label | [string] The friendly name of this Kernel. |
pvops | [boolean] If this Kernel is suitable for paravirtualized operations. |
version | [string] Linux Kernel version. |
errors | [array] |