introduction to APIs

introduction to APIs

Introduction

API -

APIs are mechanisms through which two software components communicate with each other.

To better understand this let's take an analogy of a customer in a restaurant.

when a customer orders food does he directly go to the kitchen??

no, right!

this work is done by the waiter. The waiter takes the order from the customer and then conveys the order to the chef who in response will prepare the food and again the waiter gets the food from the kitchen to the customer.

so basically, this is the work of an API, it gets the request from the user and then takes it to the server and again gets back the requested data to the user.

Few Methods :

  • GET

  • POST

  • PUT

  • DELETE

  • GET:- as the name suggests GET is used to get the requested data from the servers

  • POST:- similarly POST is a method used to send data to the server. This will create a new resource on the server

  • PUT:- PUT is also used to send data to the server but unlike POST this doesn't create a new resource on the server instead it is used to update an existing resource on the server.

  • DELETE:- DELETE is used to remove a resource from the server.

Credits-

I learned this through a workshop I recently attended.

This was conducted by postman student experts Sunku Saarthak and Sri Sai Raksha Kala .

It was a great session and helped me understand APIs better.

The hosts helped us to understand this better through a hands-on workshop using the postman website which helps users to design, build, test and iterate their APIs.

Thank you.