Representational State Transfer
REST is an architectural style for building distributed systems based on hypermedia.
REST is independent of any underlying protocol and is not necessarily tied to HTTP. However, most common REST API implementations use HTTP as the application protocol, and this guide focuses on designing REST APIs for HTTP.
REST APIs are designed around resources, which are any kind of object, data, or service that can be accessed by the client.
A resource has an identifier, which is a URI that uniquely identifies that resource. For example, the URI for a particular customer order might be:
https://adventure-works.com/orders/1
The most common operations are GET, POST, PUT, PATCH, and DELETE.
Resource URIs should be based on nouns (the resource) and not verbs (the operations on the resource).
https://adventure-works.com/orders
“chatty” web APIs that expose a large number of small resources. Such API may require a client application to send multiple requests to find all of the data that it requires. And we should avoid using such API’s and instead denormalizing the data and combining related information into bigger resources.
returns HTTP status code 200 (OK)
the method should return 404 (Not Found).
it returns HTTP status code 201 (Created)
If the delete operation is successful, the web server should respond with HTTP status code 204 (No Content)