Types of API
There are four different types of APIs commonly used in web services: public, partner, private and composite.
- Public API : A public API is open and available for use by any outside developer or business. These APIs can be used by anyone and these are also called as open APIs.
- Partner API : A partner API is made available to specifically selected and authorized outside developers or API consumers. The partners have some rights and licenses to access these APIs. These cannot be accessed by the public.
- Private API : Unlike Partner APIs, A private API is used only by internal users of an organization. Outsiders are not given any access to these APIs. These APIs are used by different teams inside the organization.
- Composite API : When the tasks are interconnected with each other, the APIs are combined to perform such tasks. This combination of APIs is called as composite API.
Example : Let us take an API and try to get the data from the API
API : https://jsonplaceholder.typicode.com/photos
Output :
How does an API Work ?
API stands for Application Programming Interface which helps software applications communicate with each other to exchange data, features, and functionality. This exchanged data is in the form of HTML, JSON, XML, and Text. In this article, we will discuss the workings of API.
We will discuss the following components of an API and how an API works:
Table of Content
- 1. API client
- 2. API request
- 3. API server
- 4. API response
- How does API work?
- Types of API
- Conclusion