Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
REST API Design, Part II
Search
Nate Abele
August 30, 2013
Programming
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
REST API Design, Part II
Given at PHP Undiscovered, SF.
Nate Abele
August 30, 2013
More Decks by Nate Abele
See All by Nate Abele
Running Kubernetes in the Browser. Yes, really. Not really. Kind of.
nateabele
1
100
Un-dux Your Front-End
nateabele
1
170
CloudFormation For Fun & Profit (But Mostly Sanity)
nateabele
0
110
Functional Reactive Systems
nateabele
1
210
ngPittsburgh - AngularUI Router Philosophy
nateabele
1
1.2k
The Future of Programming
nateabele
1
620
Past, Present, and Future: The Evolution of PHP Development
nateabele
1
680
The Future of Programming: PHP Argentina 2014
nateabele
1
150
Designing Hypermedia APIs
nateabele
4
750
Other Decks in Programming
See All in Programming
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
670
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
200
AI-Powered Domain-Driven Design
ziobrando
0
310
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
120
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
210
Vue Fes Japan の “作る側”に関わってみて
naokihaba
1
190
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.8k
Railsバージョンを4倍にした話
optim
0
600
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
190
Groovy as a human and AI friendly programming language
paulk
0
110
Modernizing iOS Apps
seyfoyun
0
110
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
4 Signs Your Business is Dying
shpigford
187
23k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
580
How STYLIGHT went responsive
nonsquared
100
6.3k
Docker and Python
trallard
47
4.2k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
310
Designing for Timeless Needs
cassininazir
1
530
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
320
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
490
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
950
Paper Plane
katiecoart
PRO
5
54k
Transcript
The Dream of the 90’s is Withering on the Vine
(in Portland)
How to Future-Proof & Increase The Level of Sanity in
the Design of Your APIs, by Respecting the Best Practices of HTTP Or...
This is Roy
Principles • Client-Server • Stateless • Cacheable • Uniform Interface
• Opaque Layering • Code-on-Demand
Objectives •Auth •Querying •Relationships •Pagination •Formats •Caching •Logging •API Versioning
Auth •Simple! •Basic vs. Digest (over SSL, obviously) •Upshot of
Basic: http://user:
[email protected]
/objects •Cookies? •Custom Tokens?
Querying •There are approaches to making this discoverable •They are
ridiculously ivory-tower •Better: ?q=<whatever>
Relationships •Goal: Introspect API domain model and transform object relationships
to URLs
Relationships GET /tasks HTTP/1.1 [{ title: "Finish client demo", completed:
false, _links: { self: { href: "http://my.app/tasks/1138" }, owner: { href: "http://my.app/users/nate" }, subtasks: { href: "http://my.app/tasks/1138/subtasks" } } }]
Pagination GET /tasks?page=5&order=due ?
Pagination HTTP Range! GET /videos/rickroll.mp4 Range: bytes=100-99999
Pagination HEAD /tasks HTTP/1.1 ... HTTP 200 OK Accept-Ranges: tasks
Pagination HEAD /posts HTTP/1.1 ... HTTP 200 OK Accept-Ranges: posts
Pagination GET /posts HTTP/1.1 Range: posts=1-20
Caching (Strategies) • Generated cache keys (ETag, If-None-Match) • For
writes: If-Match • Time-based (Last-Modified / If-Modified-Since)
Logging Custom Response Headers!
Logging X-Query-Log: SELECT * From users WHERE name = "nate"
X-Query-Log: SELECT * From tasks WHERE user_id = 13
Logging X-Query-Log: users.find({ name: "nate" })
DEMO