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
780
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
430
WordCamp Europe 2015
rmccue
1
300
WordCamp Brisbane 2015
rmccue
3
1.1k
WCNYC2014
rmccue
5
430
WCMKE2014
rmccue
5
3.1k
Introduction to Git + Using Git with WordPress
rmccue
8
1.8k
Other Decks in Programming
See All in Programming
VS Code をプロダクトにどう取り込むか
onomax
1
770
“Seeing Like a Programmer”—Resiliency, Limits, and Moral Hazards in Software Engineering (LambdaConf 2024)
chriskrycho
0
210
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
990
Goのmultiple errorsについて (2024年4月版)
syumai
4
1.2k
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
170
AmperとFleetを使ったAndroidアプリ
yoppie
0
270
Site Reliability Engineering for GMO
pyama86
9
1.1k
Anthropic Cookbook のおすすめレシピ
schroneko
7
1.3k
パフォーマンスを求めてDBに機能を寄せる戦略
aoyagikouhei
0
110
Snowflakeで眠ったデータを起こそう!
estie
0
160
Implementing Design Systems in Swift
seyfoyun
2
490
PostmanでAPIの動作確認が楽になった話
h455h1
0
190
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
45
9.8k
The Cost Of JavaScript in 2023
addyosmani
21
3.9k
Web development in the modern age
philhawksworth
203
10k
Making Projects Easy
brettharned
109
5.5k
Teambox: Starting and Learning
jrom
128
8.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
Embracing the Ebb and Flow
colly
80
4.2k
Building Adaptive Systems
keathley
32
1.9k
Web Components: a chance to create the future
zenorocha
306
41k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
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