Title: JSON REST API: Version 0.3
Author: Ryan McCue
Published: July 17, 2013
Last modified: October 7, 2015

---

 [  ](https://profiles.wordpress.org/rmccue/) [Ryan McCue](https://profiles.wordpress.org/rmccue/)
1:20 pm _on_ July 17, 2013     
Tags: [gsoc ( 78 )](https://make.wordpress.org/core/tag/gsoc/),
[gsoc2013 ( 10 )](https://make.wordpress.org/core/tag/gsoc2013/), [json-api ( 39 )](https://make.wordpress.org/core/tag/json-api/),
[rest-api ( 111 )](https://make.wordpress.org/core/tag/rest-api/)   

# JSON REST API: Version 0.3

Time for [another release](https://wordpress.org/plugins/json-rest-api/) of the 
JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for 
structuring data. It is used primarily to transmit data between a server and web
application, as an alternative to XML. REST APIREST API The REST API is an acronym
for the RESTful Application Program Interface (API) that uses HTTP requests to GET,
PUT, POST and DELETE data. It is how the front end of an application (think “phone
app” or “website”) can communicate with the data store (think “database” or “file
system”) [https://developer.wordpress.org/rest-api/](https://developer.wordpress.org/rest-api/)!
We’re closing in on midsemester evaluation, so it’s time to get our test on and 
ensure that everything’s working well. Only small updates to the APIAPI An API or
Application Programming Interface is a software intermediary that allows programs
to interact with each other and share data in limited, clearly defined ways. itself
this week, but also the first introduction of the comment API:

 * Add initial comment endpoints to get comments for a post, and get a single comment(
   [#320](https://gsoc.trac.wordpress.org/ticket/320))
 * Return a Post entity when updating a post, rather than wrapping it with useless
   text ([#329](https://gsoc.trac.wordpress.org/ticket/329))
 * Allow filtering the output as well as input. You can now use the `json_dispatch_args`
   filterFilter Filters are one of the two types of Hooks [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
   They provide a way for functions to modify data of other functions. They are 
   the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
   manner, and should never have side effects such as affecting global variables
   and output. for input as well as the `json_serve_request` filter for output to
   serve up alternative formats (e.g. MsgPack, XML (if you’re insane))
 * Include a `profile` link in the index, to indicate the JSON Schema that the API
   conforms to. In the future, this will be versioned.

The big part of this week is the introduction of the testing suite and reference
client. These are now both available on [GitHub](https://github.com/rmccue/WP-API-Client)
and I’d love for you to run them and test out the API. There’s currently [one known bug](https://gsoc.trac.wordpress.org/ticket/328)
that causes one of the tests to fail, which I’ll be handling in 0.4 due to the large
scope of the issue.

I’m planning to continue work on the test suite this week, due to the large scope
of the testing suite. Ideally, I’d like to get up around the 90% mark for code coverage(
which I’ve [done previously](http://requests.ryanmccue.info/coverage/) on my Requests
library), however I’m not sure as to how coverage can be measured in this case, 
so I’ll also be investigating this. The coming week will also involve creating a
Backbone-based sample theme as a proof-of-concept of real world use. In addition,
coming up I’ll be consulting with Max Cutler from the mobile team and ensuring that
any possible issues are sorted out at this early stage.

As always, I appreciate all and any feedback on the project. This week and the next
will be boring for you guys in terms of new features as we approach midsemester 
review, so I’d love you to get out there and break the API. If you can find problems
with it, please file them and let me know so I can work them into the testing suite.

[#gsoc](https://make.wordpress.org/core/tag/gsoc/), [#gsoc2013](https://make.wordpress.org/core/tag/gsoc2013/),
[#json-api](https://make.wordpress.org/core/tag/json-api/), [#rest-api](https://make.wordpress.org/core/tag/rest-api/)

### Share this:

 * [  Threads ](https://make.wordpress.org/core/2013/07/17/json-rest-api-version-0-3/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/core/2013/07/17/json-rest-api-version-0-3/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/core/2013/07/17/json-rest-api-version-0-3/?share=bluesky)
 * [  X ](https://make.wordpress.org/core/2013/07/17/json-rest-api-version-0-3/?share=x)
 * [  Facebook ](https://make.wordpress.org/core/2013/07/17/json-rest-api-version-0-3/?share=facebook)
 * [  LinkedIn ](https://make.wordpress.org/core/2013/07/17/json-rest-api-version-0-3/?share=linkedin)

# Post navigation

[← Code Revisions: Week 4](https://make.wordpress.org/core/2013/07/16/code-revisions-week-4/)

[Post By Email Update: POP/IMAP libraries, Trac questions →](https://make.wordpress.org/core/2013/07/19/post-by-email-update-pop-imap-libraries-trac-questions/)