Linode logo

API Reference

Alpha Notes

Heads up! This version of our API is in alpha. It might change and could be broken. The documentation is incomplete as well.

To play with our new API during alpha, you need an invite. You can request one from alpha.linode.com.

  • We wipe the database every Sunday at 12:00 AM ET, and might do so at any other time without notice.
  • Everything in the alpha environment is free.
  • There are probably bugs! This is an alpha, after all.
  • We are willing to make breaking changes to the API during alpha.

We want your feedback! Submit issues on GitHub and join us on IRC in #linode on irc.oftc.net.

This documentation is for version 4 of the Linode API. For earlier versions, go here.

Introduction

The Linode API is an HTTP service that follows (to a large extent) REST style. Resources (like Linodes) have predictable, sane URLs that use standard HTTP methods to manipulate and return standard HTTP status codes to tell you how it went.

All API endpoints (starting from version 4) are located at https://api.alpha.linode.com/v4/*. Occasionally we will add features and improvements to our API - only certain changes will trigger a version bump:

  • Endpoint path changes
  • JSON properties removed or changed
  • Core changes (authentication, RESTful principles, etc)

Notably, the addition of new API endpoints and new properties on JSON blobs does not imply a new version number.

HTTP Methods  

GET
Gets information about a resource or resources
PUT
Edits information about a resource
POST
Creates a new resource
DELETE
Deletes a resource

The API exposes resources through various HTTP endpoints. You work with these resources through consistent use of HTTP verbs and a consistent tree of endpoints. The schema for the various resources available is documented in the objects section.

Authentication  

To use some API endpoints authentication is required. This is indicated by the Authenticated notation throughout the documentation. We use the basic OAuth workflow were you can create applications that integrate with Linode by registering those applications with us. You then use OAuth to authenticate on behalf of the user to request access to resources from their account.

To register your application go to login.alpha.linode.com/apps. We'll provide you with a client ID and a client secret. You'll have to keep the client secret private, but the client ID can be shared.

The Access Code

In the OAuth workflow it is a two step process to authenticate a user before you can start making API calls. You will first need to request an access code that can then be exchanged for an authorization token. To aid as many application developers as possible with their design we provide two methods for requesting an access code.

Through The Web

If you are making a web based application this is the recommended method for getting a user's authorization. When you want a user to log into your service, you can direct them to a URL similar to this:

https://login.alpha.linode.com/oauth/authorize?client_id=client_id

The user logs in to Linode and is presented the scope levels your application is requesting. Once the user accepts your request for access, we redirect them back to you with an access code. You may then exchange the access code for an authorization token.

There are additional parameters that you can supply in the query string of the above request. If you provided a redirect_uri when you sent the user to login.alpha.linode.com, they will be redirected to that URI. Otherwise, the default redirect URI associated with your OAuth client application will be used.

When the user is redirected, several parameters will be added to the query string: code, username, email, and state. The last parameter will match the state you gave us at the start of the flow. This allows you to ensure that the OAuth flow was initiated by your application, rather than by someone manually navigating to login.alpha.linode.com with your client_id. The username and email are just for convenience. The important parameter is the code, this is the access code you need to continue the OAuth flow.

You can include the following parameters in the query string when you direct your users to login.alpha.linode.com:

Parameter Description
client_id Required. Your application's client ID.
scopes A comma-delimited list of OAuth scopes you need.
redirect_uri Where to redirect the user after login. If provided, the redirect URI you registered your application with should match the start of this string. If you registered your app with http://example.org as the redirect URI, then this parameter must start with "http://example.org".
state An arbitrary token that will be returned to you at the end of the process.
Access Token

Once the user has logged in to Linode and you have received an access code, you will need to exchange that access code for an Authorization token. You do this by making the following HTTP request:

POST https://login.alpha.linode.com/oauth/token

Make this request as application/x-www-form-urlencoded or as multipart/form-data and include the following parameters in the POST body:

client_id
Your app's client ID
client_secret
Your app's client secret
code
The code you just received from the redirect

You'll get a response like this:


{
  "scopes": "linodes:create",
  "access_token": "03d084436a6c91fbafd5c4b20c82e5056a2e9ce1635920c30dc8d81dc7a6665c"
}

Note that we include the scopes here. In the future, we may change the login flow to allow the user to deny access to specific scopes. You should consider this list of scopes returned in the response as the final level granted as it may be different than the ones you asked for. Also included is the actual access_token. With this token, you can proceed to make authenticated HTTP requests with the API by adding this header to each request:

Authorization: token 03d084436a6c91fbafd5c4b20c82e5056a2e9ce1635920c30dc8d81dc7a6665c
OAuth Scopes

The above login flow will give you the minimum amount of access to a user's account. That is, you are only allowed to see their username and email address. If you want more access, you need to add OAuth scopes to the query string. An OAuth scope defines the level of access your OAuth token will receive. You can request a comma-delimited list of scopes by adding scopes=a,b,c to the query string of the login.alpha.linode.com URL.

A scope takes the form of resource:access, where the access to that particular resource is limited by the level the user grants to your application.

You may request the following levels of access for any given resource:

  • view - lowest level
  • modify
  • create
  • delete - highest level

In addition to the level of access you request, you will be granted each access level below it. For example, requesting modify access will also grant you view access, and requesting delete access will grant you full access to that resource (resource:* has the same effect).

Each API endpoint documented on this page includes the OAuth scope necessary to use that resource. It will look like this: linodes:view. You may also request * to get full access to a user's account, but this is highly discouraged. You should do your best to request the least amount of access needed for your application to function.

Lists & Objects  

There are generally two kinds of resources you can retrieve with a GET request: objects and lists. An object is a representation of an individual resource. It has an ID that can be used to retrieve it directly. A list is a collection of objects. You'll generally find lists of objects at /:type/:subtype, and an individual object at /:type/:subtype/:id.

Some objects contain lists of other objects, which you can get at /:type/:subtype/:id/:subtype. You can get an individual sub-object at /:type/:subtype/:id/:subtype/:id.

For example, you can list your Linodes at /linode/instances, and get a specific Linode with /linode/instances/123456. You can get the configs for this Linode from /linode/instances/123456/configs and a specific config profile from /linode/instances/123456/configs/5678.

Pagination  

Resource lists are always paginated. The response will look similar to this:


{
    "linodes": [ ... ],
    "page": 1,
    "total_pages": 10,
    "total_results": 248
}

Pages start at 1. You may get a particular page by adding ?page=2 to your URL. Each page has at most 25 results.

Editing Objects  

Some resource objects may be modified, however, these objects contain both mutable and immutable properties. The properties that are mutable in an object are indicated in the objects reference section, with this indicator: Editable.

To edit these objects, you can perform a PUT request against the resource whose body is the updated JSON. You can omit any of the fields or include fields you are not permitted to edit, however, changes to the latter will be ignored. This makes it simple for you to GET a resource, change a property in the JSON that is returned, and then PUT that JSON back to the same URL to update the object.

Filtering  

Resource lists are searchable by most fields they include (filterable fields are marked with a icon in the object reference).

Filters are passed in the X-Filter header, and are formated as JSON objects. Here is a request for all distributions whose vendor is "Debian":

curl "https://api.alpha.linode.com/v4/linode/distributions" \
    -H 'X-Filter: {
        "vendor": "Debian"
    }'

The filter object's keys are the keys of the object you're filtering, and the values are accepted values. You can add multiple filters by including more than one key (in this case, all recommended Debians):
curl "https://api.alpha.linode.com/v4/linode/distributions" \
    -H 'X-Filter: {
        "vendor": "Debian",
        "recommended": true
    }'

In the above example, both filters are combined with an "and" operation. However, if you wanted either Debian or recommended distributions, you can add an operator:
curl "https://api.alpha.linode.com/v4/linode/distributions" \
    -H 'X-Filter: {
        "+or": [
            { "vendor": "Debian" },
            { "recommended": true }
        ]
    }'

Each filter in the +or array is its own filter object, and all conditions in it are combined with an "and" operator as they were in the first example. Other operators are available:

curl "https://api.alpha.linode.com/v4/linode/distributions" \
    -H 'X-Filter: {
        "minimum_storage_size": {
            "+lte": 500
        }
    }'

You can combine and nest operators to construct arbitrarily-complex queries - say, give me all distributions which are either recommended or whose vendor is Debian, or who have a minimum_storage_size between 100 and 500 (inclusive).

Below is a list of all available operators. Operators are keys of a Filter JSON object, their value must be of the appropriate type, and they are evaluated as described below.

+and array All conditions must be true
+or array One condition must be true.
+gt number Value must be greater than number
+gte number Value must be greater than or equal to that number
+lt number Value must be less than number
+lte number Value must be less than or equal to that number
+contains string Given string must be in the value
+neq string Does not equal the value
+order-by string Attribute to order the results by - must be filterable
+order string Either "asc" or "desc". Defaults to "asc". Requires an '+order-by' be given.
curl "https://api.alpha.linode.com/v4/linode/distributions" \
    -H 'X-Filter: {
        "+or": [
            {
                "+or": [
                    {
                        "vendor": "Debian"
                    },
                    {
                        "recommended": true
                    }
                ]
            },
            {
                "+and": [
                    {
                        "minimum_storage_size": {
                            "+lte": 500
                        }
                    },
                    {
                        "minimum_storage_size": {
                            "+gte": 100
                        }
                    }
                ]
            }
        ]
    }'

Errors  

Success is indicated via standard HTTP status codes . Generally speaking, 2xx codes indicate success, 4xx codes indicate an error on your side, and 5xx codes indicate an error on our side. An error on your side might be an invalid input, a required parameter being omitted, and so on. Errors on our side are not going to happen often and we're probably going to be running around with our hair on fire if you ever see them.

