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
84
Unit testing in general
adammbalogh
2
66
Other Decks in Programming
See All in Programming
Jakarta EE meets AI
ivargrimstad
0
310
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
560
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1.1k
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
200
CSC509 Lecture 09
javiergs
PRO
0
140
Ethereum_.pdf
nekomatu
0
440
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
900
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.4k
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.3k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
4
1.1k
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Docker and Python
trallard
40
3.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
700
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Music & Morning Musume
bryan
46
6.2k
Designing Experiences People Love
moore
138
23k
We Have a Design System, Now What?
morganepeng
50
7.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Designing for humans not robots
tammielis
250
25k
Into the Great Unknown - MozCon
thekraken
32
1.5k
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!