1. Chris Mack

    This is fantastic. Having heavily extended the current WordPress XML-RPC API for Spokal’s WordPress integration, I can confirm that it is pretty archaic. Looking forward to having a modern API to work with!


  2. David Wells

    Hey Sarah,

    Good post. Is this the same thing as http://wordpress.org/plugins/json-api/ or an entirely different implementation of the json api?


  3. Sarah Gooding

    @David Wells -That’s a different one.


  4. David Wells

    @Sarah Gooding -Aha thanks. Trying to figure out which to use. The plugin is extendable with modules to setup any JSON REST call you could imagine.

    I wonder how the flexibility of the new implementation will look.


  5. Ram Ratan Maurya

    Really excited about this. Props to Ryan for taking this huge steps. There are hell loads of things I can do with. Now we can make use of Backbone.js to create single page application or to keep things faster.

    All the best Ryan :)


  6. Peter Knight

    Together with a new widgets interface, this is one of the features I’m most excited about coming to core! Hope the Pods project will extend this to work with pods data as well. Using WordPress as a self-hosted backend for any kind of app will become very interesting.


  7. Ryan Hellyer

    Does anyone know if there will be a token based system with the new API? Avoiding the need for sending user login details over the wire would be darned handy.


  8. David Gwyer

    Very exciting news for many reasons but just this together with Backbone.js is going to be HUGE for WordPress. Well done Ryan for all your hard work on this!

    Does this mean we will be seeing a WordPress app store anytime soon? ;)


  9. Ryan McCue

    @Ryan Hellyer -There isn’t a built-in token-handling method, as that’s firmly plugin territory. However, the authentication system is (of course) pluggable (in fact, it uses WP’s normal authentication, but with an additional handler for HTTP Basic authentication). I happen to have a plugin that does OAuth 1.1, so I might end up releasing a plugin to do this. :)

    @David Gwyer – I happen to be working on a project for just that. ;)

    Thanks to everyone for the kind words, and to Sarah for the interview!


  10. Ryan Hellyer

    @Ryan McCue -You said “that’s firmly plugin territory”. Why is that so? I assumed that a token system would be kinda generic and tie in well with the API itself. The official WordPress mobile apps. in particular could make use of it.


  11. Ryan McCue

    @Ryan Hellyer – If we implement a token system, the question then becomes, how do we handle this? We could create our own system, but it seems like a waste to reinvent the wheel, so we’d probably go with an existing system, such as OAuth. I know from experience that OAuth is not exactly trivial to implement (althought OAuth 2 is better), so it would be a fairly heavyweight feature to include in core.

    Not saying it won’t happen, but I suspect it’ll stay in plugin territory for now. That might be reconsidered based on what we as a team decide though.


  12. Ryan Hellyer

    @Ryan McCue -Yeah, it’d need to be oAuth I think. I think it is a worthy goal to pursue, simply so that the official WordPress apps. can connect back to base in a secure fashion.


  13. John David

    So, besides the previous plugin already mentioned (json-api), there’s also another plugin also called wp-api (I’m assuming not the same one, as it’s already at version 1.0.3).

    Anybody done any work with either of these existing plugins?


  14. Should Code Revisions Be Added to the WordPress Core?

    […] Cognitive Science at the University of Osnabrück. He said that he is really looking forward to the JSON REST API project being added to […]


  15. Apply Filters #4 | WordPress Radio

    […] Ryan McCue – JSON REST API Interview on WP Tavern […]


  16. Souri [wp-entwickler.at]

    hi guys and galls.
    nice article here.
    i hope you don’t mind but i have translated this article to german for our readers @


    it’s such an important thing that i thought i have to spread the word ;-)


  17. Pete

    Guys this looks like a big improvement. But it’s like all the other Json Apis it’s not really restful.

    When is someone going to do it properly? A user should be able to just use the same urls as to get html, xml, or json versions of all content (based on content negotiation) and if desired also post updates to the same urls.

    That would unlock the true power of rest and wordpress.


  18. Ryan McCue

    @Pete – HTML/XML/JSON is not really part of being RESTful, however it’s theoretically possible to do this already. The API only translates to/from JSON in a select few places, so you can serialise it to XML, ZeroMQ, MessagePack or whatever you want, intentionally.

    (It’s also RESTful, since you send updates to the same URL itself, but only for the API itself. It’s intentionally self-contained at the moment, but that might change in the future.)


  19. Bryan Petty

    @Pete – How do you feel about removing the permalink options from WordPress then? Personally, I’ve never seen a REST API who’s endpoints change depending on a customizable frontend appearance option that has nothing to do with the API.

    Permalinks are the reason WordPress can’t do that for it’s REST API, and those obviously aren’t going to disappear anytime soon, so the REST API has no choice other than to expose it’s own new endpoints.


    • Pete Shaw


      This is not a major problem, most sites don’t change their permalink structure (mainly for seo reasons). The benefits in terms of usability, semantics, documentation etc are huge if a truly restful approach was used.

      This API is good but its needs to be truly restful.


  20. WordPress as an Enterprise CMS | Ka-lyda-scope

    […] For the developer, here is a good read about creating a JSON REST API for WordPress. […]


Comments are closed.

%d bloggers like this: