![]() ![]() We will discuss the most important ones currently in Software Engineering. ![]() There are different types of APIs like REST APIs, GraphQL, Websocket APIs, SOAP, RPC APIs, and more. How do APIs work AnchorĪll APIs have their own set of protocols and definitions, so each and every API type will have a different type of operating mechanism. The application that is requesting the data is the client and the application that sends the response is the server. For example, an application’s backend API for registering a user can insert the user record in the database and then communicate to an email service via an API call for sending a confirmation email to the user. It’s not only mobile apps or web-facing frontend apps that can be API clients for consuming data, even backend servers can be clients of other backend APIs. For instance, in the case of a “Search Product API”, the request needs to contain the keywords to search for, the identity of the user who is sending the request, and the response format could be an array of objects that will have certain key-value pairs based on which the client will display the product list. For any API, the request and response formats will be defined earlier and documented for future reference. The app on your phone (client) will send a request to the Amazon backend servers, which will handle the request, gather appropriate data from a cache layer or a database server, prepare a response, and send it back to the client. All applications that we use in our day-to-day lives are in a way powered by APIs, they kind of form the backbone of communication.įor instance, when you search for a product on Amazon, the Amazon app on your phone communicates with the Amazon servers that will send back the list of items to show you. APIs have their own set of predefined rules, protocols, and definitions based on which the communication takes place. ![]() API stands for Application Programming Interface, when any two software components need to communicate with each other they can do so with the help of an API.
0 Comments
Leave a Reply. |