@eloyucu Sorry if I misunderstood your question, did you mean the Docs link for globals?
If yes then here: https://www.getpostman.com/docs/v6/postman/environments_and_globals/manage_globals
Or if you've some other issue in using the globals, can you elaborate more?
Possibly record a video / GIF and share your OS details & your Postman App version.
No I mean... I have a workspace with its own set of global variables, to use them on newman I have to save them as a json file, and everytime I want to change something on those variables I need to download again, overwrite the old json file, commit and push.
On this repo I have seen this:
-g , --globals
Specify the file path or URL for global variables. Global variables are similar to environment variables but have a lower precedence and can be overridden by environment variables having the same name.
So I want to use the url instead the path for the json file. Or... does the URL means that you have to host the globals json file and use your own URL??
However, Global environment can't be fetched via API yet.
For now, you should either fetch the variables using the environment variables and use the API endpoint to avoid modifying the exported file everytime or,
Use the --global-var option to pass a global variable.
However, Global environment can't be fetched via API yet.
For now, you should either fetch the variables using the environment variables and use the API endpoint to avoid modifying the exported file everytime or,
Use the --global-var option to pass a global variable.
Is it possible to pass in global variables in the newman.run(option) object
Sorry, but I'm trying to at global variables via the newman command-line:
newman.run({})
but they are not picked-up during running. Where can I find more instructions to use this construction? Do I need to add something inside the collection?
I would like to use a global IIFE javascript class across multiple collections in a workspace. The common logic makes most sense to put into global variables in the workspace which can then be used via let commonScripts = eval(pm.globals.get('scriptname')); This works fine when I use Runner, but does not when i use the newman npm package. When I use the npm package to run newman I pass in the collection url and the environment url to run some of my tests, but without the globals I would have to add this to every single environment. This is not feasible due to the number of collections and how often they would need to be updated. I would be extremely greatful as well as other people who use postman if there were a globals url in the api.
Any progress on this? I've run into the same issue where I'd really like to reference the global variables via URL. We want to implement the global variable via URL thing because it keeps up synchronizing with the collection.
While collections and environments are live, you manually have to download and pass global variables json file which is a pain. This would be a super useful feature to have.