Keep Calm and convert Swagger APIs to Postman Collections

Swagger UI works a little differently in every tool, and logins and request bodies get lost between sessions. Import the Swagger JSON link into Postman to get an organized collection, and keep your credentials out of the cloud.

In this article

What is Swagger?

If you are here, you probably already know what a piece of beauty Swagger is. But let me brief it again. Swagger (now known as the OpenAPI Specification) is an interface description language for describing RESTful APIs, written in JSON or YAML. It comes with a set of open-source tools to design, build, document and use RESTful web services. Swagger includes automated documentation, code generation and test-case generation. Seems like all good stuff.

While Swagger contains multiple tools to design, create and set up RESTful services for an application, today I’m interested in Swagger UI.

Swagger UI lets you visualize and interact with an API’s resources without any of the implementation logic in place. In short, it gives users a portal to interact with REST APIs directly.

Sample Swagger UI for a test application
A sample Swagger UI for a test application

Why move to Postman?

As a VMware cloud developer, I know Swagger UI very well, as VMware uses the Swagger framework extensively across its applications and tools. However, the reason I’m writing this article is the annoyance caused by the variations of this framework across those tools. Over time, I realized that Swagger UI isn’t implemented consistently: the way you log in, or the way you interact with the APIs, differs from one tool to the next. This really gets on my nerves when I try to fetch something from a tool, only to find that I’m not authorized to call a service, or that my request body isn’t good enough to get a useful response, because I forgot the sequence of steps that makes it work. All I get are 401, 403 or 501 errors and what not. Sometimes, even finding the URL to open Swagger UI is cumbersome.

So if you’re facing a similar issue, or just want consistency and to pick up where you left off, I’d suggest converting these Swagger UIs to Postman collections. Postman not only saves your progress & credentials but also lets you save examples that remind you what you did last time.

Frankly, it saves me a lot of time.

Convert Swagger UI to a Postman collection

Let’s take the example of a backup application, Veritas NetBackup Self Service (NSS). Follow these steps to convert:

  • Open the Swagger UI portal

https://<nss_fqdn>/NetBackupSelfServiceNetBackupPanels/api/help/index

Swagger UI portal for Veritas NSS
  • Copy the link from which the Swagger UI is fetching its resources. This link is almost always mentioned on the Swagger UI page itself.
  • Open that link to validate it. You should see a large JSON document in your browser.

https://<nss_fqdn>/NetBackupSelfServiceNetBackupPanels/api/docs/v6

Swagger JSON definition opened in the browser
  • Open the Postman app or web app, go to your workspace and click Import.
Import button in a Postman workspace
  • Select Link and paste the link you validated earlier.
Import from link dialog in Postman
  • If the link is correct, you’ll see something like this.
Postman showing the API definition detected from the Swagger link
  • Click Submit and your import is complete. You can close this dialog box now.
Postman confirming the import is complete

When the import is complete, all the REST calls are at your disposal, just like in Swagger UI, but much more organized, with all the documentation and examples already imported. That’s so cool.

Imported NSS API collection in Postman

You can play with the options Postman provides when importing from a link and set them to suit you.

Keep your credentials safe

Important note: Postman can sync your environment credentials to its servers. Postman states that this data is encrypted (source: postman.com: depending on its sensitivity classification, customer data at rest is also AES-256-GCM encrypted on the server side before storage). However, if you or your organization need to prevent your data from syncing to the Postman cloud for compliance reasons, you can use Postman without signing in to an account and manually back up your data locally.

Postman indicates the sync state of your workspace. The flow diagram for sync states is shown below:

Flow diagram of Postman workspace sync states

If you are not signed in to Postman, you see the state as Offline.

Or, if you really have to sign in to Postman, I’d suggest putting your confidential data in the CURRENT VALUE field and not in INITIAL VALUE, as Postman clearly says current values never get synced.

Postman environment showing the initial and current value columns

That’s all for this article. Thanks for reading. See you in my other articles.

Update (Nov 2026)

Postman’s sync behaviour has changed since this post was written. For credentials and tokens, use Postman Vault, which stores secrets locally and is a better option than staying signed out.


Discover more from Cloud Blogger

Subscribe to get the latest posts sent to your email.

Enjoyed this post?

Was this helpful?

Leave a Reply