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

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…> but it doesn’t work.

@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 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

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

newman run mycollection.json -d data.json

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

Ignore if i misunderstood and please rephrase the description.