# Do I need to connect environment to the collection in newman v 3.9.3?

**URL:** <https://community.postman.com/t/do-i-need-to-connect-environment-to-the-collection-in-newman-v-3-9-3/1448>\
**Category:** Help Hub\
**Tags:** newman-project, environments, collections\
**Created:** [April 18, 2018, 4:39pm UTC](https://community.postman.com/t/do-i-need-to-connect-environment-to-the-collection-in-newman-v-3-9-3/1448 "2018-04-18T16:39:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![o.haistruk](https://avatars.discourse-cdn.com/v4/letter/o/da6949/32.png) [@o.haistruk](https://community.postman.com/u/o.haistruk)\
**Post date:** [April 18, 2018, 4:39pm UTC](https://community.postman.com/t/do-i-need-to-connect-environment-to-the-collection-in-newman-v-3-9-3/1448/1 "2018-04-18T16:39:14Z")

</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).

I sav that collection run in newman works correctly without connecting specific environment to that collection.  
But do I need to connect the environment in general? and if yes, the how to do it? I tried to use the -e \<url from [https://web.postman.co/environments](https://web.postman.co/environments)…\> but it doesn’t work.

---

<div class="post-metadata">

**Author:** ![kunagpal](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kunagpal/32/9_2.png) [@kunagpal](https://community.postman.com/u/kunagpal)\
**Post date:** [April 18, 2018, 4:47pm UTC](https://community.postman.com/t/do-i-need-to-connect-environment-to-the-collection-in-newman-v-3-9-3/1448/2 "2018-04-18T16:47:59Z")

</div>

@o.haistruk There isn’t a concept of ‘connecting’ environments to collections, as environments can be used with multiple collections. As for your original question, [web.postman.co](http://web.postman.co) does not serve environments in a format that Newman can understand, you’ll have to use the Postman API to achieve this, as has been documented here: [https://github.com/postmanlabs/newman#using-newman-with-the-postman-api](https://github.com/postmanlabs/newman#using-newman-with-the-postman-api)

---

<div class="post-metadata">

**Author:** ![amjathk](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@amjathk](https://community.postman.com/u/amjathk)\
**Post date:** [April 23, 2018, 5:42pm UTC](https://community.postman.com/t/do-i-need-to-connect-environment-to-the-collection-in-newman-v-3-9-3/1448/3 "2018-04-23T17:42:49Z")

</div>

If I am understand correctly. You are asking whether we can run postman collection in newman 3.9.3 with an environment file. yes we can do it. ref this link

[https://www.getpostman.com/docs/v6/postman/collection\_runs/command\_line\_integration\_with\_newman](https://www.getpostman.com/docs/v6/postman/collection_runs/command_line_integration_with_newman)

# newman run mycollection.json -d data.json

mycollection.json = collection file  
data.json = environment file

Ignore if i misunderstood and please rephrase the description.
