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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ryan McCue
January 28, 2016
Programming
940
5
Share
A Day of REST 2016
"Introduction to the WP REST API" - A brief history of the REST API plugin.
Ryan McCue
January 28, 2016
More Decks by Ryan McCue
See All by Ryan McCue
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
730
Next Generation WordPress
rmccue
4
480
WordCamp Europe 2015
rmccue
1
470
WordCamp Brisbane 2015
rmccue
3
1.3k
WCNYC2014
rmccue
5
600
WCMKE2014
rmccue
5
3.7k
Introduction to Git + Using Git with WordPress
rmccue
8
2k
Other Decks in Programming
See All in Programming
[BalkanRuby 2026] Drop your app/services!
palkan
3
710
バックエンドにElysiaJSを採用して気付いた、良い点・悪い点
wanko_it
1
180
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
270
iOS26時代の新規アプリ開発
yuukiw00w
0
210
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
400
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
270
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
13
6.3k
ふつうのFeature Flag実践入門
irof
6
3.2k
Moments When Things Go Wrong
aurimas
3
120
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
260
要はバランスからの卒業 #yumemi_grow
kajitack
0
200
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.1k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
4 Signs Your Business is Dying
shpigford
187
22k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
380
Rails Girls Zürich Keynote
gr2m
96
14k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
55k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
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