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
68
Other Decks in Programming
See All in Programming
時計仕掛けのCompose
mkeeda
1
290
Unity Android XR入門
sakutama_11
0
150
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.8k
『品質』という言葉が嫌いな理由
korimu
0
160
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
2
520
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
720
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
240
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
sappoRo.R #12 初心者セッション
kosugitti
0
240
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
120
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
11
1.9k
ソフトウェアエンジニアの成長
masuda220
PRO
10
920
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Automating Front-end Workflow
addyosmani
1367
200k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
430
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Building Your Own Lightsaber
phodgson
104
6.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Bash Introduction
62gerente
610
210k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
YesSQL, Process and Tooling at Scale
rocio
171
14k
Speed Design
sergeychernyshev
26
790
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!