I have been given a task to identify how many machines are used in octopus as Deployment target in respect to all Projects.
Suppose we have 3 Projects : Project-A, Project-B and Project-C
All three projects have 3 environments : Dev, QA, PROD
Each Environment of a project has deployment machines : Server 1, Server 2 and Server 3 (total 9 Machines)
I want to extract this data so that we can identify how many machines are been used in Dev environment under Project A
Currently we have almost 1100 deployment targets and more than 50 environments
Thanks for following up! I can’t see the reason why a 404 would be thrown at that point, unfortunately, as it looks to simply be in the foreach loop making a request to the current project. You can test it against the https://samples.octopus.app cloud instance using the api key API-GUEST, and that seemed to have run as expected in my identical test. Does that work for you?