This content originally appeared on DEV Community 👩💻👨💻 and was authored by Conslatekoyo
APIs which stand for Application Programming Interfaces is a communication intermediary between th eclient and server and this enables sending of requests and fetching of responses.
An API documentation cointains information on how developers should structure requests and responses.
There are different types of APIs some of which include:
SOAP API- Simple Object Access Protocol . This enables the client and server exchange images via XML.This type of API is less flexible.
RPC APIs- Remote Procedure Calls. The client executes a funcyion or procedure in the server while the server send sthe output back to the client.
REST API- This API is frequently requested and used in the web today. Client sends data request to the server and the server uses client data to perform intenal actions and sends the output back to the client.
WebSocket API- Uses JSON objects to pass data. Supports two way communication between client and server. Server can send callbacks to more than one client.
Private APIs- Used to connect data and servers within the company.
Public APIs- Open to use by everyone.
Patner APIs- Only accessible to developers to facilitate inter-business partnerships.
Composite APIs- Combine two or more APIs to deal with complex system requirements.
REST API.
Stands for representational State Transfer.uses HTTP requests like GET,POST,PUT and delete to get data from the server.
GET- Used to retrieve data from the server.
PUT- Used to create a resource or overwrite it.
POST- Used to update resources in the server.
DELETE - Used to delete resources from the server.
Advantages of Rest Apis.
It is independent. This means that the data storage is seperate from the server and the UI.
It is lightweight. It relies on the HTTP standard.This enables it to be fast.
It is scalable and flexible- Intergration can be done without alot of work and it is easily scalable because of the difference between the client and the server.
API endpoint- The final point of contacts in the API system. They are very important because of security reasons.
How to Create an API
Provide a blueprint for your API whisldt thinking about the different API use cases.
Create prototypes using reusable codes. Once ready test and customise depending to the needed API specifications.
Test to avoid bugs and defects.This also protects from malicious attacks.
This content originally appeared on DEV Community 👩💻👨💻 and was authored by Conslatekoyo
Conslatekoyo | Sciencx (2022-09-18T21:45:55+00:00) APIs. Retrieved from https://www.scien.cx/2022/09/18/apis/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.