Every request that returns errors will look something like this:


{
    "errors": [
        {
            "field": "datacenter",
            "reason": "Record not found"
        }
    ]
}

The errors field is an array of the things that went wrong with your request. We will try to include as many of the problems in the response as possible, but it's possible that fixing these errors and resubmitting may result in new errors coming back once we are able to get further along in the process of handling your request.

Within each error object, the field parameter will be included if the error pertains to a specific field in the JSON you've submitted. This will be omitted if there is no relevant field. The reason is a human-readable reason for the error, and will always be included.

HTTP Status Codes

200 OK The request was successful
400 Bad Request You submitted an invalid request (missing parameters, etc)
401 Unauthorized You failed to authenticate for this resource.
403 Forbidden You are authenticated, but don't have permission to do this.
404 Not Found The resource you're asking for does not exist.
420 Enhance Your Calm You've hit some sort of rate limit.
500 Internal Server Error We screwed up. Let support know (we probably already know).

API Endpoints 

Linodes  

Linode endpoints provide a means of managing the Linode objects on your account.

/v4/linode/instances Authenticated  

Manage the collection of Linodes your account may access.

GET  
linodes:view

Returns a list of Linodes.

GET /linode/instances
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances
POST  
linodes:create
Will cost money

Creates a new Linode.

Parameter Description
datacenter A datacenter ID to provision this Linode in.
type A Linode type ID to use for this Linode.
label
optional
The label to assign this Linode. Defaults to "linode". Must be 3-32 ASCII characters limited to letters, numbers, underscores, and dashes, starting and ending with a letter, and without two dashes or underscores in a row.
group
optional
The group to assign this Linode. Defaults to "empty". Must be 0-50 characters.
distribution
optional
The Distribution to deploy this Linode with. May not be included if 'backup' is sent.
root_pass
optional
The root password to use when sourcing this Linode from a distribution.
  • root_pass is required if the source provided is a distribution.
root_ssh_key
optional
A public SSH key file to install at `/root/.ssh/authorized_keys` when creating this Linode.
stackscript
optional
The stackscript ID to deploy with this disk.
  • Must provide a distribution. Distribution must be one that the stackscript can be deployed to.
stackscript_udf_responses
optional
UDF (user-defined fields) for this stackscript. Defaults to "{}".
  • Must match UDFs required by stackscript.
backup
optional
The Backup to restore to the newly created Linode. May not be included if 'distribution' is sent.
with_backup
optional
Subscribes this Linode with the Backup service. (Additional charges apply.) Defaults to "false".
POST /linode/instances
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "datacenter": "newark",
        "type": "linode2048.5"
    }' \
    https://api.alpha.linode.com/v4/linode/instances

/v4/linode/instances/:id Authenticated  

Manage a particular Linode your account may access.

GET  
linodes:view

Returns information about this Linode.

GET /linode/instances/:id
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id
PUT  
linodes:modify

Edits this Linode.

Parameter Description
group This Linode's display group.
label This Linode's display label. Must be 3-32 ASCII characters limited to letters, numbers, underscores, and dashes, starting and ending with a letter, and without two dashes or underscores in a row.

See the Linode object for the full reference.

PUT /linode/instances/:id
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{
      "label": "newlabel",
      "schedule": {
        "day": "Tuesday",
        "window": "W20"
      }
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id
DELETE  
linodes:delete

Deletes this Linode. This action cannot be undone.

DELETE /linode/instances/:id
curl -H "Authorization: token $TOKEN" \
    -X DELETE \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id

/v4/linode/instances/:id/disks Authenticated  

Manage the disks associated with this Linode.

GET  
linodes:view

Returns a list of disks.

GET /linode/instances/:id/disks
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/disks
POST  
linodes:modify

Creates a new disk.

Parameter Description
size Size in MB for this disk. Must be between 0 and the available space on the Linode.
distribution
optional
Optional distribution to deploy with this disk.
  • If no distribution is provided, a blank disk is created.
root_pass
optional
Root password to deploy distribution with.
  • root_pass is required if a distribution is provided.
root_ssh_key
optional
SSH key to add to root's authorized_keys.
label User-friendly string to name this disk. Must be 1-50 characters.
filesystem A filesystem for this disk.
read_only
optional
If true, this disk is read-only.
stackscript
optional
The stackscript ID to deploy with this disk.
  • Must provide a distribution. Distribution must be one that the stackscript can be deployed to.
stackscript_udf_responses
optional
UDF (user-defined fields) for this stackscript. Defaults to "{}".
  • Must match UDFs required by stackscript.
POST /linode/instances/:id/disks
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "label": "Example Disk",
        "filesystem": "ext4",
        "size": 4096
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/disks

/v4/linode/instances/:id/disks/:id Authenticated  

Manage a particular disk associated with this Linode.

GET  
linodes:view

Returns information about this disk.

GET /linode/instances/:id/disks/:id
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/disks/$disk_id
PUT  
linodes:modify

Updates a disk's metadata.

Parameter Description
size Size of this disk in MB.

See the Disk object for the full reference.

PUT /linode/instances/:id/disks/:id
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{
      "label": "New Disk Label"
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/disks/$disk_id
POST  
linodes:create

Duplicates this disk.

POST /linode/instances/:id/disks/:id
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/disks/$disk_id
DELETE  
linodes:delete

Deletes this disk. This action cannot be undone.

DELETE /linode/instances/:id/disks/:id
curl -H "Authorization: token $TOKEN" \
    -X DELETE \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/disks/$disk_id

/v4/linode/instances/:id/disks/:id/resize Authenticated  

Resizes the disk.

POST  
linodes:modify

Parameter Description
size The desired size of the disk in MB.
POST /linode/instances/:id/disks/:id/resize
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "size": 1024
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/disks/$disk_id/resize

/v4/linode/instances/:id/disks/:id/password Authenticated  

Resets the root password of a disk.

POST  
linodes:modify

Parameter Description
password New root password for the OS installed on this disk.
POST /linode/instances/:id/disks/:id/password
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "password": "hunter2"
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/disks/$disk_id/password

/v4/linode/instances/:id/configs Authenticated  

Manage the boot configs on this Linode.

GET  
linodes:view

Returns a list of configs for a given Linode.

GET /linode/instances/:id/configs
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/configs
POST  
linodes:modify

Creates a new config for a given Linode.

Parameter Description
kernel A kernel ID to boot this Linode with.
label The user-friendly label to name this config. Must be 1-48 characters.
disks Disks attached to this Linode config.
comments
optional
Optional field for arbitrary user comments on this config. Must be 1-255 characters.
ram_limit
optional
The maximum RAM the Linode will be given when booting this config. This defaults to the total RAM of the Linode. Must be between 0 and the Linode's total RAM.
root_device_ro
optional
Controls whether to mount the root disk read-only. Defaults to false.
devtmpfs_automount
optional
Populates the /dev directory early during boot without udev. Defaults to false.
run_level
optional
Sets the run level for Linode boot. Defaults to "default".
virt_mode
optional
Controls the virtualization mode. Defaults to "paravirt".
POST /linode/instances/:id/configs
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "label": "Arch Linux config",
        "kernel": "linode/latest_64",
        "disks": {
          "sda": 5567,
          "sdb": 5568
          }
        }
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/configs

/v4/linode/instances/:id/configs/:id Authenticated  

Manage a particular config for a given Linode.

GET  
linodes:view

Returns information about this Linode config.

GET /linode/instances/:id/configs/:id
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/configs/$config_id
PUT  
linodes:modify

Modifies a given Linode config.

Parameter Description
comments User-supplied comments about this config. Must be 1-255 characters.
devtmpfs_automount Populates the /dev directory early during boot without udev.
disks Disks attached to this Linode config.
initrd An initrd disk attached to this Linode config.
kernel
A Kernel object.
label Human-friendly label for this config. Must be 1-48 characters.
ram_limit Optional RAM limit in MB for uncommon operating systems. Must be between 0 and the Linode's total RAM.
root_device Root device to boot. Corresponding disk must be attached.
root_device_ro Controls whether to mount the root disk read-only.
run_level Sets the run level for Linode boot.
virt_mode Controls the virtualization mode.

See the Linode Config object for the full reference.

PUT /linode/instances/:id/configs/:id
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{
        "label": "Edited config",
        "kernel": {
          "id": "linode/latest_64"
        },
        "disks": {
          "sda": {
            "id": 5567
          }
        }
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/configs/$config_id
DELETE  
linodes:modify

Deletes a given Linode config.

DELETE /linode/instances/:id/configs/:id
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X DELETE \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/configs/$config_id

/v4/linode/instances/:id/boot Authenticated  

Boots a Linode.

POST  
linodes:modify

Parameter Description
config
optional
Optional config ID to boot the linode with.
POST /linode/instances/:id/boot
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "config": 5567
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/boot

/v4/linode/instances/:id/shutdown Authenticated  

Shuts down a Linode.

POST  
linodes:modify

POST /linode/instances/:id/shutdown
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/shutdown

/v4/linode/instances/:id/reboot Authenticated  

Reboots a Linode.

POST  
linodes:modify

Parameter Description
config
optional
Optional config ID to boot the linode with.
POST /linode/instances/:id/reboot
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "config": 5567

    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/reboot

/v4/linode/instances/:id/rescue Authenticated  

Reboots a Linode in Rescue Mode.

POST  
linodes:modify

Parameter Description
disks
optional
Disks to include during Rescue.
POST /linode/instances/:id/rescue
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "disks": {
          "sda": 5567,
          "sdb": 5568
          }
        }
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/rescue

/v4/linode/instances/:id/resize Authenticated  

Resizes a Linode to a new Linode type.

POST  
linodes:modify
Will cost money

Parameter Description
type A Linode type to use for this Linode.
POST /linode/instances/:id/resize
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "type": "standard-1"
        }
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/resize

