With Postman, environment variables are defined within three different scopes:
Global: Variables in this scope are accessible globally in Postman.Environment: The variables' value in the scope depends on the selected environment.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
Collectionvariable. If you're usingEnvironmentscoped variables, you have to export those variables in a separate JSON file.
Postman really stuffed up this feature, and the only way to achieve this is through the following twisted steps:
- Click on the
eyeicon next to the environment select box on the top right corner. - Click the freaking minuscule
editbutton in the top right corner. - Click the
Cancelbutton (of course god damnit! That's definitely the button I would think clicking for an export). - Click in
downloadicon next to your environment.