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
82
Unit testing in general
adammbalogh
2
62
Other Decks in Programming
See All in Programming
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
680
禅の心を手に入れよ
eltociear
1
400
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
1k
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
420
Snowflakeで眠ったデータを起こそう!
estie
0
150
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.5k
Site Reliability Engineering for GMO
pyama86
8
1.1k
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
1
390
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
390
WebGLで始める コンピュータグラフィックス入門
heller77
0
320
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
330
Go製Webアプリケーションのエラーとの向き合い方大全、あるいはやっぱりスタックトレース欲しいやん / Kyoto.go #50
utgwkk
6
1.8k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
26
5.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
The Straight Up "How To Draw Better" Workshop
denniskardys
228
130k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
22
1.4k
Statistics for Hackers
jakevdp
790
220k
Teambox: Starting and Learning
jrom
128
8.4k
[RailsConf 2023] Rails as a piece of cake
palkan
28
4k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
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!