Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
220
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
59
Un-dux Your Front-End
nateabele
1
120
CloudFormation For Fun & Profit (But Mostly Sanity)
nateabele
0
82
Functional Reactive Systems
nateabele
1
170
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
610
The Future of Programming: PHP Argentina 2014
nateabele
1
120
Designing Hypermedia APIs
nateabele
4
700
Other Decks in Programming
See All in Programming
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
2
1.2k
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
340
Cell-Based Architecture
larchanjo
0
130
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
0
250
関数実行の裏側では何が起きているのか?
minop1205
1
700
20 years of Symfony, what's next?
fabpot
2
360
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
350
chocoZAPサービス予約システムをNuxtで内製化した話
rizap_tech
0
140
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
140
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
340
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Automating Front-end Workflow
addyosmani
1371
200k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Producing Creativity
orderedlist
PRO
348
40k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Docker and Python
trallard
47
3.7k
Mobile First: as difficult as doing things right
swwweet
225
10k
Unsuck your backbone
ammeep
671
58k
It's Worth the Effort
3n
187
29k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Visualization
eitanlees
150
16k
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/