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
890
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
410
WordCamp Brisbane 2015
rmccue
3
1.2k
WCNYC2014
rmccue
5
550
WCMKE2014
rmccue
5
3.5k
Introduction to Git + Using Git with WordPress
rmccue
8
1.9k
Other Decks in Programming
See All in Programming
アセットのコンパイルについて
ojun9
0
110
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
110
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
2
1.3k
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
340
為你自己學 Python - 冷知識篇
eddie
1
340
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
Improving my own Ruby thereafter
sisshiki1969
1
150
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
180
DockerからECSへ 〜 AWSの海に出る前に知っておきたいこと 〜
ota1022
5
1.9k
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
The state patternの実践 個人開発で培ったpractice集
miyanokomiya
0
160
Claude Codeで挑むOSSコントリビュート
eycjur
0
190
Featured
See All Featured
Embracing the Ebb and Flow
colly
87
4.8k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Into the Great Unknown - MozCon
thekraken
40
2k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
The Art of Programming - Codeland 2020
erikaheidi
55
13k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
What's in a price? How to price your products and services
michaelherold
246
12k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
A Tale of Four Properties
chriscoyier
160
23k
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