Blog

Introducing Pods JSON API

Pods JSON APIToday we released a beta version of a plugin that implements the WordPress REST API plugin WP-API for Pods. Our new plugin, PODS JSON API adds new end points that allow access to various methods in the Pods and Pods API classes when using WP-API.

This plugin may be merged into Pods itself in the future or may remain a stand-alone plugin that we will release on WordPress.org when it is ready. As with Pods and our other Pods plugins, any contributions are highly encouraged, by submitting a pull request.

WP-API is a stand-alone plugin that has been developed with the intent of merging it into WordPress core. Merging WP-API into core has been proposed for WordPress 4.0, but no decision on this proposal has been made yet. Since you can install WP-API as a plugin, you can test the PODS JSON API today. Since both plugins are still under development you should throughly test all functionality in a test environment before using them in production.

 

Requirements

The Pods JOSN API plugins requires WP-API and Pods, as well as PHP 5.3 or later and WordPress 3.9 or later. Many popular hosts run PHP 5.2, which Pods and WordPress otherwise support, but will not work with WP-API. If you are unsure of what version of PHP your server is running, you can find your PHP version by going to the Settings submenu of the Pods Admin menu. PHP version is listed in the Debug Info section.

Before using the Pods JSON API plugin it is strongly recommended that you familiarize yourself with WP-API. They have an excellent getting started guide, as part of a their comprehensive documentation, which includes an article on authentication.

Pods End Points

As of version 0.1, Pods JSON API adds end points for the Pods and Pods API classes. Using the Pods end points you can get all items in a Pod, or individual items, save items, or duplicate items. Using the Pod API endpoints you can get all or an individual Pods, add Pods as well as save, delete, duplicate or edit Pods. For a full list of end points see the plugin’s Readme.

Access to these end points is controlled by the capabilities set in Pods. There are also filters in the Pods JSON API plugin for overriding the capabilities set in Pods. These filters “pods_json_api_access_pods” and “pods_json_api_access_pods_{method}” can be used to set access for all methods and for individual methods respectively.

We will be releasing additional information on usage of this new plugin soon. If you have any issues using it, find any bugs or would like to request a feature, please submit an issue.

Downloads and Other Links