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: Key Concepts
Search
Adam
March 31, 2015
Programming
2
190
REST: Key Concepts
Main points of REST: Methods, Status codes, Error handling, Versioning, Documentation, Testing
Adam
March 31, 2015
Tweet
Share
More Decks by Adam
See All by Adam
Unit testing with PHPUnit
adammbalogh
1
86
Unit testing in general
adammbalogh
2
71
Other Decks in Programming
See All in Programming
git worktree × Claude Code × MCP ~生成AI時代の並列開発フロー~
hisuzuya
1
460
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
490
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
110
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
810
エンジニア向け採用ピッチ資料
inusan
0
160
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
390
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
100
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.3k
Is Xcode slowly dying out in 2025?
uetyo
1
190
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
180
5つのアンチパターンから学ぶLT設計
narihara
1
110
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Designing for Performance
lara
609
69k
The Language of Interfaces
destraynor
158
25k
Navigating Team Friction
lara
187
15k
Producing Creativity
orderedlist
PRO
346
40k
Speed Design
sergeychernyshev
32
1k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Typedesign – Prime Four
hannesfritz
42
2.7k
Transcript
Rest Key Concepts
@adammbalogh Software developer Author of Phprest
https://github.com/phprest/phprest
Good To Know REST HTTP
REST with HTTP As a Web Dev We HTTP
None
Methods
Methods OPTIONS Returns available HTTP methods on resource(s) GET Retrieves
resource(s) POST Creates a resource PUT Creates/Updates a resource PATCH Updates a resource (partially) DELETE Deletes a resource
OPTIONS /users Allow: GET,POST,DELETE Methods / Options
Methods / Put PUT for Creation Client specified ID PUT
/products/16
Methods / Patch { “email”: “
[email protected]
” } [ { "op":
“replace", "path": “/email", "value": “
[email protected]
“ } ]
Status Codes
None
Status Codes Status code Meaning 1xx Informational 2xx Success 3xx
Redirection 4xx Client Error 5xx Server Error http://httpstatus.es/
Asynchronous operation Location: /queue/1337
Rate limiting
Errors Human readable Detailed error messages
Api Versioning
Api Versioning Breaking existing clients? v99
Api Versioning New version When?
“Your API is only as good as its documentation” API
Documentation
API Documentation APIs for Humans
Swagger http://swagger.io/
None
API Blueprint https://apiblueprint.org
None
None
https://github.com/apiaryio/dredd
API Testing
Postman + Newman + Blueman API Testing Frisby.js CI
Thank you!