What is REST API :
A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocol such as GET and POST.
An API can be considered “RESTful” if it has the following features (not a complete list just the main ones):
- Client–server – The client handles the front end the server handles the backend and can both be replaced independently of each other.
- Stateless – No client data is stored on the server between requests and session state is stored on the client.
- Cacheable – Clients can cache response (just like browsers caching static elements of a web page) to improve performance.
RESTful Web Service :
A RESTful web service (also called a RESTful web API) is a web service implemented using HTTP and the principles of REST. It is a collection of resources, with four defined aspects:
It is a collection of resources, with four defined aspects:
the base URI for the web service, such as http://example.com/resources/
the Internet media type of the data supported by the web service. This is often JSON, XML or YAML but can be any other valid Internet media type.
the set of operations supported by the web service using HTTP methods (e.g., POST, GET, PUT or DELETE).
The API must be hypertext driven.