Open In App

How to generate API documentation using Postman?

Last Updated : 05 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Postman is a popular API testing tool that is used to simplify the process of developing and testing APIs (Application Programming Interface). API acts as a bridge between two software applications which enables them to communicate and share data. In this article, you will learn how to generate API documentation using Postman.

Prerequisites

Steps to Generate API Documentation

Step 1: Download and Open the Postman

Step 2: Create a Collection

Click on the collection tab and then click on the plus sign or create collection button. Then give it a name in this case we are naming it GeeksforGeeks.

Screenshot-2023-12-20-174535

Step 3 : Add the requests to the collection.

Click on the three dot on the collection name, and select the add request option. Give it a proper name according to its function.

Screenshot-2023-12-20-174838-(1)

Now we have named out request get users, and used a demo API

Screenshot-2023-12-20-174926

And when we click on the send button, we can here see the output, in the json format

Screenshot-2023-12-20-175014

Step 3: Add Description

Click on the three dot on the right side of the collection name, in this case GeeksforGeeks and then click on the view documentation.

Group-13

Here in the description section of the collection add a proper documentation and in the request add a proper description too.

colle

req

Step 4: Add Environment Variable ( Optional )

Click on the collection name then on the right side click on the variables tab, then add proper requied varialbe with variable name and its value.

Screenshot-2024-01-04-001910-1

And we can use that variable as shown in the image below.

vari

Step 5: Publish Documentation

Click on the three dot on the collection name and select the view documentation section.

vie-doc

Now add some decription about the collection and requests. and then click on the publish button, it will take u too the webpage and from there we can add some more information to the documentation.

publishhh

Now it will take you to the web page from there add some details accordingly and then click on the publish button, and voila your API documentation is now generated and is published.

11

And when the Document get pulished we can share it with the given the links in the documentation.

Screenshot-2023-12-23-011048

In this final output we can see the whole process at one.

ezgifcom-video-to-gif-converter-(1)



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads