Difference between revisions of "REST - Wendy's 4 for 4"

From Coder Merlin
Line 20: Line 20:
* [https://en.wikipedia.org/wiki/Representational_state_transfer REST (Wikipedia)]
* [https://en.wikipedia.org/wiki/Representational_state_transfer REST (Wikipedia)]
* [https://www.ibm.com/cloud/learn/rest-apis (IBM)]
* [https://www.ibm.com/cloud/learn/rest-apis (IBM)]
* [https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/RESTComponents.html (Cybersource)]
* [https://www.astera.com/type/blog/rest-api-definition/ (Astera)]
* [https://www.youtube.com/watch?v=lsMQRaeKNDk (YouTube)]
* [https://searchapparchitecture.techtarget.com/definition/RESTful-API (TechTarget)]

Revision as of 10:31, 20 August 2021

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Overview[edit]

Components[edit]

  • Resource Path

Resource path is the “request target” or the desired destination for the object. For example, a resource path could be “codermerlin.com/wiki/database/grades” where the object would be sent to the grades directory of the host.

  • HTTP Verb

With an HTTP Verb, the actions of the resource could be easily defined. A handy acronym to remember the available HTTP Verbs is “C R U D” or Creation (creates a resource), Retrieval (retrieves a resource), Update (updates a resource), and Deletion (deletes a resource).

  • Body

The body is the contents of the resource, and conveniently uses the JSON (JavaScript Object Notation) as the format. Both Creation operations and Update operations contain a body, but a Retrieval operation does not contain a body. In addition, the Deletion operation would also not contain a body.

  • Header

A header in short is simply a description of the resource, essentially acting as a metadata for the resource.

Usage[edit]

Concepts[edit]

Restrictions[edit]

Sources[edit]