Skip to content

Instantly share code, notes, and snippets.

@nicolasdao
Last active May 2, 2024 02:13
Show Gist options
  • Save nicolasdao/8cd1d5f01fd21fbcf2bae1b108d6d593 to your computer and use it in GitHub Desktop.
Save nicolasdao/8cd1d5f01fd21fbcf2bae1b108d6d593 to your computer and use it in GitHub Desktop.
Postman guide. Keywords: postman web api rest

POSTMAN GUIDE

Table of contents

Environment variables

With Postman, environment variables are defined within three different scopes:

  1. Global: Variables in this scope are accessible globally in Postman.
  2. Environment: The variables' value in the scope depends on the selected environment.
  3. Collection: The variable is embedded in the collection itself. Any API defined in the collection can access that value.

If you need to export your collection with its variables, the only option is to use Collection variable. If you're using Environment scoped variables, you have to export those variables in a separate JSON file.

FAQ

How to export an environment and its environment variables?

Postman really stuffed up this feature, and the only way to achieve this is through the following twisted steps:

  1. Click on the eye icon next to the environment select box on the top right corner.
  2. Click the freaking minuscule edit button in the top right corner.
  3. Click the Cancel button (of course god damnit! That's definitely the button I would think clicking for an export).
  4. Click in download icon next to your environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment