The term REST stands for Representational State Transfer. It is an architectural style that defines a set of rules in order to create Web Services.
designed around resources, which are any kind of object, data, or service that can be accessed by the client.
a URI that uniquely identifies that resource, for example user input for city name to get location and weather data.
GET, POST, PUT, PATCH, and DELETE.
URIs should be based on nouns (the resource)
example of a good URL is http://www.microsoft.com, which is the link to Microsoft’s web page. A URL, which stands for uniform resource locator, is a formatted text string used by web browsers and other software to identify a network resource on the Internet.
“chatty” web APIs that expose a large number of small resources. Such an API may require a client application to send multiple requests to find all of the data that requires. bad or good? It’s a bad thing and we should avoid using it.
HTTP status code 200 (OK).
HTTP status code 404 (Not Found). or If not valid, 400 Bad Request is returned
HTTP status code 201 (Created).
What status code does a successful DELETE request return? Ans: Responses. If a DELETE method is successfully applied, there are several response status codes possible: A 202 ( Accepted ) status code if the action will likely succeed but has not yet been enacted. A 204 ( No Content ) status code if the action has been enacted and no further information is to be supplied.
More about API, HTTP Verbs(GET, POST, PUT, PATCH, and DELETE.) errors types and dealing with it.