Hi and welcome.
Note: Site being redesigned MAY 2016
The REST API is considered to be one of the most important additions to WordPress.
The REST API currently exists as a plugin (WP REST API) ,
It has been partially added to WordPress (WordPress 4.4) .
REST APIs are in use throughout the Web.
The additional of a REST API will enable developers to build applications in any programming language and running on any platform that can access WordPress.
Using the WordPress API the content of WordPress sites can be accessed by other sites and clients.
It will allow remote systems to retrieve,edit and add content to a WordPress site.
- Client based themes and templates
- Mobile Apps
- Mashups using other data from other Sites
What is an API?-
In computer programming, an application programming interface (API) is a set of routines, protocols, and tools for building software and applications.- Wiki
What Is REST?
REST (Representational State Transfer) is an architectural style for building APIs.
The data transferred between WordPress and remote systems is encoded in the JSON format.
What Is JSON?
Communication between a remote system and WordPress uses the http protocol, just like when accessing a standard web page.
In order to do tests and view requests and responses you can use a standard web browser, or better still an http client.
You can use:
- Postman – a Google chrome extension lets you create commands.
- Rest Easy– An add-on for Firefox
- Curl – a command line client –How to use it Manual page.
A Simple example
To demonstrate the API in action I am going to use a standard web browser to get a list of all posts on a test site.
Setting Up a Test Site
To become familiar with the WordPress API you should create a test site.
You will also need some test data. You can use this theme unit test data.
You will also need to Install the WP REST API plugin.
About This Site
I’m Steve and I’ve been using WordPress for around 10 years and I am currently learning about APIs, and moving back into coding.
This site is focused on passing on what I learn.
Note: if you’re a small business or personal site owner looking to simply build a website and aren’t concerned with the more technical details then visit my other site.