What is API
API
What is API ?
An API(Application Program Interface) is a set of routines, protocols, and tools for building software applications. Basically, an API specifies how software components should interact. API allow access to data and interact with external software components, operating systems, or microservices.
Types of API
Web APIs
Web APIs are APIs that can be accessed using the HTTP protocol. The API defines endpoints, and valid request and response formats.
Open APIs(or External APIs, Public APIs)
These are available for developers and other users with minimal restrictions. They may require registration, and use of an API key, or may be completely open. They are intended for external users to access data or services.
Internal APIs
In contrast to open APIs, internal APIs are designed to be hidden from external users. They are used within a company to share resources. They allow different teams or section of a business to consume each other's tools, data and programs.
Partner APIs
These are similar to open APIs, but they feature restricted access, often controlled through a third-party API gateway. They are usually intended for a specific purpose, such as providing access to a paid-for service.
Composite APIs
Allow developers to access several endpoints in one call.
Types of API Architecture
REST(representational state transfer)
Popular web architecture. REST URI contain details such as query parameters.
- Client-server architecture: the interface is separated from the backend and data storage. This allows for flexibility and for different components to evolve independent of each other
- Statelessness: no client context is stored on the server between requests
- Cacheability: clients can cache response, so a REST API response must explicitly state whether it can be cached or not
- Layered system: the API will work whether it is communicating directly with a server, or through an intermediary such as a load balancer
JSON-RPC and XML-RPC (remote procedural call)
SOAP(simple object access protocol)
- Processing model to determine how to process a SOAP message
- Extensible model to determine SOAP features and modules
- Protocol binding rules to determine how to use SOAP with underlying protocol
- Message construct to determine how to structure SOAP message
Comments
Post a Comment