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
200
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
87
Unit testing in general
adammbalogh
2
72
Other Decks in Programming
See All in Programming
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
360
技術的負債の正体を知って向き合う
irof
0
230
Go言語はstack overflowの夢を見るか?
logica0419
0
520
品質ワークショップをやってみた
nealle
0
620
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
780
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
230
iOSでSVG画像を扱う
kishikawakatsumi
0
160
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
240
ALL CODE BASE ARE BELONG TO STUDY
uzulla
27
6.6k
Cursorハンズオン実践!
eltociear
2
1.2k
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
530
One Enishi After Another
snoozer05
PRO
0
150
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
RailsConf 2023
tenderlove
30
1.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
990
The Cult of Friendly URLs
andyhume
79
6.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
How GitHub (no longer) Works
holman
315
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Typedesign – Prime Four
hannesfritz
42
2.8k
Facilitating Awesome Meetings
lara
57
6.6k
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!