#WCORL – WordPress JSON REST API

This post is part of the series #WCORL 2014

Other posts in this series:

  1. #WCORL – WordPress JSON REST API (Current)
  2. #WCORL – Designing for development, the value of collaborative design
  3. #WCORL – Write Better Documentation

Speaker: Ivan Lopez
Twitter: @ivandevelop
Website: www.ivanlopezdeveloper.com/

Slides were verbose, so notes are a bit lacking here. Will link to slides when I can.

The API brings platform independency. Use WordPress as a backend for many different front-end platforms, regardless of their language (Ruby, Python, JS, whatever).

Authentication

  • Cookie (in core)
  • HTTP Basic Auth (requires Basic Auth plugin)
  • OAUTH ( requires OAUTH plugin)

Basic auth is fine for dev, but not secure enough for production.

How does it work?

A plugin is currently required to make this work. Goal is to get this in core with 4.1.

root request URL: /wp-json/

  • /posts/
  • /taxonomies/
  • /media/

A Backbone client exists for making communicating with the API easier.
See: client-js

For more information about the API, find the documentation here: wp-api.org.

Continue reading this series: