How to Understand APIs with POSTMAN

AbhinavAbhinav
3 min read

What's an API?

Application Programming Interfaces (APIs) allow services to communicate with each other in a request-and-response format. Software Development has become more complex and collaborative over the years. Developers no longer need to create every service from scratch. APIs allow developers to access data from a service (like Facebook or Twitter) without any knowledge of how the codebase has been implemented. This makes software development more easier and efficient without compromising the security of the company's codebase.

Nowadays, APIs are widely available in various types for fetching different project-related data such as :

List of APIs from API 101 Workshop PPT

Postman: Gateway to the API

Postman is an API platform for building and using APIs.

Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.

Source :-) https://blog.postman.com/new-postman-api-platform-redefining-api-management-for-api-first-world/

Postman offers a variety of features and functionalities to help users manage their API workflows. Postman is a very useful tool that can be used for a variety of purposes, including API development, testing, documentation, and collaboration.

How to request data through API?

Source :-) https://www.google.com/search?q=request+response+pattern+for+postman+api&tbm=isch&ved=2ahUKEwjclPisupyEAxWHbmwGHeHQD64Q2-cCegQIABAA&oq=request+response+pattern+for+postman+api&gs_lp=EgNpbWciKHJlcXVlc3QgcmVzcG9uc2UgcGF0dGVybiBmb3IgcG9zdG1hbiBhcGlIxjRQvAVY_jBwAHgAkAEAmAHlAaAB2wyqAQUwLjMuNbgBA8gBAPgBAYoCC2d3cy13aXotaW1niAYB&sclient=img&ei=hijFZdy5HYfdseMP4aG_8Ao&bih=657&biw=1280&prmd=ivsnmbtz#imgrc=lxf1q7Z69WAgpM

Before we begin, let's become familiar with some terms.

A client is the entity that makes a request to a server. Some examples of clients are applications like web browsers.
A server controls resources and services. An API is the interface that exposes these resources + services to clients in a network.

The client can interact with an API by making requests over the network to the API. The API will then evaluate the request, perform the required operations, maybe interact with a database or other APIs, and then send back a response to the client.

Postman is a client that allows you to make requests and view responses from servers.

Before knowing how to make an API request, we need to know some operations. Postman facilitates these operations through HTTP methods:

  • Create: Uses the POST method, sending data to the API to create a new resource.

  • Read: Uses GET method, retrieving data about existing resources from the API.

  • Update: Uses PUT or PATCH methods, sending updated data to modify existing resources.

    • PUT: Replace the entire resource with new data.

    • PATCH: Updates specific parts of the resource.

  • Delete: Uses the DELETE method, removing a specific resource from the API.

As you can see in the above image, I made a request on api101.up.railway with an endpoint of book/3. And I used GET method because I want to get some information from the resource server. When my request is transferred then in milliseconds I get a response and data in JSON format as output in the Body section of your Postman Dashboard.

There's still a lot to explore in the API, such as authorizations, data types, integration, and much more.

So keep exploring the vast domain of APIs with Postman in software development. It will be beneficial for your next project.

0
Subscribe to my newsletter

Read articles from Abhinav directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Abhinav
Abhinav

👨‍💻Hi there! I am Abhinav | Web Developer in the Making | Tech Blogger @ Hashnode | AI/ML Enthusiast