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
REST API Design, Part I
Search
Nate Abele
August 29, 2013
Programming
1
210
REST API Design, Part I
Given at PHP Undiscovered, SF.
Nate Abele
August 29, 2013
Tweet
Share
More Decks by Nate Abele
See All by Nate Abele
Running Kubernetes in the Browser. Yes, really. Not really. Kind of.
nateabele
1
55
Un-dux Your Front-End
nateabele
1
110
CloudFormation For Fun & Profit (But Mostly Sanity)
nateabele
0
80
Functional Reactive Systems
nateabele
1
160
ngPittsburgh - AngularUI Router Philosophy
nateabele
1
1.1k
The Future of Programming
nateabele
1
540
Past, Present, and Future: The Evolution of PHP Development
nateabele
1
600
The Future of Programming: PHP Argentina 2014
nateabele
1
120
Designing Hypermedia APIs
nateabele
4
690
Other Decks in Programming
See All in Programming
マイベストのシンプルなデータ基盤の話 - Googleスイートとのつき合い方 / mybest-simple-data-architecture-google-nized
snhryt
0
140
Private APIの呼び出し方
kishikawakatsumi
2
820
AI駆動開発カンファレンスAutumn2025 _AI駆動開発にはAI駆動品質保証
autifyhq
0
150
Dive into Triton Internals
appleparan
0
480
flutter_kaigi_2025.pdf
kyoheig3
1
160
CSC509 Lecture 11
javiergs
PRO
0
300
KoogではじめるAIエージェント開発
hiroaki404
1
420
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
1
130
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
450
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
290
Nitro v3
kazupon
2
230
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
670
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
310
Unsuck your backbone
ammeep
671
58k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8k
The Invisible Side of Design
smashingmag
302
51k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Music & Morning Musume
bryan
46
6.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6k
Transcript
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/