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
720
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.6k
Introduction to Git + Using Git with WordPress
rmccue
8
2k
Other Decks in Programming
See All in Programming
AI時代になぜ書くのか
mutsumix
0
440
【ディップ|26年新卒研修資料】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
260
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
600
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
0
100
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
160
Are We Really Coding 10× Faster with AI?
kohzas
0
200
GitHub Copilot CLIのいいところ
htkym
1
130
色即是空、空即是色、データサイエンス
kamoneggi
1
140
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
230
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
430
AI Agent と正しく分析するための環境作り
yoshyum
2
560
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.7k
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
360
Visualization
eitanlees
151
17k
Facilitating Awesome Meetings
lara
57
6.9k
The SEO Collaboration Effect
kristinabergwall1
1
450
The untapped power of vector embeddings
frankvandijk
2
1.7k
Everyday Curiosity
cassininazir
0
210
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
A better future with KSS
kneath
240
18k
Designing Experiences People Love
moore
143
24k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building Applications with DynamoDB
mza
96
7k
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