Today, we’ve launched version 1.1 of the WordPress.com REST API. In recent weeks, we’ve been hard at work launching new features on WordPress.com, and many of these changes are powered by our REST API. When we started working on the upgrades to stats and post management, we quickly realized that the existing endpoints didn’t have all the power we needed to provide the best experience. In order to add the functionality we needed to the API without breaking existing implementations, we decided to version our API.
What does this mean for you?
If you’re already implementing version 1 of the API, you’ll be able to continue using those endpoints without changing your code for the foreseeable future. Version 1 of the API is now deprecated, so any new development you do should be against 1.1. We currently have no plans to disable version 1 of the REST API — should we ever decide to do so, we’ll give you plenty of advanced notice.
- Upload support for all file types. If you can you upload it though the media explorer, you can upload it with the API. PDFs, Docs, Powerpoints, Audio files, and Videos (Jetpack & .com blogs with VideoPress) are all supported.
- Better error handling. If you upload multiple files and some fail, it’s easier to pull those out and retry.
- Improved consistency with other endpoints and cleaned up response parameters.
- When uploading files, you can now pass attributes like name and description without needing to do a second call to the update endpoint.
- Bonus: The
/sites/$site/endpoint now returns a list of allowed file types.
- Support for pulling back stats over multiple days without those stats being grouped into a single result.
- New stats detailing the top comment authors on your site, as well as the posts that have received the most comments.
- In addition to chart data for views and visitors: chartable data about likes and comments.
- Keep on track with your posting goals. The new streak endpoint contains the data to help motivate you to post more often.
We’re looking forward to seeing what you build using version 1.1. Take a look at the REST API documentation to get started. If you have any questions about the API, don’t hesitate to comment below or reach out to us via our developer contact form.