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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Nate Abele
August 29, 2013
Programming
230
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
70
Un-dux Your Front-End
nateabele
1
150
CloudFormation For Fun & Profit (But Mostly Sanity)
nateabele
0
88
Functional Reactive Systems
nateabele
1
180
ngPittsburgh - AngularUI Router Philosophy
nateabele
1
1.1k
The Future of Programming
nateabele
1
570
Past, Present, and Future: The Evolution of PHP Development
nateabele
1
630
The Future of Programming: PHP Argentina 2014
nateabele
1
130
Designing Hypermedia APIs
nateabele
4
710
Other Decks in Programming
See All in Programming
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
540
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
430
第3木曜LT会 #28
tinykitten
PRO
0
110
iOS機能開発のAI環境と起きた変化
ryunakayama
0
180
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
790
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
370
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
220
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
220
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
2
190
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
180
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
5k
Featured
See All Featured
The Invisible Side of Design
smashingmag
303
52k
Being A Developer After 40
akosma
91
590k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
210
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Prompt Engineering for Job Search
mfonobong
0
270
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
Done Done
chrislema
186
16k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
We Are The Robots
honzajavorek
0
220
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
What's in a price? How to price your products and services
michaelherold
247
13k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
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/