Getting started with the


- Aaron Rutley

Tonights talk:

Introduce the REST API and explain some practical ways you could get started using it in your projects!

  • Alternative way to communicate with the WordPress database
  • Coming in WordPress 4.7 (Early December 2016)


  • JSON - JavaScript Object Notation
  • REST - Representational State Transfer
  • API - Application Programming Interface

Developer friendly, well structured way to talk to the WP database.

The REST API is all about endpoints

Getting data from the REST API

To GET a collection of posts

To GET an individual post

To GET page two of posts

Posting data to the REST API

POST data to create a new pages

PUT data to update a page

* Authentication Required

Default Content Endpoints

  • Posts/Pages/Media
  • Comments
  • Terms
  • Users
  • Meta

Custom Post Type Endpoints

When registering a CPT

'show_in_rest' => true,

To GET a collection of 'projects'

To GET a customised collection of 'projects'

Simple ways to use the WP REST API

  1. Load More
  2. Category Filtering
  3. Loading data from an external site

Demo Time

Tips for getting started with the REST API

Download & Install the WP REST API plugin

Use chrome with the JSON Formatter Extension

Use the WordPress REST API Console Plugin

Checkout Paw

Try Postman app

To recap - why is this a big deal ?

  • It can be used right now to improve your existing projects!
  • It can be used in core/plugins to improve the wp-admin (Quick Draft)
  • With authentication we can use it to create Custom Dashboards
  • We can now use WP as Headless CMS (Data store for an iOS App)
  • It can be used to create Single Page Applications (React, Angular, Vue)