Skip to content

rakeshgajjar/rest-cheatsheet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Rest Architecture Cheatsheet

Definitions

REST stands for REpresentational State Transfer. The term was introduced in 2000, in Roy Thomas Fielding's dissertation Architectural Styles and the Design of Network-based Software Architectures.

Hey server, can I tell you something please?

The following table the expected meaning of requests in a restful API for typical use-cases:

Method Path to a specific id, like /printers/{id} Path to a collection, like /printers
GET "Please get me the data for this printer" "Please get me the data for the entire collection of printers"
PUT "Please (over)write this printer with the object I have in body" "Please (over)write this collection of printers with the object I have in body"
POST Don't do it. You post specific items at the collection level "My body contains a printer object. Please add it to the collection. It'd nice if you get back to me with the resulting ID"
DELETE "Please delete this printer" "Please delete the entire collection of printers"
PATCH "Please patch this printer object with the properties I'm sending you in body" Not typically allowed

References

  • RFC 7230 HTTP/1.1 Message Syntax and Routing
  • RFC 7231 HTTP/1.1 Semantics and Content

About

⚡️ REST cheatsheet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published