Adding multiple projects to existing tenant

Hi Team,
I am in need to add multiple projects to existing tenant in my octopus account. I have tried through API’s using swagger. Projects are getting added correctly but the issue is, its removing already added projects and keeping the new ones only which I have provided in my JSON data.
Eg, I have a tenant say TestTennant and have mulitple projects as TestProj1, TestProj2, TestProj3,TestProj4,TestProj5

I have added TestProj1 and TestProj2 through UI and wanted to add remaining 3 in one go.

I have used http://{octoUrl}/swaggerui/index.html#/Tenants/updateTenant.
When I provide all remaining 3 projects in JSON data, then these all 3 getting added to the tenant but the previously added projects i.e… TestProj1 & TestProj2 are getting removed.

I want result such a way that existing added should remain and new one’s should be added.
Help on this issue is much appreciated.

Hi @x-rahul.marathe ,

Thanks for getting in touch!

The only way to do this via the API would be to first retrieve the current list of projects assigned to that Tenant and then combine the new Projects with the current Projects in the JSON body.

Then you can apply the new JSON with both current and new projects included.


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