Octopus Client

I am using octopus.client to retrieve the sensitive type of variables in octopus. We don’t have any ‘space’ in octopus, how to work with default space. When trying to use below

$spaceName = “default”
$space = $repository.Spaces.FindByName($spaceName)
$repositoryForSpace = $client.ForSpace($space)

Getting error-
Exception calling “FindByName” with “1” argument(s): “The document does not define a link for ‘Spaces’” .

Hi @deeksha.agarwl,

Thanks for getting in touch, sorry to hear you’re having issues.

Are you perhaps using a version of Octopus that doesn’t have Spaces?
Spaces were introduced in 2019.1 - more about Spaces here.

If you’re on a version previous to 2019.1, it will be likely that you’d have to remove any reference to ‘Spaces’ from your script.

Please let me know if this helps get you back up and running again or if you require additional assistance - we’re always happy to help!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.