/v4/linode/instances/:id/backups Authenticated  

Returns information about this Linode's available backups.

GET  
linodes:view

Returns a Backups Response with information on this Linode's available backups.

GET /linode/instances/:id/backups
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/backups
POST  
linodes:modify

Creates a snapshot backup of a Linode.

WARNING

If you already have a snapshot, this is a destructive operation. The previous snapshot will be deleted.

Parameter Description
label
optional
Human-friendly label for this snapshot. Must be 1-50 characters.
POST /linode/instances/:id/backups
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "label": "Linode123456 snapshot",
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/backups

/v4/linode/instances/:id/backups/enable Authenticated  

Enables the backup service on the given Linode.

POST  
linodes:modify
Will cost money

POST /linode/instances/:id/backups/enable
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/backups/enable

/v4/linode/instances/:id/backups/cancel Authenticated  

Cancels the backup service on the given Linode.

POST  
linodes:delete

POST /linode/instances/:id/backups/cancel
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/backups/cancel

/v4/linode/instances/:id/backups/:id/restore Authenticated  

Restores a backup to a Linode.

POST  
linodes:create

Parameter Description
linode The ID of the Linode to restore a backup to.
overwrite
optional
If true, deletes all disks and configs on the target linode before restoring.
POST /linode/instances/:id/backups/:id/restore
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "linode": 123456,
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/backups/$backup_id/restore

/v4/linode/instances/:id/ips Authenticated  

View networking information for this Linode.

GET  
linodes:view

Returns a Linode Networking Object.

GET /linode/instances/:id/ips
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/ips
POST  
linodes:modify
Will cost money

Allocates a new IP Address for this Linode.

Parameter Description
type An IP Address Type for this IP Address. Public IP's incur a monthly cost.
POST /linode/instances/:id/ips
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "type": "private"
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/ips

/v4/linode/instances/:id/ips/sharing  

POST  

Sets IP Sharing for this Linode.

Parameter Description
ips A list of IP Addresses this Linode will share.
POST /linode/instances/:id/ips/sharing

/v4/linode/instances/:id/ips/:ip_address Authenticated  

Manage a particular IP Address associated with this Linode.

GET  
linodes:view

Returns information about this IPv4 or IPv6 Address.

GET /linode/instances/:id/ips/:ip_address
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/ips/$ip_address
PUT  
linodes:modify

Update this IP Address

Parameter Description
rdns Reverse DNS address for this IP Address. Null to reset.

See the IPv4 Address object for the full reference.

PUT /linode/instances/:id/ips/:ip_address
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{
        "rdns":"example.org"
    }' \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/ips/$ip_address

/v4/linode/instances/:id/rebuild Authenticated  

Deletes all Disks and Configs on this Linode, then deploys a new Distribution to this Linode with the given attributes.

POST  
linodes:modify

Parameter Description
distribution An Distribution to deploy to this Linode.
root_pass The root password for the new deployment.
root_ssh_key
optional
The key to authorize for root access to the new deployment.
stackscript
optional
The stackscript ID to deploy with this disk.
  • Must provide a distribution. Distribution must be one that the stackscript can be deployed to.
stackscript_udf_responses
optional
UDF (user-defined fields) for this stackscript. Defaults to "{}".
  • Must match UDFs required by stackscript.
POST /linode/instances/:id/rebuild
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST \
    https://api.alpha.linode.com/v4/linode/instances/$linode_id/rebuild \
    -d '{"distribution":"linode/debian8","root_pass":"hunter7"}'

Account  

Account endpoints provide a means of viewing user profile objects, as well as managing OAuth Clients and Tokens.

/v4/account/profile  

Manage your user information.

GET  

Returns your user information.

GET /account/profile
curl https://api.alpha.linode.com/v4/account/profile
PUT  

Edits your account profile.

PUT /account/profile
curl -H "Content-Type: application/json" \
  -H "Authorization: token $TOKEN" \
  -X PUT -d '{
        "username": "jsmith",
        "email": "jsmith@mycompany.com",
        "timezone": "US/Eastern",
        "email_notifications": true,
        "ip_whitelist_enabled": true,
        "lish_auth_method": "password_keys",
        "authorized_keys": ""
      }
    }' \
    https://api.alpha.linode.com/v4/account/profile

/v4/account/profile/password  

POST  

Change your password.

POST /account/profile/password
curl -H "Content-Type: application/json" \
  -H "Authorization: token $TOKEN" \
  -X POST -d '{
      "password":"hunter7"
  }' \
  https://api.alpha.linode.com/v4/account/profile/password

/v4/account/profile/tfa-enable  

POST  

Begin enabling TFA on your account. Returns a two-factor secret that you must validate with the tfa-enable-confirm endpoint to require two-factor for future logins.

POST /account/profile/tfa-enable
curl -H "Content-Type: application/json" \
  -H "Authorization: token $TOKEN" \
  -X POST \
  https://api.alpha.linode.com/v4/account/profile/tfa-enable

/v4/account/profile/tfa-enable-confirm  

POST  

Confirm your two-factor secret and require TFA for future logins.

Parameter Description
tfa-code The code generated using the two-factor secret you got from tfa-enable
POST /account/profile/tfa-enable-confirm
curl -H "Content-Type: application/json" \
  -H "Authorization: token $TOKEN" \
  -X POST -d '{
    "tfa-code": "123456"
  }' \
  https://api.alpha.linode.com/v4/account/profile/tfa-enable-confirm

/v4/account/profile/tfa-disable  

POST  

Disable TFA on your account. Future logins will not require TFA.

POST /account/profile/tfa-disable
curl -H "Content-Type: application/json" \
  -H "Authorization: token $TOKEN" \
  -X POST \
  https://api.alpha.linode.com/v4/account/profile/tfa-disable

/v4/account/tokens  

Manage OAuth Tokens created for your user.

GET  
tokens:view

Get a list of all OAuth Tokens active for your user. This includes first-party (manager) tokens, third-party OAuth Tokens, and Personal Access Tokens.

GET /account/tokens
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/account/tokens
POST  
tokens:create

Creates a new Personal Access Token for your user with the given scopes and expiry. This token can subsequently be used to access the API and make any requests it has OAuth Scopes for.

Parameter Description
label
optional
The label for this Personal Access Token. For your reference only.
expiry
optional
If provided, when this Personal Access Token will expire. If omitted, the resulting token will be valid until it is revoked.
scopes
optional
The OAuth Scopes this token will be created with. If omitted, the resulting token will have all OAuth Scopes.
POST /account/tokens
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
      "scopes": "linodes:view;domains:view"
    }' \
    https://api.alpha.linode.com/v4/account/tokens

/v4/account/tokens/:id  

Manage individual OAuth Tokens for your user.

GET  
tokens:view

Get a single token.

GET /account/tokens/:id
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/account/tokens/123
PUT  
tokens:modify

Edit a token's label.

Parameter Description

See the OAuth Token object for the full reference.

PUT /account/tokens/:id
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{
      "label": "test-new-label"
    }' \
    https://api.alpha.linode.com/v4/account/tokens/123
DELETE  
tokens:delete

Expire an OAuth Token for your user.

DELETE /account/tokens/:id
curl -H "Authorization: token $TOKEN" \
    -X DELETE \
    https://api.alpha.linode.com/v4/account/tokens/123

/v4/account/settings  

Manage your account settings.

GET  

Returns your account settings.

GET /account/settings
curl https://api.alpha.linode.com/v4/account/settings
PUT  

Edits your account settings.

PUT /account/settings
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{
      "address_1": "123 Main St.",
      "address_2": "Suite 101",
      "city": "Philadelphia",
      "company": "My Company, LLC",
      "country": "US",
      "email": "jsmith@mycompany.com",
      "first_name": "John",
      "last_name": "Smith",
      "network_helper": true,
      "phone": "555-555-1212",
      "state": "PA",
      "zip": 19102
      }
    }' \
    https://api.alpha.linode.com/v4/account/settings

/v4/account/clients Authenticated  

Manage the collection of OAuth client applications your account may access.

GET  
clients:view

Returns a list of clients.

GET /account/clients
curl -H "Authorization; token $TOKEN" \
    https://api.alpha.linode.com/v4/account/clients
POST  
clients:create

Registers a new OAuth client application.

Parameter Description
name A name for the new client application. Must be 1-128 characters.
redirect_uri A URL to redirect to after the OAuth flow has completed. Must be 1-512 characters.
POST /account/clients
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "name": "Example app",
        "redirect_uri": "https://oauthreturn.example.org/",
    }' \
    https://api.alpha.linode.com/v4/account/clients

/v4/account/clients/:id Authenticated  

Manage a particular OAuth client application your account may access.

GET  
clients:view

Returns information about this OAuth client.

GET /account/clients/:id
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/account/clients/$client_id
PUT  
clients:modify

Edits this OAuth client.

PUT /account/clients/:id
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{
        "name": "Updated app name",
        "redirect_uri": "https://newredirect.example.org/",
    }' \
    https://api.alpha.linode.com/v4/account/clients/$client_id
DELETE  
clients:delete

Delete this OAuth application. This action cannot be undone.

DELETE /account/clients/:id
curl -H "Authorization: token $TOKEN" \
    -X DELETE \
    https://api.alpha.linode.com/v4/account/clients/$client_id

