Using Postman for API Documentation

What is Postman?

Postman is a tool used to test, develop, and modify APIs. Also, it provides API monitoring and documentation. It’s widely used by most of the enterprise and software product companies.

We can use Postman collections to share between different environments and to perform API assertion testing. 

Using Postman for API Documentation

Features and Pricing

Following are features of Postman

  1. Design, develop, and test APIs
  2. Collaborating with your team
  3. Manage the API workflow in one place

There are three types of pricing plans. Recently they have removed the free plan which was very popular among integration developers. 

Postman API integration pricing

Why do we need Postman documentation?

It offers well organized, structured, and beautiful documentation. Without spending much time on design, it can generate from the API collection, which we used for extensive testing.

It provides a secured URL to access publicly, and from that, users can Import and run those cases directly in the Postman tool.

Business scenario

Let’s take an example; your company has asked you to create documentation and share it publicly. Also, it would help if you created REST API test cases. In this post, we will explain this step by step-

Step 1 – Creating a sample collection

Create a collection with the required information about your API. Postman accepts Markdown text formatting to beautify content.

Postman API - Creating a sample collection

Step 2 – Adding requests

Add a request under the created collection and save the appropriate response.

Postman API Add a request

Step 3 – Publishing Docs

Publish docs using collection settings, as shown in the below Image.

Postman API Publishing Docs

After publishing the collection, you will get a URL to access, as shown below.

Public documentation lik

Step 4 – Document Overview 

Users can set the preferred language for requests. In the documentation, the request’s saved responses will be shown right-hand side and required headers and body shown left-hand side. They can import from the “Run In Postman” button.

Postman API Document overview

Step 5 – Adding Custom Domain to the generated URL 

To set up a custom domain, customers need a subscription. Follow the below screenshots to add a custom domain.

Postman API custom domain
verify custom domain

You can select a custom domain while publishing docs, as shown below.

how to add custom domain

Conclusion

API Documentation provides a perfect guide to access APIs. People spend a lot of time designing and updating on this. Postman is one of the best solutions to generate it by simple few clicks.