The WP REST API team released version 2 beta 12 today. Daniel Bachhuber highlighted the breaking changes in the release that developers will want to digest before updating. This includes the removal of meta endpoints from the primary plugin into its own feature plugin, now available on WordPress.org.
For the record, the REST API Team support further iteration on the existing endpoints before being merged into core. That could mean waiting for the WordPress.com API team to use those endpoints in production, or gathering more usage feedback from others. I am strongly against merging anything before it’s been well-proven and well-tested.
The proposal by the team was to include the 4 content endpoints when they are ready. We had a lengthly overview as to the progress of those endpoints, more details on what we feel is left to be done can be seen at the issues queue for the 2.0 milestone.
Why these endpoints specifically? Because they are co-dependent for the most part. Shipping Posts without support for Taxonomies would not be that useful.
Hoyle also cautions that pursuing full coverage of wp-admin is a monumental task that could take several more years:
Going for development of _all_ functionality (somewhere around 8-10 total data routes) should not be underestimated. It’s taken somewhere around a year and a half to get the current 4 to where they are now, and that was with 2 years prior art from Version 1.
As someone who has been in the weeds of that implementation for a while now, I cannot over over-stress just how tricky trying to retrofit a consistent, coherent interface on 13 years of organically grown code and ideas can become. I’m looking forward to being part of the writing the implementation for the remaining (and majority) of functionality, however I don’t want to stop users and developers benefitting from what is already being built for another [several] years.
Hoyle emphasized that the team is not proposing merging the existing endpoints now, but he believes they are getting very close.
With the release of v2 beta 12, Bachhuber urged WordPress lead developers and committers to offer official feedback in hopes of building a consensus. Given the disagreements in the recent meeting, it’s clear that WordPress contributors have not been on the same page as far as what constitutes core readiness for the project.
Feedback from contributors is starting to trickle in. WordPress core committer Jeremy Felt shared his thoughts in a post on his blog today:
I’m in favor of the REST API team’s proposal to merge the endpoints for the primary objects in WordPress—posts, comments, users, terms—when they’re ready.
When the endpoints for these objects are ready, I would like to see them merged early in a release cycle.
With these primary endpoints in, front end workflows can immediately start to take advantage. This is something groups have been doing for years with custom code already. Getting these groups to use the same structure is valuable.
Core committer Weston Ruter summarized his opinion in a tweet:
@danielbachhuber I'm for iterative inclusion of REST API endpoints, advising clients to make use of feature detection.
— Weston Ruter (@westonruter) February 9, 2016
The plugin is moving forward with regular betas while the discussion continues. Developers who are using the API in beta will need to continue to follow the project closely, as the latest beta makes changes to available features. 10up developer Eric Mann tweeted some of his challenges in using the API in beta:
My client installed the REST API before it included post meta. We had to build a bunch of custom work to support meta. Then the REST API updated to include meta and broke our integration. I spent a chunk of hours refactoring to compensate so we could update. Now, apparently, the REST API is pulling that meta support out and putting it in a separate plugin. Yet people still criticize me for saying I’m wary of placing too much dependency on the stability of the API.
Joe Hoyle is currently crowdsourcing stats on projects that are using the WP REST API v2 in production. Developers who have stepped up to use the API have had to be nimble in accommodating its rapid development. At this time, the WP REST API team agrees that further iteration on the existing endpoints will be necessary before merging them into core. Continued feedback from developers with projects that use the API will be critical for demonstrating that the API has been well tested.