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
820
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
440
WordCamp Europe 2015
rmccue
1
350
WordCamp Brisbane 2015
rmccue
3
1.1k
WCNYC2014
rmccue
5
500
WCMKE2014
rmccue
5
3.4k
Introduction to Git + Using Git with WordPress
rmccue
8
1.9k
Other Decks in Programming
See All in Programming
hotwire_or_react
harunatsujita
8
4k
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.1k
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
16
4k
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
170
qmuntal/stateless のススメ
sgash708
0
120
Android 15 でアクションバー表示時にステータスバーが白くなってしまう問題
tonionagauzzi
0
140
Synchronizationを支える技術
s_shimotori
1
150
ECSのサービス間通信 4つの方法を比較する 〜Canary,Blue/Greenも添えて〜
tkikuc
11
2.3k
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.5k
macOS でできる リアルタイム動画像処理
biacco42
6
1.7k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
420
VR HMDとしてのVision Pro+ゲーム開発について
yasei_no_otoko
0
100
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Ruby is Unlike a Banana
tanoku
96
11k
Thoughts on Productivity
jonyablonski
67
4.3k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Producing Creativity
orderedlist
PRO
341
39k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Raft: Consensus for Rubyists
vanstee
136
6.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
A better future with KSS
kneath
238
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