Introduction to APIs & Postman

The world is evolving faster, taking the New technology ,Principles and Inspiring ideas. Use of technology has actually made things accessible and easier. There is a storehouse of information, data, code available which we can use directly. APIs is one such application of them.

What are APIs? : API refers to Application Programming Interface, a set of built structures and designed code readily available to use for further applications. The sign-ins of google on pages, the use of Spotify in Instagram background, even the photos we take on different apps in our phone uses the APIs of respective applications. There is a broad range of APis available for anything, literally anything!

How does API actually function? : Basically ,API provides a gateway between the client (requester/ customer) and the server. The client sends a request to the API , the API forwards it to the server, server retrieves the required information & passes it to API and then it is delivered to the client. Now the question arises, If it simply forwards the information, why do we need it? Simply put, data is stored into various databases. An API of that particular app has access to those databases, that reduces the process-data, which gives faster results and enables data sharing.

client - server mechanism.jpg

What is Postman? : Postman is a platform that enables us to use, create ,test APIs in a simple and effective way, using the UI available on the platform. Postman has various features as to create a new collection, set the documentation ,create requests, run the requests , receive the status of responses all at one place.

postman api.png

How does it Work? : Postman uses methods to create requests. There are various requests like GET, PUT , PATCH ,DELETE , UPDATE. It has a URL part, which needs the URL for the API that is to be used/ tested. And a SEND button to send the request.

get send line.jpg The functions of these methods are easy to know from the documentation provided in the Basics of Apis collection.

basics of api documentation.jpg

The Basics of Postman API : Firstly , we usually Fork a Collection, giving it a name & a workspace. For beginners its usually my workspace but we can create new further on. Then take the following steps to create a request:

  1. Click on more option in the collection. more option.jpg
  2. Select Add request.
  3. Name the request according to your choice.
  4. Set the URL for the request.
  5. Select a method from the method box.
  6. Set the body part & params if required.
  7. Send Request!

Usually, we follow the above mentioned steps for all the methods available in the basics , like Get, Put & Delete. There are detailed descriptions of the methods , changes in the requests , body of code provided in the documentation.

Any drawbacks / points to note : The authorisation of the ids and requests is a major concern if the collection is unauthorised. So check the features of authorisation availability in Postman to keep your work secure.

I am Still Exploring Postman! Hope this helps.