/v4/account/clients/:id/reset_secret Authenticated  

Reset the OAuth application's client secret.

POST  
clients:modify

POST /account/clients/:id/reset_secret
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST \
    https://api.alpha.linode.com/v4/account/clients/$client_id/reset_secret

/v4/account/clients/:id/thumbnail Authenticated  

Manage the OAuth application's thumbnail image.

GET  
clients:view

Retrieve the OAuth application's current thumbnail image.

GET /account/clients/:id/thumbnail
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/account/clients/$client_id/thumbnail
PUT  
clients:modify

Set or update the OAuth application's thumbnail image. If the image is larger than 128x128 it will be scaled down.

PUT /account/clients/:id/thumbnail
curl -H "Content-Type: image/png" \
    -H "Authorization: token $TOKEN" \
    -X PUT \
    --data-binary "@/path/to/image"
    https://api.alpha.linode.com/v4/account/clients/$client_id/thumbnail

/v4/account/users  

Returns a list of User objects associated with your account.

GET  

GET /account/users
curl https://api.alpha.linode.com/v4/account/users

/v4/account/users/:username  

Returns information about a specific user associated with your account.

GET  

GET /account/users/:username
curl https://api.alpha.linode.com/v4/account/users/$username

Networking  

Networking endpoints provide a means of viewing networking objects.

/v4/networking/ipv4 Authenticated  

View and manage IPv4 Addresses you own.

GET  
ips:view

Returns a list of IPv4 Addresses

GET /networking/ipv4
curl -H "Authorization: token $TOKEN" \
  https://api.alpha.linode.com/v4/networking/ipv4
POST  
ips:create
Will cost money

Create a new Public IPv4 Address

Parameter Description
linode The Linode ID to assign this IP to.
POST /networking/ipv4
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{"linode":123}' \
    https://api.alpha.linode.com/v4/networking/ipv4

/v4/networking/ipv4/:address Authenticated  

Manage a single IPv4 Address

GET  
ips:get

Returns a single IPv4 Address

GET /networking/ipv4/:address
curl -H "Authorization: token $TOKEN" \
  https://api.alpha.linode.com/v4/networking/ipv4/97.107.143.37
PUT  
ips:modify

Update RDNS on one IPv4 Address. Set RDNS to null to reset.

PUT /networking/ipv4/:address
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{"rdns":"example.org"}' \
    https://api.alpha.linode.com/v4/networking/ipv4/97.107.143.37

/v4/networking/ipv6 Authenticated  

GET  
ips:view

Returns a list of IPv6 Pools.

GET /networking/ipv6
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/networking/ipv6

/v4/networking/ipv6/:address Authenticated  

Manage a single IPv6 Address. Address in URL can be as compressed as you want.

GET  
ips:view

Return a single IPv6 Address.

GET /networking/ipv6/:address
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/networkint/ipv6/2600:3c01::2:5001
PUT  
ips:modify

Set RDNS on a single IPv6 Address.

PUT /networking/ipv6/:address
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X PUT -d '{"rdns":"example.org"}' \
    https://api.alpha.linode.com/v4/networking/ipv6/2600:3c01::2:5001

/v4/networking/ip-assign Authenticated  

Assigns an IPv4 address to a Linode.

POST  
linodes:access

Parameter Description
datacenter The datacenter where the IPv4 address and Linode are located.
assignments An array of IPv4 addresses and the Linode IDs they will be assigned to
POST /networking/ip-assign
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "datacenter": "newark",
        "assignments": [
          {"address": "210.111.22.95", "linode_id": 134504},
          {"address": "190.12.207.11", "linode_id": 119034},
        ]
    }' \
https://api.alpha.linode.com/v4/networking/ip-assign

Types  

Type endpoints provide a means of viewing service objects.

/v4/linode/types  

Returns collection of types.

GET  

Returns list of services.

GET /linode/types
curl https://api.alpha.linode.com/v4/linode/services

/v4/linode/types/:id  

Returns information about a specific Linode type offered by Linode.

GET  

Returns information about this service.

GET /linode/types/:id
curl https://api.alpha.linode.com/v4/linode/services/$service_id

Distributions  

Distribution endpoints provide a means of viewing distribution objects.

/v4/linode/distributions  

View the collection of distributions.

GET  

Returns a list of distributions.

GET /linode/distributions
curl https://api.alpha.linode.com/v4/linode/distributions

/v4/linode/distributions/:id  

Returns information about a specific distribution.

GET  

Returns information about this distribution.

GET /linode/distributions/:id
curl https://api.alpha.linode.com/v4/linode/distributions/$distribution_id

Kernels  

Kernel endpoints provide a means of viewing kernel objects.

/v4/linode/kernels  

Returns collection of kernels.

GET  

Returns list of kernels.

GET /linode/kernels
curl https://api.alpha.linode.com/v4/linode/kernels

/v4/linode/kernels/:id  

Returns information about a specific kernel.

GET  

Returns information about this kernel.

GET /linode/kernels/:id
curl https://api.alpha.linode.com/v4/linode/kernels/$kernel_id

StackScripts  

StackScript endpoints provide a means of managing the StackScript objects accessible from your account.

/v4/linode/stackscripts  

View public StackScripts.

GET  

Returns a list of public StackScripts. Results can be filtered. Include '"mine": true' in the filter dict to see only StackScripts you created.

GET /linode/stackscripts
curl https://api.alpha.linode.com/v4/linode/stackscripts
POST  
stackscripts:create

Create a new StackScript.

Parameter Description
label Label of StackScript. Must be 3-128 characters.
description
optional
Description of the StackScript.
distributions A list of distributions compatible with StackScript.
is_public
optional
If true, this StackScript will be publicly visible in the Linode StackScript library. Defaults to False.
rev_note
optional
Release notes for this revision. Must be 0-512 characters.
script The shell script to run on boot.
POST /linode/stackscripts
curl -H "Content-Type: application/json" \
  -H "Authorization: token $TOKEN" \
  -X POST -d '{
    "label": "Initial Label",
    "distributions": ["linode/ubuntu15.4", "linode/ubuntu15.10"],
    "script": "#!..."
  }' \
  https://api.alpha.linode.com/v4/linode/stackscripts

/v4/linode/stackscripts/:id Authenticated  

Manage a particular StackScript.

GET  
stackscripts:view

Returns information about this StackScript.

GET /linode/stackscripts/:id
curl -H "Content-Type: application/json" \
  -H "Authorization: token $TOKEN" \
  -X GET \
  https://api.alpha.linode.com/v4/linode/stackscripts/$stackscript_id
PUT  
stackscripts:modify

Edits this StackScript.

Parameter Description
label This StackScript's display label. Must be 3-128 characters.
description In-depth information on what this StackScript does.
distributions A list of distributions this StackScript is compatible with.
is_public Publicize StackScript in the Linode StackScript library. Note that StackScripts cannot be changed to private after they have been public.
rev_note The most recent note about what was changed for this revision.
script The actual script body to be executed.

See the StackScript object for the full reference.

PUT /linode/stackscripts/:id
curl -H "Content-Type: application/json" \
  -H "Authorization: token $TOKEN" \
  -X PUT -d '{
    "label": "New Label"
  }' \
  https://api.alpha.linode.com/v4/linode/stackscripts/$stackscript_id
DELETE  
stackscripts:delete

Deletes this StackScript. This action cannot be undone.

DELETE /linode/stackscripts/:id
curl -H "Authorization: token $TOKEN" \
  -X DELETE \
  https://api.alpha.linode.com/v4/linode/stackscripts/$stackscript_id

Datacenters  

Datacenter endpoints provide a means of viewing datacenter objects.

/v4/datacenters  

Returns collection of datacenters.

GET  

Returns list of datacenters.

GET /datacenters
curl https://api.alpha.linode.com/v4/datacenters

/v4/datacenters/:id  

Return a particular datacenter.

GET  

Returns information about this datacenter.

GET /datacenters/:id
curl https://api.alpha.linode.com/v4/datacenters/$datacenter_id

DNS Zones  

DNS Zone endpoints provide a means of managing the DNS DNS Zone objects on your account. Note: the validation rules for DNS records are too complicated to document here. We'll just direct you to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).

/v4/dns/zones Authenticated  

Manage the collection of DNS Zones your account may access.

GET  
dnszones:view

Returns a list of DNS Zones.

GET /dns/zones
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/dns/zones
POST  
dnszones:create

Create a DNS Zone.

Parameter Description
dnszone The DNS Zone name.
type DNS Zone type as master or slave.
soa_email
optional
Start of Authority (SOA) contact email.
description
optional
A description to keep track of this DNS Zone.
refresh_sec
optional
Time interval before the DNS Zone should be refreshed, in seconds.
retry_sec
optional
Time interval that should elapse before a failed refresh should be retried, in seconds.
expire_sec
optional
Time value that specifies the upper limit on the time interval that can elapse before the DNS Zone is no longer authoritative, in seconds.
ttl_sec
optional
Time interval that the resource record may be cached before it should be discarded, in seconds.
status
optional
The status of the DNS Zone; it can be disabled, active, or edit_mode.
master_ips
optional
An array of IP addresses for this DNS Zone.
axfr_ips
optional
An array of IP addresses allowed to AXFR the entire DNS Zone.
display_group
optional
A display group to keep track of this DNS Zone.
POST /dns/zones
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "dnszone": "example.com",
        "type": "master",
        "soa_email": "admin@example.com",
        "description": "Example Description",
        "refresh_sec": 14400,
        "retry_sec": 3600,
        "expire_sec": 604800,
        "ttl_sec": 3600,
        "status": "active",
        "master_ips": ["127.0.0.1","255.255.255.1","123.123.123.7"],
        "axfr_ips": ["44.55.66.77"],
        "display_group": "Example Display Group"
    }'
    https://api.alpha.linode.com/v4/dns/zones

