Skip to main content

Support for Collection Variables Added In Postman Exporters

· One min read

Our Postman exporters (both versions 1.0 and 2.0) now support collection variables to better represent requests in cases where multiple servers are involved.

Details

Postman supports various types of variables one of which are the collection variables whose scope is limited to a particular collection only.

Various API description formats these days support multiple servers (for production or sandbox) e.g. OpenAPI 3.0. In order to represent multiple servers in Postman, variables can be made use of in the request URLs as follows:

{{server}}/example/email

The variable server can then be assigned any value like http://example.com/production or http://example.com/sandbox.

Ideally, environment variables should be used to represent this information but that requires export of environment files along with a Postman collection file. Sicne our tool currently only supports a single-file output so we have decided to make use of collection variables instead. We might move towards supporting environment files as well in the future.

To edit collection variables, please make use of the collection editor as defined here.