Over the weekend, Ryan McCue and collaborators released version 1.1 of the JSON REST API plugin. The WP API team is aiming to have it ready for inclusion in WordPress 4.1, which will drop later this year.
This release focused heavily on testing, fixing bugs discovered through tests, and improving the API documentation. New routes have been added for taxonomies and terms. Excerpts and password-protected post handling have also been improved. Revision endpoint tests are new in 1.1. Coverage for post endpoint testing is now at more than 54% for the whole class and more than 80% for the main methods. McCue says this figure will continue to rise over the next few releases. You can view all the changes and bug fixes for this release on GitHub.
The WP API team often receives questions regarding how to handle authentication. Version 1.1 includes full documentation on authentication methods, including cookie authentication (for plugins/themes running on a site) and OAuth (for desktop/web/mobile clients accessing a site externally). A basic authentication method is also included in the docs and is useful for development purposes only.
I’ve been working with the WP API team to help get documentation organized and presented in a way that’s easy to read and navigate. We’re in the process of merging all the docs into one centralized hub at wp-api.org, which pulls from the various docs in the WP API GitHub repos. We’re working to make this a top-notch resource for any developer who wants to build with the new API.
Work for version 1.2 is already underway. “With version 1.2 and onwards, we’ll be tackling a bunch of extra testing for our endpoints, with the aim of eventually reaching >90% coverage,” McCue noted in the release announcement. If you’d like to join in collaboration on GitHub, the team is always looking for help.
Are any of our readers already building something with the new JSON REST API? Let us know in the comments. Is there anything specific that you’d like to see added to the documentation?