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
960
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
860
Next Generation WordPress
rmccue
4
490
WordCamp Europe 2015
rmccue
1
480
WordCamp Brisbane 2015
rmccue
3
1.3k
WCNYC2014
rmccue
5
620
WCMKE2014
rmccue
5
3.7k
Introduction to Git + Using Git with WordPress
rmccue
8
2k
Other Decks in Programming
See All in Programming
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
140
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
250
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
210
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
280
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
290
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
380
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
260
Oxlintはいいぞ(続)
yug1224
1
530
Cloudflare is Agents
chimame
0
190
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
280
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
130
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
1.1k
Automating Front-end Workflow
addyosmani
1369
210k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
850
Rails Girls Zürich Keynote
gr2m
96
14k
The Curse of the Amulet
leimatthew05
2
14k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
410
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
660
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Navigating Team Friction
lara
192
16k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
440
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