Give it a ReST
What is ReST
- REpresentational State Transfer
- Uniform interface
- Stateless
- Cacheable
- Client-Server
- Layered System
- Code on Demand (optional)
Getting Started
- WPPusher (optional)
- WP API Plugin
- Authentication plugin (oAuth, Basic, Cookie)
- If Basic, install Application Passwords Plugin
- SearchWP API Route plugin (optional)
What can it to
-
Pull from WordPress, into
- WP Sites
- Native mobile app
- Non-WordPress sites
- Digital Signage
- Wherever, anything that can take Structured data can use the API
-
Push to WordPress
- requires authorization
- Allows management of WordPress data from external sources
Why use the ReST API?
- You request what you want; and it comes in it’s own bucket
- Don’t have to build the HTML you are receiving it from; but on the end it’s being consumed.
Hurdles
- Very little included in core, need a few additional plugins
- Meta data is protected; need to authenticate to get it
- Authenticating is challenging
- Custom endpoints for custom content