Using Octopus.Client to List all variables, values and Scope within one Variable Set

Hi Octopus team,

Is there a way to list a variable set’s variables, values and Scope by using Octopus.Client?
Would be appreciated if you can show me the powershell scripts for it.



Hi Jian,

Thanks for getting in touch! Yes there is a way, you can do this via the Octopus Deploy API. While we don’t have any pre-made PowerShell scripts for exactly this using Octopus.Client, we do have one which is mostly what you are after, using REST.

If you would like to use the REST API option.

However, I would be happy to create one for Octopus.Client in the morning. In the mean time, I can provide you with some links with some similar examples and documentation to our API if you would like to try this yourself.

Below are some example scripts of using Octopus.Client & the API to interact with variables in Octopus.

I can also provide you with the link to our API wiki which has some information that will help you out here.

Again, I’m more than happy to write this up in the morning(AEST) if you need a hand here.

Best regards,

Thanks Daniel,

I will take a look on the Rest API.

Hi Jian,

Great, Let me know if you run into any issues.

Best regards,