Adding a RESTful API to your WordPress has just become the flip of a switch. Literally.
Recently, Voce Platforms – a Voce Communications company – released a plugin named Thermal API. This plugin enables any WordPress powered site to have a full RESTful API.
After a bit of toying with it, and the support of a couple of their devs, I was able to get it working.
Once you’ve installed this plugin, you have the option to change the default URL to access the API, which defaults to “wp_api” — so you would access it via example.com/wp_api/.
The next step is to start pulling data. The simpliest example is to pull data around a specific post.
That single call would return a lot of information, including: post ID number, the post content, associated tags with names, slugs, and tag IDs, as well as all the media attached to the post.
One thing you should be careful with this plugin is security. I would personally add some sort of htaccess IP restriction rules to ensure that the API is only being called from a trusted source. You don’t necessarily want to open your entire database of posts to the world, unless that’s your intention.
As I’ve been talking to the developers of this plugin, they are quite open to feedback.
I’ve been really for a really solid WordPress API plugin and I think I’ve found it. I’m not exactly sure why it’s called “Thermal API,” but it’s a cool name, none the less.
If you’ve installed the plugin, let me know what your thoughts are in the comments.