WP REST API - a JSON-based REST API for WordPress.
PHP JavaScript Shell
Latest commit 9bcdf9d Oct 19, 2016 @kadamwhite kadamwhite committed on GitHub Merge pull request #2881 from WP-API/add-latest-js-client
Add latest js client
Permalink
Failed to load latest commit information.
assets thicker text size on icons Feb 8, 2016
bin "WP API" -> "WordPress REST API" in README files Sep 15, 2016
lib Merge pull request #2882 from schlessera/attachments-controller-comments Oct 19, 2016
tests `in_array()` should only ever be used in strict mode. Oct 19, 2016
.codecov.yml Add Codecov configuration Sep 22, 2016
.gitignore Ignore readme.txt in the WP.org repo Dec 11, 2015
.gitmodules Remove compatibility repo for WordPress 4.3 Dec 11, 2015
.travis.yml Also build develop Jan 7, 2016
CHANGELOG.md Update changelog with changes since beta14 Oct 8, 2016
CONTRIBUTING.md Proper file permissions Mar 30, 2016
Gruntfile.js Travis: Combine both PHP 5.6 jobs Jul 31, 2015
README.md Merge pull request #2751 from WP-API/remove-scrutinizer Oct 2, 2016
codecoverage.xml Travis: Ensure we create WP_DEVELOP_DIR full path Jul 29, 2015
composer.json fix forum url and installer-name Aug 17, 2016
core-integration.php Simplify slug list parsing. Oct 19, 2016
extras.php Bump script version Mar 23, 2016
license.txt Add license.txt file with license terms for #384 Aug 1, 2014
multisite.xml Travis: Ensure we create WP_DEVELOP_DIR full path Jul 29, 2015
package.json Update version to 2.0.0 Nov 2, 2015
phpcs.ruleset.xml Exclude core/ from PHPCS checks Oct 12, 2015
phpunit.xml.dist Travis: Ensure we create WP_DEVELOP_DIR full path Jul 29, 2015
plugin.php `in_array()` should only ever be used in strict mode. Oct 19, 2016
wp-api.js Update the JavaScript client Oct 19, 2016
wp-api.min.js Update the JavaScript client Oct 19, 2016
wp-api.min.map Update the JavaScript client Oct 19, 2016

README.md

WP REST API v2.0 (WP-API)

Access your WordPress site's data through an easy-to-use HTTP REST API.

Build Status codecov.io

The "develop" branch is version 2 which is "beta" but stable and recommended for production. Read the documentation to introduce yourself to endpoints, internal patterns, and implementation details.

The "master" branch represents the legacy version of the REST API.

The latest stable version is also available from the WordPress Plugin Directory.

About

WordPress is moving towards becoming a fully-fledged application framework, and we need new APIs. This project was born to create an easy-to-use, easy-to-understand and well-tested framework for creating these APIs, plus creating APIs for core.

This plugin provides an easy to use REST API, available via HTTP. Grab your site's data in simple JSON format, including users, posts, taxonomies and more. Retrieving or updating data is as simple as sending a HTTP request.

Want to get your site's posts? Simply send a GET request to /wp-json/wp/v2/posts. Update user with ID 4? Send a PUT request to /wp-json/wp/v2/users/4. Get all posts with the search term "awesome"? GET /wp-json/wp/v2/posts?filter[s]=awesome. It's that easy.

The WordPress REST API exposes a simple yet easy interface to WP Query, the posts API, post meta API, users API, revisions API and many more. Chances are, if you can do it with WordPress, the API will let you do it.

The REST API also includes an easy-to-use JavaScript API based on Backbone models, allowing plugin and theme developers to get up and running without needing to know anything about the details of getting connected.

Check out our documentation for information on what's available in the API and how to use it. We've also got documentation on extending the API with extra data for plugin and theme developers!

There's no fixed timeline for integration into core at this time, but getting closer!

Installation

Drop this directory into your plugins folder and activate it. You need to be using pretty permalinks to use the plugin, as it uses custom rewrite rules to power the API.

Also, be sure to use the Subversion trunk branch of WordPress Core as there are potentially recent commits to Core that the REST API relies on. See the WordPress.org website for simple instructions.

Issue Tracking

All tickets for the project are being tracked on GitHub. You can also take a look at the recent updates for the project.

Contributing

Want to get involved? Check out Contributing.md for details on submitting fixes and new features.

Security

We take the security of the API extremely seriously. If you think you've found a security issue with the API (whether information disclosure, privilege escalation, or another issue), we'd appreciate responsible disclosure as soon as possible.

To report a security issue, you can either email security[at]wordpress.org, or file an issue on HackerOne. We will attempt to give an initial response to security issues within 48 hours at most, however keep in mind that the team is distributed across various timezones, and delays may occur as we discuss internally.

(Please note: For testing, you should install a copy of the project and WordPress on your own server. Do not test on servers you do not own.)

License

GPLv2+