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
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
86
Un-dux Your Front-End
nateabele
1
160
CloudFormation For Fun & Profit (But Mostly Sanity)
nateabele
0
97
Functional Reactive Systems
nateabele
1
190
ngPittsburgh - AngularUI Router Philosophy
nateabele
1
1.2k
The Future of Programming
nateabele
1
600
Past, Present, and Future: The Evolution of PHP Development
nateabele
1
660
The Future of Programming: PHP Argentina 2014
nateabele
1
130
Designing Hypermedia APIs
nateabele
4
730
Other Decks in Programming
See All in Programming
5分で問診!Composer セキュリティ健康診断
codmoninc
0
920
React本体のコードリーディング
high_g_engineer
1
140
Android CLI
fornewid
0
210
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
220
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.4k
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
440
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
110
Google Apps Script で Ruby を動かす
kawahara
0
140
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
メールのエイリアス機能を履き違えない
isshinfunada
0
230
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
570
Navigating Weather and Climate Data
rabernat
0
460
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Paper Plane
katiecoart
PRO
2
52k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
How STYLIGHT went responsive
nonsquared
100
6.2k
Color Theory Basics | Prateek | Gurzu
gurzu
0
410
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
ラッコキーワード サービス紹介資料
rakko
1
4.3M
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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/