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
840
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
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
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
390
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
170
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
10
5k
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
270
Rubyでつくるパケットキャプチャツール
ydah
0
160
2025.01.17_Sansan × DMM.swift
riofujimon
2
530
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.3k
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
230
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
5.9k
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.8k
Amazon Nova Reelの可能性
hideg
0
190
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
Designing for Performance
lara
604
68k
Agile that works and the tools we love
rasmusluckow
328
21k
How STYLIGHT went responsive
nonsquared
96
5.3k
Writing Fast Ruby
sferik
628
61k
Git: the NoSQL Database
bkeepers
PRO
427
64k
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