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 I
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Nate Abele
August 29, 2013
Programming
260
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
REST API Design, Part I
Given at PHP Undiscovered, SF.
Nate Abele
August 29, 2013
Transcript
14 slides
RESTFUL API DESIGN
Every time someone mentions RESTful web services, there’s always that
one person that has to chime in: “That’s not really RESTful, it’s just kinda RESTful.” — Steve Klabnik
THE RICHARDSON MATURITY MODEL • Level 0: RPC over HTTP
• Level 1: Resources vs. single service endpoint • Level 2: HTTP Verbs vs. URL-based method calls • Level 3: Hypermedia controls
BASICALLY, A CONTENT-NEGOTIATED STATE MACHINE
<link rel="stylesheet" href="default.css" type="text/css" title="Default Style" />
<form method="POST" action="/items"> <input type="text" name="title" /> </form>
<link rel="next" href="/next" type="content/type" title="Next!" />
MEANINGFUL RESPONSE CODES • 201: Created • 202: We’ll get
back to you • 304: Use the copy I gave you last time • 400: WTF URL parameters • 401: Authentication • 403: Access control
MEANINGFUL RESPONSE CODES • 406: I refuse to speak XML
• 410: Soft deletes • 415: I refuse to listen to XML • 418: Useless, I wanted coffee • 422: Validation failed • 429: Chill out • 451: Legal told me not to • 503: Network/database/dependent service issues
SCALE
VERSIONING?
application/vnd.my-company.app+json; version=2.2 ? X-Version: 2.2 ?
INTENTS
http://api.fbi.gov/wanted? order_by=notoriety,desc& limit=10& page=1& fields=name,aka,known_associates, reward,description,last_seen vs. http://api.fbi.gov/wanted/most https://mathieu.fenniak.net/stop-designing-fragile-web-apis/
More Decks by Nate Abele
See All by Nate Abele
Running Kubernetes in the Browser. Yes, really. Not really. Kind of.
nateabele
1
110
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
630
Past, Present, and Future: The Evolution of PHP Development
nateabele
1
690
The Future of Programming: PHP Argentina 2014
nateabele
1
160
Designing Hypermedia APIs
nateabele
4
760
Other Decks in Programming
See All in Programming
AIコーディングをセッションで終わらせない: PHPライブラリ開発におけるコンテキスト承継設計
ickx
0
110
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
150
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
Debian JP Projectのサーバー構成
uwabami
1
180
protojson における文字化けの扱い
kazuki1023
0
470
はじめてのPLATEAU
nokonoko1203
1
670
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.3k
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
330
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
410
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
240
特急いなほ as a Workflow / 20261107jaws-festa-2026-akita-lt
kasacchiful
PRO
0
110
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
560
Navigating Weather and Climate Data
rabernat
0
600
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Chasing Engaging Ingredients in Design
codingconduct
0
410
Paper Plane
katiecoart
PRO
6
55k
Automating Front-end Workflow
addyosmani
1370
210k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
590
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.5k
Fireside Chat
paigeccino
43
4.1k
We Are The Robots
honzajavorek
0
460
First, design no harm
axbom
PRO
2
1.4k