# Global url for Environment Json

**URL:** <https://community.postman.com/t/global-url-for-environment-json/17210>\
**Category:** Help Hub\
**Tags:** newman-project\
**Created:** [October 28, 2020, 9:58pm UTC](https://community.postman.com/t/global-url-for-environment-json/17210 "2020-10-28T21:58:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkataramanb](https://avatars.discourse-cdn.com/v4/letter/v/b2d939/32.png) [@venkataramanb](https://community.postman.com/u/venkataramanb)\
**Post date:** [October 28, 2020, 9:58pm UTC](https://community.postman.com/t/global-url-for-environment-json/17210/1 "2020-10-28T21:58:48Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hi, I am trying to run my collections via command line using newman. I got the public url for my collection. But I don’t know how to get the global url for the environment json. Can someone help me with that.

Thanks,  
Bhuvana

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [October 29, 2020, 6:58am UTC](https://community.postman.com/t/global-url-for-environment-json/17210/2 "2020-10-29T06:58:53Z")

</div>

@venkataramanb:

Hi Bhuvana,

Welcome to community 👏

Based on your question, I understand that you have saved your URL as global variable, and need to pass that file in your newman command?

If so, please download the global file and pass that as input to your command (-g globalenvtfile.json). Else you are looking something for global variable, please refer the below post:

> [@How to pass argument or value while running collection from newman](https://community.postman.com/t/how-to-pass-argument-or-value-while-running-collection-from-newman/7417/8):
>
> Ah-ha, I fell for the forum’s copy-and-paste bug myself. Was puzzling over why it wasn’t working, only to discover that I had been using the invalid curly-quotes from earlier examples. Once I literally straightened them out, it worked! Bad: –global-var “k=v” ; // bad em-dash & curly-quotes Good: --env-var "ev=5999222 ; // good double-minus & straight-quotes" References: [issue 764](https://github.com/postmanlabs/newman/issues/764) --global-var option added on Aug 22, 2017 [issue 1799](https://github.com/postmanlabs/newman/issues/1799) --env-var option added in Newman v4.4.0.

Still having issues? Please share us more details.

Just one thing, when you are about to post your queries, kindly drop in under two categories:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/f/0/f0428780b8bf32967a33fa6c2a2728931284e928.png)

---

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [October 29, 2020, 11:46am UTC](https://community.postman.com/t/global-url-for-environment-json/17210/3 "2020-10-29T11:46:49Z")

</div>

Hey @venkataramanb, welcome!

You can do this by using the postman API. [Documentation for getting an API Key](https://learning.postman.com/docs/developer/intro-api/)

After you get your API key, you can pass the following command to newman:

```auto
newman run https://api.getpostman.com/collections/<collectionId>?apikey=<apiKey> --environment https://api.getpostman.com/environments/<environmentId>?apikey=<apiKey>

```

Just replace the angle brackets with the values for your collection, environment, and api key.
