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
850
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
360
WordCamp Brisbane 2015
rmccue
3
1.2k
WCNYC2014
rmccue
5
510
WCMKE2014
rmccue
5
3.4k
Introduction to Git + Using Git with WordPress
rmccue
8
1.9k
Other Decks in Programming
See All in Programming
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
210
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
120
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.8k
DROBEの生成AI活用事例 with AWS
ippey
0
140
Domain-Driven Transformation
hschwentner
2
1.9k
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.4k
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
5
390
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
4
880
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
1
190
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
810
React 19アップデートのために必要なこと
uhyo
5
790
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
280
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
560
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Agile that works and the tools we love
rasmusluckow
328
21k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
KATA
mclloyd
29
14k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Facilitating Awesome Meetings
lara
52
6.2k
Designing Experiences People Love
moore
140
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