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
870
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
450
WordCamp Europe 2015
rmccue
1
390
WordCamp Brisbane 2015
rmccue
3
1.2k
WCNYC2014
rmccue
5
530
WCMKE2014
rmccue
5
3.5k
Introduction to Git + Using Git with WordPress
rmccue
8
1.9k
Other Decks in Programming
See All in Programming
"使いづらい" をリバースエンジニアリングする UI の読み解き方
rebase_engineering
0
110
コンポーネントライブラリで実現する、アクセシビリティの正しい実装パターン
schktjm
1
660
tsconfigのオプションで変わる型世界
keisukeikeda
1
130
Reactive Thinking with Signals, Resource API, and httpResource @Devm.io Angular 20 Launch Party
manfredsteyer
PRO
0
130
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
7
380
CRUD から CQRS へ ~ 分離が可能にする柔軟性
tkawae
0
220
「兵法」から見る質とスピード
ickx
0
190
TypeScript だけを書いて Tauri でデスクトップアプリを作ろう / Tauri with only TypeScript
tris5572
2
530
推論された型の移植性エラーTS2742に挑む
teamlab
PRO
0
150
REST API設計の実践 – ベストプラクティスとその落とし穴
kentaroutakeda
2
310
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
UPDATEがシステムを複雑にする? イミュータブルデータモデルのすすめ
shimomura
0
170
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
137
7k
Writing Fast Ruby
sferik
628
61k
Speed Design
sergeychernyshev
30
970
Designing for humans not robots
tammielis
253
25k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
840
Unsuck your backbone
ammeep
671
58k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Fireside Chat
paigeccino
37
3.5k
RailsConf 2023
tenderlove
30
1.1k
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