Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
A Day of REST 2016
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ryan McCue
January 28, 2016
Programming
950
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A Day of REST 2016
"Introduction to the WP REST API" - A brief history of the REST API plugin.
Ryan McCue
January 28, 2016
More Decks by Ryan McCue
See All by Ryan McCue
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
750
Next Generation WordPress
rmccue
4
480
WordCamp Europe 2015
rmccue
1
480
WordCamp Brisbane 2015
rmccue
3
1.3k
WCNYC2014
rmccue
5
600
WCMKE2014
rmccue
5
3.7k
Introduction to Git + Using Git with WordPress
rmccue
8
2k
Other Decks in Programming
See All in Programming
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
260
Agentic UI
manfredsteyer
PRO
0
170
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
800
Oxcを導入して開発体験が向上した話
yug1224
4
320
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
100
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
180
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
270
さぁV100、メモリをお食べ・・・
nilpe
0
140
3Dシーンの圧縮
fadis
1
770
OSもどきOS
arkw
0
570
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Limits of Empathy - UXLibs8
cassininazir
1
360
Paper Plane (Part 1)
katiecoart
PRO
0
9k
Paper Plane
katiecoart
PRO
1
51k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
160
Writing Fast Ruby
sferik
630
63k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Code Review Best Practice
trishagee
74
20k
Transcript
Introduction to the REST API Ryan McCue Senior Engineer at
Human Made
What is the API?
What is the API?
Why is the API? A history of the API
Existing WordPress APIs
XML-RPC Existing APIs & friends Most powerful:
JSON-RPC Existing APIs
Existing APIs
JSON-RPC Existing APIs
admin-ajax Existing APIs & friends Most developer friendly:
RSS Existing APIs & friends Most used:
RSS.js Existing APIs
Existing APIs
RSS.js Existing APIs
The World Wide Web
World Wide Web
None
None
None
None
World Wide Web
None
None
World Wide Web
None
None
WordPress.com API
None
.com API …REST?
None
.com API WordPress.com specifics
None
.com API Inspiration
.com API Unification
Birth of a Plugin
None
JSON
JSON Language Support
None
None
None
JSON Not XML
JSON JSONP
JSON
None
JSON
None
JSON
JSON /**/callback({…
REST
REST Browser Support
REST RPC
REST Challenges
Response Format
Responses Breaking from Core Names
Responses Posts ID => id post_content => content post_name =>
slug
Responses Comments comment_ID => id comment_content => content post_name =>
slug
Responses Terms term_id => id name => name slug =>
slug
Responses Users ID => id display_name => name user_nicename =>
slug
Responses Enveloping
None
Responses $ http demo.wp-api.org/wp-json/v2/wp?_envelope HTTP/1.1 200 OK { "body": {
"name": "WP API Demo", "description": "Just another WordPress site”, "_links": { ... }, "headers": { "Allow": "GET" }, "status": 200 }
Responses HAL
None
Responses JSON Schema
Infrastructure
Infrastructure Request & Response
Infrastructure Separation of Concerns
Infrastructure REST Server vs Rewrites
Problems
Problems It’s New
Problems Meta
Problems Authentication
Bad / Good?
Help Us!
Thanks. speakerdeck.com/rmccue