An API lets two pieces of software talk to each other For example you have your program, you have some data, you have other software components.
- REST APIs are used to interact with web services, for example, the application that you call through the internet. Rest API’s function by sending a request, the request is communicated via HTTP message. The HTTP message usually contains a JSON file. This contains instructions for what operation we would like the service or resource to perform. In a similar manner, API returns a response, via an HTTP message, this response is usually contained within a JSON.
- REST API over HTTP