/v4/dns/zones/:id Authenticated  

GET  
dnszones:view

Returns information for the DNS Zone identified by :id.

GET /dns/zones/:id
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/dns/zones/$dnszone_id
PUT  
dnszones:modify

Modifies a given DNS Zone.

Parameter Description
dnszone The DNS Zone name.
soa_email Start of Authority (SOA) contact email.
description A description to keep track of this DNS Zone.
refresh_sec Time interval before the DNS Zone should be refreshed, in seconds.
retry_sec Time interval that should elapse before a failed refresh should be retried, in seconds.
expire_sec Time value that specifies the upper limit on the time interval that can elapse before the DNS Zone is no longer authoritative, in seconds.
ttl_sec Time interval that the resource record may be cached before it should be discarded, in seconds.
status The status of the DNS Zone it can be disabled, active, or edit_mode.
master_ips An array of IP addresses for this DNS Zone.
axfr_ips An array of IP addresses allowed to AXFR the entire DNS Zone.
display_group A display group to keep track of this DNS Zone.

See the DNS Zones object for the full reference.

PUT /dns/zones/:id
curl -H "Content-Type: application/json" \
  -H "Authorization: token TOKEN" \
  -X PUT -d '{
    "dnszone": "examplechange.com",
    "description": "The changed description",
    "display_group": "New display group",
    "status": "edit_mode",
    "soa_email": "newemail@example.com",
    "retry_sec": 3602,
    "master_ips": ["123.456.789.101", "192.168.1.1", "127.0.0.1"],
    "axfr_ips": ["55.66.77.88"],
    "expire_sec": 604802,
    "refresh_sec": 14402,
    "ttl_sec": 3602
  }'
  https://api.alpha.linode.com/v4/dns/zones/$dnszone_id
DELETE  
dnszones:modify

Deletes the DNS zone. This action cannot be undone.

DELETE /dns/zones/:id
curl -H "Authorization: token $TOKEN" \
    -X DELETE
    https://api.alpha.linode.com/v4/dns/zones/$dnszone_id

/v4/dns/zones/:id/records Authenticated  

Manage the collection of DNS Zone Records your account may access.

GET  
dnszones:view

Returns a list of DNS Zone Records.

GET /dns/zones/:id/records
curl -H "Authorization: token $TOKEN" \
    https://api.alpha.linode.com/v4/dns/zones/$dnszone_id/records
POST  
dnszones:create

Create a DNS Zone Record.

Parameter Description
type Type of record.
name
optional
The hostname or FQDN. When type=MX the subdomain to delegate to the Target MX server. Must be 1-100 characters.
target
optional
When Type=MX the hostname. When Type=CNAME the target of the alias. When Type=TXT the value of the record. When Type=A or AAAA the token of '[remote_addr]' will be substituted with the IP address of the request.
priority
optional
Priority for MX and SRV records.
weight
optional
A relative weight for records with the same priority, higher value means more preferred.
port
optional
The TCP or UDP port on which the service is to be found.
service
optional
The service to append to an SRV record.
protocol
optional
The protocol to append to an SRV record.
ttl
optional
Time interval that the resource record may be cached before it should be discarded. In seconds. Leave as 0 to accept our default.
POST /dns/zones/:id/records
curl -H "Content-Type: application/json" \
    -H "Authorization: token $TOKEN" \
    -X POST -d '{
        "type": "A",
        "target": "123.456.789.101",
        "name": "sub.example.com"
    }'
    https://api.alpha.linode.com/v4/dns/zones/$dnszone_id/records

/v4/dns/zones/:id/records/:id Authenticated  

GET  
dnszones:view

Returns information for the DNS Zone Record identified by ":id".

GET /dns/zones/:id/records/:id
curl -H "Authorization: token $TOKEN" \
  https://api.alpha.linode.com/v4/dns/zones/$dnszone_id/records/$record_id
PUT  
dnszones:modify

Modifies a given DNS Zone Record.

Parameter Description
name The hostname or FQDN. When type=MX the subdomain to delegate to the Target MX server. Must be 1-100 characters.
target When type=MX the hostname. When type=CNAME the target of the alias. When type=TXT the value of the record. When type=A or AAAA the token of '[remote_addr]' will be substituted with the IP address of the request.
priority Priority for MX and SRV records.
weight A relative weight for records with the same priority, higher value means more preferred.
port The TCP or UDP port on which the service is to be found.
service The service to append to an SRV record. Must conform to RFC2782 standards.
protocol The protocol to append to an SRV record. Must conform to RFC2782 standards.
ttl_sec Time interval that the resource record may be cached before it should be discarded, in seconds. Leave as 0 to accept our default.

See the DNS Zone Records object for the full reference.

PUT /dns/zones/:id/records/:id
curl -H "Content-Type: application/json" \
  -H "Authorization: token TOKEN" \
  -X PUT -d '{
        "target": "123.456.789.102",
        "name": "sub2.example.com"
  }'
  https://api.alpha.linode.com/v4/dns/zones/$dnszone_id/records/$record_id
DELETE  
dnszones:modify

Deletes the DNS Zone Record. This action cannot be undone.

DELETE /dns/zones/:id/records/:id
curl -H "Authorization: token $TOKEN" \
  -X DELETE
  https://api.alpha.linode.com/v4/dns/zones/$dnszone_id/records/$record_id

Events  

Event endpoints provide a means of viewing event notifications.

/v4/account/events Authenticated  

View the collection of events.

GET  

Returns a list of events.

GET /account/events
curl https://api.alpha.linode.com/v4/account/events

/v4/account/events/:id Authenticated  

Returns information about a specific event.

GET  

Returns information about this event.

GET /account/events/:id
curl https://api.alpha.linode.com/v4/account/event/123

/v4/account/events/:id/seen Authenticated  

POST  

Marks all events up to and including :id as seen.

POST /account/events/:id/seen
curl https://api.alpha.linode.com/v4/account/event/123/seen

/v4/account/events/:id/read Authenticated  

POST  

Updates specific event to designate that it has been read.

POST /account/events/:id/read
curl https://api.alpha.linode.com/v4/account/event/123/read

Object Reference  

The Linode API will return JSON objects to describe the various kinds of objects you can manage with it. These objects will always include an identifier, which will be a string used to reference that object. These identifiers, called "labels," are returned in the "id" attribute.

Generally speaking, you may submit objects you receive through GET requests to the same endpoint you received them from, with a PUT request, to edit details of that object. Not all properties are editable, see the reference for each object type for a list of editable properties.

Backup  

Backup objects represent a specific backup of a Linode.

Property Description
id An integer.
label Human-friendly backup name. Must be 1-255 characters.
status Status of the backup.
type Whether this is a snapshot or an auto backup.
datacenter
A Datacenter object.
created ISO 8601 datetime.
updated ISO 8601 datetime.
finished An ISO 8601 datetime of when the backup completed.
configs A JSON Array of config labels that were included in this backup.
disks A JSON Array of JSON Objects describing the disks included in this backup.
availability If this backup is available, which backup slot it is in. Otherwise, unavailable.

Status Enumeration 

Value Description
paused Backup job is currently suspended.
pending Backup job has not started yet.
running Backup job is currently running.
needsPostProcessing Backup needs some finishing touches.
failed Backup job failed.
userAborted Backup (snapshot) was aborted by user.

Type Enumeration 

Value Description
auto A backup that is automatically created when Backups are enabled.
snapshot A backup that is manually created by the User.

BackupAvailability Enumeration 

Value Description
unavailable This backup cannot be restored.
daily This is your daily backup, and can be restored.
weekly This is one of your weekly backups, and can be restored.
{
"id": 123456,
"label": "A label for your snapshot",
"status": "successful", Status enum
"type": "snapshot", Type enum
"datacenter": datacenter object {
"id": "newark",
"label": "Newark, NJ",
"country": "us"
} ,
"created": "2015-09-29T11:21:01",
"updated": "2015-09-29T11:21:01",
"finished": "2015-09-29T11:21:01",
"configs": [ "My Debian8 Profile" ],
"disks": [ disk object {
"label": "My Debian8 Disk",
"size": 24064,
"filesystem": "ext4"
} , {
"label": "swap",
"size": 512,
"filesystem": "swap"
} ],
"availability": "daily" BackupAvailability enum
}

Linode Backups Response  

Information on a Linode's available Backups

