Save time, money, and energy. If all these services were not available, people would create them for personal and public use. An API is
1. a code
2. not data or server
3. used to send data from the Server to the Client
4. used to create a communication system between two services
5. a messenger
6. a virtual bridge
Example, Neeraj Kumar wants to eat something. He grabs his mobile phone, and orders food using a food delivery app. The request goes to the server, which is connected to a cloud kitchen. The restaurant owner receives the order, and confirms it. The positive response goes back to Neeraj Kumar, via the same virtual bridge. After sometime, the food is delivered. We can see that a communication system was automatically built between two services - the Food Delivery App and the Cloud Kitchen.
Types of APIs:
1. Private - only for internal use, not exposed to public or third parties. They are created to meet your organization's internal demands. For example, there is a large database of employees' information like social security number, mobile details, address etc. If the internal management like HR or Operations teams have to access the data, they can use it.
2. Public - for external use, exposed to public or third parties. For example, Facebook Graph, which is a REST based Application Programming Interface. You can use it to upload Photos/Videos, post new stories, manage ads etc.
3. Partner - created for partners. If you want to share some important information with your partners to achieve your business goals.