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
930
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
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
580
Next Generation WordPress
rmccue
4
470
WordCamp Europe 2015
rmccue
1
460
WordCamp Brisbane 2015
rmccue
3
1.3k
WCNYC2014
rmccue
5
580
WCMKE2014
rmccue
5
3.6k
Introduction to Git + Using Git with WordPress
rmccue
8
2k
Other Decks in Programming
See All in Programming
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
260
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.9k
The free-lunch guide to idea circularity
hollycummins
0
260
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
460
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
2
790
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
160
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
520
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
960
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
120
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
270
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
53k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
The Pragmatic Product Professional
lauravandoore
37
7.2k
Ethics towards AI in product and experience design
skipperchong
2
220
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
30 Presentation Tips
portentint
PRO
1
250
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
77
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Embracing the Ebb and Flow
colly
88
5k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
460
Site-Speed That Sticks
csswizardry
13
1.1k
Visualization
eitanlees
150
17k
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