Property Description
daily
A object.
weekly This Linode's current weekly backups. Between 0 and 2 items.
snapshot This Linode's current and in progress snapshots.
{
"daily": Backup object {
"id": 123456,
"status": "finished",
"created": "2017-01-01 07:00:12 -0500",
"finished": "2017-01-01 07:08:32 -0500",
"label": "",
"datacenter": "newark",
"configs": [ "My Ubuntu 15.10 Profile" ],
"disks": [ {
"filesystem": "ext4",
"label": "My Ubuntu 15.10 Disk",
"size": 1024
} , {
"filesystem": "swap",
"label": "swap",
"size": 512
} ]
} ,
"weekly": [ Backup object {
"id": 142359,
"status": "finished",
"created": "2016-12-26 06:35:32 -0500",
"finished": "2016-12-26 06:41:53 -0500",
"label": "",
"datacenter": "newark",
"configs": [ "My Ubuntu 15.10 Profile" ],
"disks": [ {
"filesystem": "ext4",
"label": "My Ubuntu 15.10 Disk",
"size": 1024
} , {
"filesystem": "swap",
"label": "swap",
"size": 512
} ]
} , {
"id": 901234,
"status": "finished",
"created": "2016-12-19 06:46:16 -0500",
"finished": "2016-12-19 06:49:02 -0500",
"label": "",
"datacenter": "newark",
"configs": [ "My Ubuntu 15.10 Profile" ],
"disks": [ {
"filesystem": "ext4",
"label": "My Ubuntu 15.10 Disk",
"size": 1024
} , {
"filesystem": "swap",
"label": "swap",
"size": 512
} ]
} ],
"snapshot": {
"current": Backup object {
"id": 92348,
"status": "finished",
"created": "2016-12-01 05:30:00 -0500",
"finished": "2016-12-01 05:33:45 -0500",
"label": "",
"datacenter": "newark",
"configs": [ "My Ubuntu 15.10 Profile" ],
"disks": [ {
"filesystem": "ext4",
"label": "My Ubuntu 15.10 Disk",
"size": 1024
} , {
"filesystem": "swap",
"label": "swap",
"size": 512
} ]
} ,
"in_progress": null
}
}

Datacenter  

Datacenter objects describe the datacenters available for Linode services.

Property Description
id A string.
label Human-friendly datacenter name.
country Country

Datacenter Enumeration 

Value Description
dallas Dallas, TX
fremont Fremont, CA
atlanta Atlanta, GA
newark Newark, NJ
london London, England, UK
singapore Singapore, SG
frankfurt Frankfurt, DE
{
"id": "newark",
"label": "Newark, NJ",
"country": "US"
}

Disk  

Disk objects are disk images that are attached to a Linode.

Property Description
id An integer.
label Human-friendly disk name. Must be 1-50 characters.
status Status of the disk.
size Size of this disk in MB.
filesystem The filesystem on the disk.
created ISO 8601 datetime.
updated ISO 8601 datetime.

Status Enumeration 

Value Description
ok No disk jobs are running.
deleting This disk is being deleted.
creating This disk is being created.
migrating This disk is being migrated.
cancelling-migration The disk migration is being cancelled.
duplicating This disk is being duplicated.
resizing This disk is being resized.
restoring This disk is being restored.
copying This disk is being copied.
freezing This disk is being frozen.
thawing This disk is being thawed.

Filesystem Enumeration 

Value Description
raw No filesystem, just a raw binary stream.
swap Linux swap area
ext3 The ext3 journaling filesystem for Linux.
ext4 The ext4 journaling filesystem for Linux.
initrd initrd (uncompressed initrd, ext2, max 32 MB)
{
"id": 123456,
"label": "Ubuntu 14.04 Disk",
"status": "ok", Status enum
"size": 1000,
"filesystem": "ext4", Filesystem enum
"created": "2015-09-29T11:21:01",
"updated": "2015-09-29T11:21:01"
}

Distribution  

Distribution objects describe a Linux distribution supported by Linode.

Property Description
id A string.
created ISO 8601 datetime.
label The user-friendly name of this distribution.
minimum_storage_size The minimum size required for the distrbution image.
recommended True if this distribution is recommended by Linode.
vendor The upstream distribution vendor. Consistent between releases of a distro.
x64 True if this is a 64-bit distribution.
{
"id": "linode/Arch2014.10",
"created": "2014-12-24 13:00:09 -0500",
"label": "Arch Linux 2014.10",
"minimum_storage_size": 800,
"recommended": true,
"vendor": "Arch",
"x64": true
}

DNS Zones  

DNS Zones

Property Description
id An integer.
dnszone The DNS Zone name.
soa_email Start of Authority (SOA) contact email.
description A description to keep track of this DNS Zone.
refresh_sec Time interval before the DNS Zone should be refreshed, in seconds.
retry_sec Time interval that should elapse before a failed refresh should be retried, in seconds.
expire_sec Time value that specifies the upper limit on the time interval that can elapse before the DNS Zone is no longer authoritative, in seconds.
ttl_sec Time interval that the resource record may be cached before it should be discarded, in seconds.
status The status of the DNS Zone it can be disabled, active, or edit_mode.
master_ips An array of IP addresses for this DNS Zone.
axfr_ips An array of IP addresses allowed to AXFR the entire DNS Zone.
display_group A display group to keep track of this DNS Zone.
type Controls the DNS zone type.

status Enumeration 

Value Description
active Turn on serving of this DNS Zone.
disabled Turn off serving of this DNS Zone.
edit_mode Use this mode while making edits.

dnszone_type Enumeration 

Value Description
master A primary, authoritative DNS zone
slave A secondary DNS zone which gets its updates from a master DNS zone.
{
"id": 357,
"dnszone": "example.com",
"soa_email": "admin@example.com",
"description": "Example Description",
"refresh_sec": 14400,
"retry_sec": 3600,
"expire_sec": 604800,
"ttl_sec": 3600,
"status": "active", status enum
"master_ips": [ "127.0.0.1" , "255.255.255.1" , "123.123.123.7" ],
"axfr_ips": [ "44.55.66.77" ],
"display_group": "Example Display Group",
"type": "master" dnszone_type enum
}

DNS Zone Records  

DNS Zone Records: The DNS Zone Record fields will contain different values depending on what type of record it is.

Property Description
id An integer.
type Type of record (A/AAAA, NS, MX, CNAME, TXT, SRV).
name The hostname or FQDN. When type=MX the subdomain to delegate to the Target MX server. Must be 1-100 characters.
target When type=MX the hostname. When type=CNAME the target of the alias. When type=TXT the value of the record. When type=A or AAAA the token of '[remote_addr]' will be substituted with the IP address of the request.
priority Priority for MX and SRV records.
weight A relative weight for records with the same priority, higher value means more preferred.
port The TCP or UDP port on which the service is to be found.
service The service to append to an SRV record. Must conform to RFC2782 standards.
protocol The protocol to append to an SRV record. Must conform to RFC2782 standards.
ttl_sec Time interval that the resource record may be cached before it should be discarded, in seconds. Leave as 0 to accept our default.

Zone Record Types Enumeration 

Value Description
A Address Mapping Record
AAAA IP Version 6 Address Record
NS Name Server Record
MX Mail Exchanger Record
CNAME Canonical Name Record
TXT Text Record
SRV Service Record
{
"id": 468,
"type": "A",
"name": "sub.example.com",
"target": "sub",
"priority": 10,
"weight": 20,
"port": 80,
"service": "_sip",
"protocol": "_tcp",
"ttl_sec": 86400
}

Event  

Event objects describe a notification on a user's account timeline.

Property Description
id An integer.
entity Detailed inforrmation about the event's entity, including id, type, label, and URL used to access it.
action The action that caused this event.
username The username of the user who initiated this event.
status The current status of this event.
percent_complete A percentage estimating the amount of time remaining for an event. Returns null for notification events.
rate The rate of completion of the event. Currently only returned for migration and resize events.
time_remaining The estimated time remaining until the completion of this event. Currently only returned for in progress migrations or resizes.
seen If this event has been seen.
read If this event has been read.
created ISO 8601 datetime.
updated ISO 8601 datetime.
user_id The ID of the user who initiated this event.

EventType Enumeration 

Value Description
linode_boot Linode boot
linode_create Linode create
linode_delete Linode delete
linode_shutdown Linode shutdown
linode_reboot Linode reboot
linode_snapshot Linode snapshot
linode_addip Linode addip
linode_migrate Linode migrate
linode_rebuild Linode rebuild
linode_clone Linode clone
disk_create Disk create
disk_delete Disk delete
disk_duplicate Disk duplicate
disk_resize Disk resize
backups_enable Backups enable
backups_cancel Backups cancel
backups_restore Backups restore
password_reset Password reset
dns_zone_create DNS Zone create
dns_zone_delete DNS Zone delete
dns_record_create DNS Zone Record create
dns_record_delete DNS Zone Record delete
stackscript_create Stackscript create
stackscript_publicize Stackscript publicize
stackscript_revise Stackscript revise
stackscript_delete Stackscript delete

EventStatus Enumeration 

Value Description
scheduled Event has not yet started.
started Event is in progress.
finished Event is completed.
failed Something went wrong.
notification Stateless event.
{
"id": 1234,
"entity": {
"id": 9302,
"label": "linode123",
"type": "linode",
"url": "/v4/linode/instances/123"
} ,
"action": "linode_reboot", EventType enum
"username": "example_user",
"status": "finished", EventStatus enum
"percent_complete": 20,
"rate": "",
"time_remaining": "",
"seen": false,
"read": false,
"created": "2014-12-24 13:00:09 -0500",
"updated": "2014-12-24 14:00:09 -0500",
"user_id": 234567
}

IPv4 Address  

An IPv4 Address

Property Description
address The IP Address.
gateway The default gateway. Gateways for private IP's are always null.
subnet_mask The subnet mask.
prefix The network prefix.
type The type of IP Address, either public or private
rdns Reverse DNS address for this IP Address. Null to reset.
linode_id An integer.

IPAddressType Enumeration 

Value Description
public Public IP Address
private Internal IP Addresses (192.168 range)
{
"address": "97.107.143.8",
"gateway": "97.107.143.1",
"subnet_mask": "255.255.255.0",
"prefix": "24",
"type": "public", IPAddressType enum
"rdns": "",
"linode_id": 42
}

IPv6 Address  

An IPv6 Address

Property Description
address The IPv6 Address.
gateway The default gateway.
range The IPv6 range.
rdns Optional reverse DNS address for this IPv6 Address.
prefix The network prefix.
subnet_mask The subnet mask.
type The type of IP Address, either public or private.

