I’m curious how to go about generating a report capturing the variable values for a specific project, environment and tenant. I’ve been exploring the rest api via swaggerui and looking into the Octopus Client powershell library as well. Does anyone have a code sample or know of which rest calls I can use to accomplish this?
I don’t think we have an exact script for this, but one that could be a good base is this one:
It doesn’t include filtering for Tenants though, so, would need some additional work to reach what you need.
Another good resource to use when scripting on the REST API is the developer tools within your browser. All of the actions that you can take within the Octopus UI are accomplished using the REST API, so, you can often check the requests being made as you perform an action to get a good idea for what your script will need.
So, checking out the request made when using the Preview option within Project > Variables could help.