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
860
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
370
WordCamp Brisbane 2015
rmccue
3
1.2k
WCNYC2014
rmccue
5
520
WCMKE2014
rmccue
5
3.4k
Introduction to Git + Using Git with WordPress
rmccue
8
1.9k
Other Decks in Programming
See All in Programming
AtCoder Heuristic First-step Vol.1 講義スライド
terryu16
2
1k
AHC 044 混合整数計画ソルバー解法
kiri8128
0
300
SideKiqでジョブが二重起動した事象を深堀りしました
t_hatachi
0
230
OUPC2024 Day 1 解説
kowerkoint
0
400
Develop Faster With FrankenPHP
dunglas
2
2.5k
GDG Super.init(version=6) - From Where to Wear : 모바일 개발자가 워치에서 발견한 인사이트
haeti2
0
560
エンジニア未経験が最短で戦力になるためのTips
gokana
0
210
家族・子育て重視/沖縄在住を維持しながらエンジニアとしてのキャリアをどのように育てていくか?
ug
0
240
読もう! Android build ドキュメント
andpad
1
240
Return of the Full-Stack Developer
simas
PRO
1
320
リアクティブシステムの変遷から理解するalien-signals / Learning alien-signals from the evolution of reactive systems
yamanoku
2
1k
AIエージェントを活用したアプリ開発手法の模索
kumamotone
1
750
Featured
See All Featured
Music & Morning Musume
bryan
46
6.4k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Speed Design
sergeychernyshev
28
860
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
25k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
31
4.7k
A Tale of Four Properties
chriscoyier
158
23k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
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