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
240
1
Share
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
78
Un-dux Your Front-End
nateabele
1
150
CloudFormation For Fun & Profit (But Mostly Sanity)
nateabele
0
90
Functional Reactive Systems
nateabele
1
190
ngPittsburgh - AngularUI Router Philosophy
nateabele
1
1.2k
The Future of Programming
nateabele
1
590
Past, Present, and Future: The Evolution of PHP Development
nateabele
1
650
The Future of Programming: PHP Argentina 2014
nateabele
1
130
Designing Hypermedia APIs
nateabele
4
720
Other Decks in Programming
See All in Programming
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
570
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.5k
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
170
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
1.1k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
17
5.7k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
940
JavaDoc 再入門
nagise
0
270
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
700
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
440
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Building the Perfect Custom Keyboard
takai
2
780
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
600
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
160
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
Why Our Code Smells
bkeepers
PRO
340
58k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
210
We Have a Design System, Now What?
morganepeng
55
8.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
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/