Hey @devang-ey
Welcome back to the Community Forum
We had a similar question recently:
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?
Currently, using the UID for the Globals is not possible but you can use the Postman API and the /workspaces/<workspace_id>/global-variables
endpoint to access these from the command line.
1 Like