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
Ryan McCue
January 28, 2016
Programming
5
900
A Day of REST 2016
"Introduction to the WP REST API" - A brief history of the REST API plugin.
Ryan McCue
January 28, 2016
Tweet
Share
More Decks by Ryan McCue
See All by Ryan McCue
Next Generation WordPress
rmccue
4
460
WordCamp Europe 2015
rmccue
1
420
WordCamp Brisbane 2015
rmccue
3
1.2k
WCNYC2014
rmccue
5
560
WCMKE2014
rmccue
5
3.5k
Introduction to Git + Using Git with WordPress
rmccue
8
1.9k
Other Decks in Programming
See All in Programming
モテるデスク環境
mozumasu
3
1.3k
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
Go言語はstack overflowの夢を見るか?
logica0419
0
650
マンガアプリViewerの大画面対応を考える
kk__777
0
400
Amazon Verified Permissions実践入門 〜Cedar活用とAppSync導入事例/Practical Introduction to Amazon Verified Permissions
fossamagna
2
100
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
200
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
190
Webサーバーサイド言語としてのRustについて
kouyuume
1
5k
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
260
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
820
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
0
130
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
380
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
4 Signs Your Business is Dying
shpigford
186
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Code Review Best Practice
trishagee
72
19k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
150
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Faster Mobile Websites
deanohume
310
31k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Side Projects
sachag
455
43k
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