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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Nate Abele
August 29, 2013
Programming
240
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
More Decks by Nate Abele
See All by Nate Abele
Running Kubernetes in the Browser. Yes, really. Not really. Kind of.
nateabele
1
88
Un-dux Your Front-End
nateabele
1
160
CloudFormation For Fun & Profit (But Mostly Sanity)
nateabele
0
99
Functional Reactive Systems
nateabele
1
200
ngPittsburgh - AngularUI Router Philosophy
nateabele
1
1.2k
The Future of Programming
nateabele
1
610
Past, Present, and Future: The Evolution of PHP Development
nateabele
1
670
The Future of Programming: PHP Argentina 2014
nateabele
1
140
Designing Hypermedia APIs
nateabele
4
730
Other Decks in Programming
See All in Programming
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.7k
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
110
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
130
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
130
typoなんかねぇよ
raspython3
0
660
AIエージェント時代のコードレビューを設計する
nogu66
5
2.5k
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.7k
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
810
ソフトウェアラスタライザ
fadis
1
780
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
660
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
620
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Designing Experiences People Love
moore
143
24k
Designing Powerful Visuals for Engaging Learning
tmiket
1
530
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Cult of Friendly URLs
andyhume
79
7k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Leo the Paperboy
mayatellez
8
2.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
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/