Source: API Best Design Practices
Representational State Transfer
Resources (Any kind of object, data, or service that can be accessed by a client)
An identifier of a resource is a URI that uniquely identifies a resource.
An example might be:
https://adventure-works.com/orders/1
GET, POST, PUT, PATCH, and DELETE
The URIs should be based on nouns (the resource) as opposed to verbs (the operations on the resource)
https://adventure-works.com/orders
If a web API is “chatty”, it requires multiple requests to perform a single tast. This is a bad thing because it leads to more API calls, which slows down the servers.
200 (OK)
404 (Not Found) if the resource cannot be located
204 (No Content) if the request was fulfilled buy there is no response body included in the HTTP response (for example, a search request with no matches)
201 (Created) if it creates a new resource
200 (OK) if it does some processing but does not create a new resource.
204 (No Content) if there is no result to return
204 (No Content)
What are APIs that are not considered RESTful, and what do these look like?