IPv6AddressType Enumeration 

Value Description
public Public IP Address
private Internal IP Addresses
{
"address": "2600:3c01::2:5001",
"gateway": "fe80::1",
"range": "2600:3c01::2:5000",
"rdns": "example.org",
"prefix": 116,
"subnet_mask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:f000",
"type": "public" IPv6AddressType enum
}

IPv6 Pool  

A Public IPv6 Pool, available to an entire Datacenter

Property Description
range The IP Address.
datacenter The Datacenter this pool is available in.
{
"range": "2600:3c01::2:5000/64",
"datacenter": "newark"
}

Kernel  

Kernel objects describe a Linux kernel that can be booted on a Linode. Some special kernels are available that have special behavior, such as "Direct Disk", which will boot your disk directly instead of supplying a kernel directly to the hypervisor. The latest kernels are "linode/latest_64" (64 bit) and "linode/latest" (32bit).

Property Description
id A string.
description Additional, descriptive text about the kernel.
xen If this kernel is suitable for Xen Linodes.
kvm If this kernel is suitable for KVM Linodes.
label The friendly name of this kernel.
version Linux Kernel version.
x64 True if this is a 64-bit kernel, false for 32-bit.
current A boolean.
deprecated A boolean.
latest A boolean.
{
"id": "linode/3.5.2-x86_64-linode26",
"description": "null",
"xen": false,
"kvm": true,
"label": "3.5.2-x86_64-linode26",
"version": "3.5.2",
"x64": true,
"current": true,
"deprecated": false,
"latest": true
}

Linode  

Linode objects describe a single Linode on your account.

Property Description
id This Linode's ID
alerts Toggle and set thresholds for receiving email alerts.
  • CPU Usage - % - Average CPU usage over 2 hours exceeding this value triggers this alert. (Range 0-2000, default 90)
  • Disk IO Rate - IO Ops/sec - Average Disk IO ops/sec over 2 hours exceeding this value triggers this alert. (Range 0-100000, default 10000)
  • Incoming Traffic - Mbit/s - Average incoming traffic over a 2 hour period exceeding this value triggers this alert. (Range 0-40000, default 10)
  • Outbound Traffic - Mbit/s - Average outbound traffic over a 2 hour period exceeding this value triggers this alert. (Range 0-10000, default 10)
  • Transfer Quota - % - Percentage of network transfer quota used being greater than this value will trigger this alert. (Range 0-400, default 80)
backups Displays if backups are enabled, last backup datetime if applicable, and the day/window your backups will occur. Window is prefixed by a "W" and an integer representing the two-hour window in 24-hour UTC time format. For example, 2AM is represented as "W2", 8PM as "W20", etc. (W0, W2, W4...W22)
created ISO 8601 datetime.
datacenter
A Datacenter object.
distribution
A Distribution object.
group This Linode's display group.
ipv4 This Linode's IPv4 addresses.
ipv6 This Linode's IPv6 slaac address.
label This Linode's display label. Must be 3-32 ASCII characters limited to letters, numbers, underscores, and dashes, starting and ending with a letter, and without two dashes or underscores in a row.
type The type of Linode.
status The current state of this Linode.
total_transfer The amount of outbound traffic used this month.
updated The last updated datetime for this Linode record.
hypervisor The hypervisor this Linode is running on.

Status Enumeration 

Value Description
offline The Linode is powered off.
booting The Linode is currently booting up.
running The Linode is currently running.
shutting_down The Linode is currently shutting down.
rebooting The Linode is rebooting.
provisioning The Linode is being created.
deleting The Linode is being deleted.
migrating The Linode is being migrated to a new host/datacenter.

BackupStatus Enumeration 

Value Description
pending Backup is in the queue and waiting to begin.
running Linode in the process of being backed up.
needsPostProcessing Backups awaiting final integration into existing backup data.
successful Backup successfully completed.
failed Linode backup failed.
userAborted User aborted current backup process.

BackupType Enumeration 

Value Description
auto Automatic backup
snapshot User-initiated, manual file backup

Window Enumeration 

Value Description
W0 0000 - 0200 UTC
W2 0200 - 0400 UTC
W4 0400 - 0600 UTC
W6 0600 - 0800 UTC
W8 0800 - 1000 UTC
W10 1000 - 1200 UTC
W12 1200 - 1400 UTC
W14 1400 - 1600 UTC
W16 1600 - 1800 UTC
W18 1800 - 2000 UTC
W20 2000 - 2200 UTC
W22 2200 - 0000 UTC

Hypervisor Enumeration 

Value Description
kvm KVM
xen Xen
{
"id": 123456,
"alerts": {
"cpu": {
"enabled": true,
"threshold": 90
} ,
"io": {
"enabled": true,
"threshold": 10000
} ,
"transfer_in": {
"enabled": true,
"threshold": 10
} ,
"transfer_out": {
"enabled": true,
"threshold": 10
} ,
"transfer_quota": {
"enabled": true,
"threshold": 80
}
} ,
"backups": {
"enabled": true,
"schedule": {
"day": "Tuesday",
"window": "W20"
} ,
"last_backup": backup object {
"id": 123456,
"label": "A label for your snapshot",
"status": "successful", Status enum
"type": "snapshot", Type enum
"datacenter": datacenter object {
"id": "newark",
"label": "Newark, NJ",
"country": "us"
} ,
"created": "2015-09-29T11:21:01",
"updated": "2015-09-29T11:21:01",
"finished": "2015-09-29T11:21:01"
} ,
"snapshot": backup object {
"id": 123456,
"label": "A label for your snapshot",
"status": "successful", Status enum
"type": "snapshot", Type enum
"datacenter": datacenter object {
"id": "newark",
"label": "Newark, NJ",
"country": "us"
} ,
"created": "2015-09-29T11:21:01",
"updated": "2015-09-29T11:21:01",
"finished": "2015-09-29T11:21:01"
}
} ,
"created": "2015-09-29T11:21:01",
"datacenter": datacenter object {
"id": "newark",
"label": "Newark, NJ",
"country": "US"
} ,
"distribution": distribution object {
"id": "linode/ubuntu15.10",
"label": "openSUSE 13.2",
"vendor": "openSUSE",
"x64": true,
"recommended": true,
"created": "2014-12-17 12:55:42 -0500",
"minimum_storage_size": 700
} ,
"group": "Example",
"ipv4": [ "97.107.143.8" , "192.168.149.108" ],
"ipv6": "2a01:7e00::f03c:91ff:fe96:46f5/64",
"label": "Example Linode",
"type": [ service object {
"id": "standard-1",
"backups_price": 250,
"class": "standard",
"disk": 24576,
"hourly_price": 1,
"label": "Linode 2048",
"mbits_out": 125,
"monthly_price": 1000,
"ram": 2048,
"service_type": "linode", Service Type enum
"storage": 24576,
"transfer": 2000,
"vcpus": 2
} ],
"status": "running", Status enum
"total_transfer": 20000,
"updated": "2015-10-27 05:59:26 -0400",
"hypervisor": "kvm" Hypervisor enum
}

Linode Config  

Describes a configuration for booting up a Linode. This includes the disk mapping, kernel, and so on for booting a Linode. Note that sd* will be replaced by xvd* for deprecated Xen Linodes.

Property Description
id An integer.
comments User-supplied comments about this config. Must be 1-255 characters.
created ISO 8601 datetime.
devtmpfs_automount Populates the /dev directory early during boot without udev.
disks Disks attached to this Linode config.
helpers Helpers enabled when booting to this Linode config.
initrd An initrd disk attached to this Linode config.
kernel
A Kernel object.
label Human-friendly label for this config. Must be 1-48 characters.
ram_limit Optional RAM limit in MB for uncommon operating systems. Must be between 0 and the Linode's total RAM.
root_device Root device to boot. Corresponding disk must be attached.
root_device_ro Controls whether to mount the root disk read-only.
run_level Sets the run level for Linode boot.
updated ISO 8601 datetime.
virt_mode Controls the virtualization mode.

run_level Enumeration 

Value Description
default Normal multi-user boot mode
single Single user boot mode
binbash Boots to a root bash shell

virt_mode Enumeration 

Value Description
fullvirt Complete system virtualization
paravirt Some hardware is unvirtualized; often faster than fullvirt
{
"id": 804,
"comments": "Example Linode configuration",
"created": "2015-09-29 07:21:38 -0400",
"devtmpfs_automount": false,
"disks": {
"sda": disk object {
"id": 456,
"label": "openSUSE 13.2 Disk",
"size": 4000,
"filesystem": "ext4",
"state": "ok",
"created": "2016-05-12 09:36:42 -0400",
"updated": "2016-05-12 12:13:42 -0400"
} ,
"sdb": null, ,
"sdc": null, ,
"sdd": null, ,
"sde": null, ,
"sdf": null, ,
"sdg": null, ,
"sdh": null
} ,
"helpers": {
"disable_updatedb": true,
"enable_distro_helper": true,
"enable_modules_dep_helper": true,
"enable_network_helper": true
} ,
"initrd": null,
"kernel": kernel object {
"id": "linode/latest_64",
"label": "Latest 64 bit (4.1.0-x86_64-linode59)",
"current": true
} ,
"label": "My openSUSE 13.2 Profile",
"ram_limit": 512,
"root_device": "/dev/sda",
"root_device_ro": false,
"run_level": "default", run_level enum
"updated": "2015-09-29 07:21:38 -0400",
"virt_mode": "paravirt" virt_mode enum
}

Linode Networking Response  

Comprehensive information about a Linode's networking.

