Postman CLI pass in Global Variables

The Postman API has recently released a new endpoint to read and update the Global Variables in a Workspace.

For usage on the Postman CLI, you could use that URL in the command to access the globals:

postman collection run {{collection_uuid}} -g "https://api.getpostman.com/workspaces/{{workspace_id}}/global-variables?apikey={{postman_api_key}}"

The scope of the variable used should be the correct one for the context. Is a global scoped variable, the most appropriate for your context?

1 Like