Add Project to /api/environments endpoint

Hey

When I query the /api/environments endpoint I would like a way to identify which project it belongs to without doing another request. Preferably project name so I can do a grep.
Or ideally filter by project with a query string.

Thanks

Antony

Hi Antony,

Projects and environments don’t actually have a relationship with each
other. A project can be deployed into an environment, but an environment
can have deployments for any project.

What are you trying to do with the list of environments?

Regards,

Paul Stovell
Octopus Deploy
W: octopusdeploy.com | T: @octopusdeploy http://twitter.com/octopusdeploy

This is what I have at the moment

Basically when I get the environments I want to make sure it’s only for the project I’m interested in. At the moment I’m relying on convention.

Failing that I guess we could use most-recent-deployment for the project and grab all the environments pertinent to that project from there.

Some background:
basically I want to automate the following scenario

Staging Master - v2

promote v2 to all other staging environments:
Staging Customer 1, Staging Customer 2, Staging Customer 3 etc

in one hit.
Thanks

Hi Antony,

Do you use project groups? A project group can be limited to certain environments. So you could use:

The project group has an array of environment ID’s. If the array is empty, projects in the group can use any environment. But if it has one or more values, then the project can only be deployed to those environments.

Hope that helps,

Paul