Create tenant - spaces

Hello,
I am trying to create a tenant programmatically using the Octopus.client.dll.
I have issue obtaining the repository for a particular “space” using PS.
Basically the script I have, it works but create the tenant on the default instance and not in the right “space”.

Can I have some code examples, please?
Most of the documentation on the GitHub page is before the introduction of the Spaces.

Thank you for your support.
Regards.
L.

Hi @Lucio_Falco1

Thanks for reaching out on this, it is a good question and there are clearly some legacy examples for us to update over time. Apologies that we haven’t caught up with it all just yet.

We did add this linqpad example though, that might help: https://github.com/OctopusDeploy/OctopusDeploy-Api/blob/master/Octopus.Client/LINQPad/WorkInADifferentSpace.linq

It shows how to setup a repository for a particular space, using the ForSpace method on the repository instance.

Let me know if that gets you going!

Kind regards,
Jim

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