Property Description
ipv4 The Linode's IPv4 networking data.
ipv6 The Linode's IPv6 networking data.
{
"ipv4": {
"public": [ ipaddress object {
"address": "97.107.143.37",
"gateway": "97.107.143.1",
"subnet_mask": "255.255.255.0",
"prefix": "24",
"type": "public", IPAddressType enum
"rdns": "example.org",
"linode_id": 123
} ],
"private": [ ipaddress object {
"address": "192.168.1.210",
"gateway": "",
"subnet_mask": "255.255.128.0",
"prefix": "17",
"type": "private", IPAddressType enum
"rdns": "",
"linode_id": 123
} ],
"shared": [ ipaddress object {
"address": "97.107.143.25",
"gateway": "97.107.143.1",
"subnet_mask": "255.255.255.0",
"prefix": "24",
"type": "public", IPAddressType enum
"rdns": "example.org",
"linode_id": 124
} ]
} ,
"ipv6": {
"addresses": [ ipv6-address object {
"address": "2600:3c01::2:5001",
"gateway": "fe80::1",
"range": "2600:3c01::2:5000",
"rdns": "example.org",
"prefix": 116,
"subnet_mask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:f000",
"type": "public" IPv6AddressType enum
} ],
"slaac": "2a01:7e00::f03c:91ff:fe96",
"link-local": "f300::f03c:91ff:fe96:46da",
"global": [ ipv6pool object {
"range": "2600:3c01::2:5000",
"datacenter": "newark"
} ]
}
}

NodeBalancer Config Node  

Describes a node for a NodeBalancer configuration.

Property Description
id An integer
label Unique label for your NodeBalancer config
address The address:port combination used to communicate with this Node.
weight Load balancing weight, 1-255. Higher means more connections.
mode The connections mode for this node. One of 'accept', 'reject', or 'drain'.
status The status of this node.

mode Enumeration 

Value Description
accept accept
reject reject
drain drain
{
"id": 804,
"label": "node001",
"address": "192.168.12.12:80",
"weight": 20,
"mode": "accept", mode enum
"status": "online"
}

OAuth Client  

OAuth Client objects describe an OAuth client application owned by your account.

Property Description
id This application's OAuth client ID
name Human-friendly client name. Must be 1-128 characters.
secret The app's client secret, used in the OAuth flow. Visible only on app creation.
redirect_uri The URL to redirect to after the OAuth flow. Must be 1-512 characters.
status The status of the client application.

Status Enumeration 

Value Description
active The client application is active and accepting OAuth logins.
suspended The client application is not accepting OAuth logins.
{
"id": "0123456789abcdef0123",
"name": "Example OAuth app",
"secret": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"redirect_uri": "https://oauthreturn.example.org/",
"status": "active" Status enum
}

OAuth Token  

An OAuth Token granting access to your user.

Property Description
id This token's ID.
client
A OAuth Client object.
type If this is a Client Token or a Personal Access Token.
scopes The OAuth Scopes this token has.
label The label given to this token.
created ISO 8601 datetime.
token The OAuth Token that you can use in API requests. Except for the inital creation of the token, this field is truncated to 16 characters.
expiry When this token expires.

OAuthTokenType Enumeration 

Value Description
client_token A token created by a client application with an OAuth Authentication flow.
personal_access_token A token created through the API for use without a client application.
{
"id": 123,
"client": oauthclient object { } ,
"type": "personal_access_token", OAuthTokenType enum
"scopes": "*",
"label": "cli-token",
"created": "2017-01-01 08:46:32 -0500",
"token": "cd224292c853fe27...",
"expiry": "2018-01-01 08:46:32 -0500"
}

Profile  

Your User profile information.

Property Description
username The username of the user.
email The email address of the user.
timezone The selected timezone of the user location.
email_notifications Toggles to determine if the user receives email notifications
referrals Displays information related to referral signups attributed to the user.
ip_whitelist_enabled When enabled, you can only log in from an IP address on your whitelist.
lish_auth_method Controls what authentication methods are allowed to connect to the Lish console servers.
authorized_keys Comma-delimited list of authorized SSH public keys
two_factor_auth Toggles whether two factor authentication (TFA) is enabled or disabled.

LishSetting Enumeration 

Value Description
password_keys Allow both password and key authentication
keys_only Allow key authentication only
disabled Disable Lish
{
"username": "example_user",
"email": "person@place.com",
"timezone": "US/Eastern",
"email_notifications": true,
"referrals": {
"code": "rcg3340777c21fa49a5beb971ca1aec44bc584333",
"url": "https://www.linode.com/?r=rcg3340777c21fa49a5beb971ca1aec44bc584333",
"total": 10,
"completed": 8,
"pending": 2,
"credit": 160
} ,
"ip_whitelist_enabled": true,
"lish_auth_method": "password_keys", LishSetting enum
"authorized_keys": "ssh-rsa AADDDDB3NzaC1yc2EAAAADAQABAAACAQDzP5sZlvUR9nZPy0WrklktNXffq+nQoEYUdVJ0hpIzZs+KqjZ3CDbsJZF0g0pn1/gpY9oSEeXzFpWasdkjlfasdf09asldf+O+y8w6rbPe8IyP1mext4cmBe6g/nHAjw/k0rS6cuUFZu++snG0qubymE9gMZ3X0ac92TP7tk0dEwq1fbjumhqNmNyqSbt5j8pLuLRhYHhVszmwnuKjeGjm9mJLJGnd5V6IdZWEIhCjrNgNr1H+fVNI87ryFE31i/i/bnHcbnkNdAmDc2EQ2gJ33vXg8D8Nf2aI+K+e3t9MiFVTJmzAILQpvZQj2YV4mfOt+GSTUJ4VdgH9dNC/3lA0yoP6YoFYw0cdTKhJ0MotmR9iZepbJfbuXxAFOECJuC1bxFtUam3fIsGqj3vXi1R6CzRzxNERqPGLiFcXH8z0VTwXA1v+iflVd4KqihnwNtU+45TXTtFY0twLQRauB9qo9slvnhYlHqQZb8SBYw5WltX3MBQpyLTSZLQLqIKZVgQRKKF413fT52vMF54zk5SpImm5qY5Q1E4od00UJ1x4kFe0fTUQWVgeYvL8AgFx/idUsVs9r3jRPVTUnQZNB2D+7Cyf9dUFjjpiuH3AMMZyRYfJbh/Chg8J6QXYZyEQCxMRa9/lm2rRCVfGbcfb5zgKsV/HRHI/O1F9cZ9JvykwQ== someguy@someplace.com",
"two_factor_auth": true
}

Service  

Service objects describe a service available for purchase from Linode. Provisioning new infrastructure generally involves including a service ID with the request.

Property Description
id A string.
storage If applicable, disk space in MB.
backups_price Cost (in cents) per month if backups are enabled.
hourly_price Cost (in cents) per hour.
label Human-friendly name of this service.
mbits_out If applicable, Mbits outbound bandwidth.
monthly_price Cost (in cents) per month.
ram Amount of RAM included in this service.
service_type The type of service offered.
transfer If applicable, outbound transfer in MB.
vcpus If applicable, number of CPU cores.

Service Type Enumeration 

Value Description
linode A Linode service.
backup A backup service.
nodebalancer A NodeBalancer service.
longview A Longview subscription.
{
"id": "linode2048.5",
"storage": 24576,
"backups_price": 250,
"hourly_price": 1,
"label": "Linode 2048",
"mbits_out": 125,
"monthly_price": 1000,
"ram": 2048,
"service_type": "linode", Service Type enum
"transfer": 2000,
"vcpus": 2
}

StackScript  

StackScript objects describe a StackScript which can be used to help automate deployment of new Linodes.

Property Description
id A unique ID for the StackScript.
customer_id The customer that created this StackScript.
user_id The user account that created this StackScript.
label This StackScript's display label. Must be 3-128 characters.
description In-depth information on what this StackScript does.
distributions A list of distributions this StackScript is compatible with.
deployments_total The total number of times this StackScript has been deployed.
deployments_active The total number of active deployments.
is_public Publicize StackScript in the Linode StackScript library. Note that StackScripts cannot be changed to private after they have been public.
created When the StackScript was initially created.
updated When the StackScript was last updated.
rev_note The most recent note about what was changed for this revision.
script The actual script body to be executed.
user_defined_fields Variables that can be set to customize the script per deployment.
{
"id": 37,
"customer_id": 123,
"user_id": 456,
"label": "Example StackScript",
"description": "Installs the Linode API bindings",
"distributions": [ distribution object {
"id": "linode/debian8",
"label": "Debian 8.1",
"vendor": "Debian",
"x64": true,
"recommended": true,
"created": "2015-04-27 12:26:41 -0400",
"minimum_storage_size": 900
} , {
"id": "linode/debian7",
"label": "Debian 7",
"vendor": "Debian",
"x64": true,
"recommended": true,
"created": "2014-09-24 09:59:32 -0400",
"minimum_storage_size": 600
} ],
"deployments_total": 150,
"deployments_active": 42,
"is_public": true,
"created": "2015-09-29T11:21:01",
"updated": "2015-10-15T10:02:01",
"rev_note": "Initial import",
"script": "#!/bin/bash",
"user_defined_fields": [ {
"name": "var1",
"label": "A question",
"example": "An example value",
"default": "Default value"
} , {
"name": "var2",
"label": "Another question",
"example": "possible",
"oneof": "possible,enum,values"
} ]
}

User  

User information associated with an account.

Property Description
username The username of the user.
email The email address of the user.
restricted Whether or not the user has access restrictions.
{
"username": "example_user",
"email": "person@place.com",
"restricted": true
}