Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Jun 07, 2017 9:21 am 
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3136
Location: Galloway, NJ
Linode REST API - Early Access

What is the Linode REST API?
The Linode API v4 provides a programmatic interface into Linode services, allowing you to automate and manage all aspects of Linode instances, Backups, NodeBalancers, IP addresses, support tickets, your account settings, and so on. This new API is the foundation of upcoming features and products, including a new Linode Manager (more on that soon), command line interface, perhaps a mobile app, and bindings and developer tools.

API Documentation
Linode API v4 documentation is located here:

API Features
  • Access and Authentication via OAuth 2.0 (see:
  • It's RESTful
  • Uniform / standard interface; standard HTTP verbs (GET, PUT, POST, DELETE)
  • Pagination of large results (see:
  • Flexible query filtering (see:
  • ITMCDISCTA - "If the Manager can do it, so can the API" (once we're done implementing)
  • Nested object results - fewer calls, probably just one call, to get all the information you want
  • Slugs rather than IDs for instance types, regions, distros, and kernels. These are static and won't ever change on you and will map to future instance type generations, etc.
  • Clean/Simple API Call Spec
  • Many "fast path" methods. For example: it's one API call to create a Linode, with a distribution, and have it boot
  • Manage Linode instances
  • Networking and IP information endpoints for IPv4 and IPv6, pools, and ranges
  • IP sharing (failover)
  • IP Assign (swap) endpoints
  • Manage Linode Backups (+snapshots)
  • Manage NodeBalancers
  • Support ticket endpoints
  • Graph data endpoints
  • Linode Manager users endpoints
  • Unified Events timeline replaces Host Job queue view and includes other events
  • and much more...
Bindings and Developer Tools How can I help?
We'd very much appreciate any testing and feedback of this new API. To get access, go to and generate access tokens to use in your API clients.

Feedback is always appreciated! If you find a problem or have a suggestion, feel free to create a new forum thread in this category, or reply to this one, or submit a support ticket - whatever works.


PostPosted: Fri Jun 16, 2017 3:57 pm 
User avatar

Joined: Sun Feb 19, 2017 10:56 am
Posts: 3

Great, congratulations !

Do you have intention to provide a Java Binding too, please ?

PostPosted: Mon Jun 19, 2017 10:39 pm 
User avatar

Joined: Sun Feb 19, 2017 10:56 am
Posts: 3
Please, see:

PostPosted: Mon Jul 24, 2017 8:26 am 

Joined: Sun Feb 12, 2017 5:06 pm
Posts: 2
I've started working on a PHP client for the Linode REST API (v4). Its available at . I've also started creating examples of how to use the API at .

PostPosted: Sun Oct 15, 2017 7:21 pm 

Joined: Sun Oct 15, 2017 7:19 pm
Posts: 1
What are options for unattended login, i.e. for orchestrations/provisioning scripts/applications? OAuth is not an option. I have tried personal access codes but failed.

PostPosted: Mon Oct 16, 2017 5:45 am 
Senior Member
User avatar

Joined: Sun Jan 24, 2016 4:30 am
Posts: 298
What the documentation doesn't make clear, is that the API v4 does NOT work with the tokens generated by the old Linode Manager.

If you want to use API v4, you need to login to the NEW Linode Manager, which generates OAuth and also a new kind of personal tokens.

But, be warned, many scripts/apps don't support API v4, for example the Ansible linode module still requires IDs instead of Slugs and the old API v3 tokens.

:idea: I love my computer... all my friends live there.

PostPosted: Thu Oct 19, 2017 6:54 am 
Senior Member
User avatar

Joined: Sun Jan 24, 2016 4:30 am
Posts: 298
feature request:

Please include the reverse DNS within the instance reply (, it would help avoid extra requests.

for example, lets say I have a linode server with label "server1", I have to:

- get /instances/, so I can get a list of all the servers
- loop to get the id for "server1"
- get the /instances/server1-id/ips to get a list of IPs with id and rdns
- put /instances/server1-id/ips/ip-address with rdns content in the body

all of the above would be optimized like:

- get /instances/server-label/ips/ip-address (if we could use the server label directly without an id)
- put /instances/server-label/ips/ip-address with rnds content in the body


- get /instances/, so I can get a list of all the servers, including rnds content
- put /instances/server1-id/ips/ip-address with rnds content in the body

thank you.

I'm using an Ansible playbook, which is not very flexible with loops.

:idea: I love my computer... all my friends live there.

PostPosted: Sat Nov 25, 2017 11:36 am 

Joined: Sat Nov 25, 2017 11:11 am
Posts: 1
Hi all-

I can't get the python lib to work with Ubuntu 16.04.2 LTS.
Fresh install of OS, and used pip to install linode-api module (enum34 and httplib2 mods are installed).

Created my Personal Access token using the link on the developer page.. i.e.
This works..
>>> import linode
>>> client = linode.LinodeClient('my-oauth-token')

but next step gives errors.. (tried spacing/indents differently and using "python -tt" )
>>> for r in client.get_regions():
... print(r.label)

Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/local/lib/python2.7/dist-packages/linode/objects/", line 122, in __getattribute__
return object.__getattribute__(self, name)
AttributeError: 'Region' object has no attribute 'label'

Please let me know what i need to do to make this work.


PostPosted: Sun Nov 26, 2017 5:18 pm 

Joined: Sun Nov 26, 2017 5:03 pm
Posts: 1
So, I've been playing with half a day. It's probably good to create panel like Linode Manager but though to setup few linodes using ansible.

- What is the reason for keeping page 25 items long? Are you trying to save bandwidth? To list everything you need to query API multiple times.

- I wanted to create linode with specific disk configuration. I cannot specify any disks while POSTing /instances so I'm using POST /instances/{id}/disks
However each time I get response "Linode busy"
I end up with following solution which is pretty hacky and bloated:
- name: Create distro disk
    url:{{ }}/disks
    method: POST
    body: "{
            'size': 3000,
            'authorized_keys': {{ pub_key }},
            'distribution': '{{ distribution }}',
            'root_pass': '{{ lookup('password', '/dev/null length=64 chars=ascii_letters') }}'
      Content-Type: application/json
      Authorization: "Bearer {{ access_token }}"
    body_format: json
    return_content: yes
  when: instance|success
  register: volume_sys
  until: volume_sys.content.find("Linode busy") == -1
  retries: 10
  delay: 2
Instead of using retries/delay I'd rather like REST call to wait as long as necessary.

PostPosted: Thu Apr 05, 2018 3:46 pm 

Joined: Thu Apr 05, 2018 3:38 pm
Posts: 1
When using : The ordering of the ipv4[] addresses is inconsistent.
Sometimes the public ip is listed as ipv4[0], and the private ip is listed as ipv4[1]
Other times the public ip is listed as ipv4[1], and the private ip is listed as ipv4[0]

This CAN be resolved by making a separate API hit to ... odeID>/ips. However that is wasteful of network traffic, considering that the info could have been ordered clearly in the original return.

It would be helpful for these to be consistently ordered, or for each to include a public/private indication with the return.


Display posts from previous:  Sort by  
Post new topic  Reply to topic

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group