VMware Cloud Community
Shukran
Contributor
Contributor

Unshare vApp with other users using REST API

Hi,

 

Is there a way we can unshare the vApp using API's. Delete verb doesn't work with /vApp/{id}/action/controlAccess.

 

-shukran-

0 Kudos
3 Replies
Macleud
Enthusiast
Enthusiast

Hi.

You need to make almost the same post request as enabling share.

 

<ControlAccessParams
    xmlns="http://www.vmware.com/vcloud/v1.5">
    <IsSharedToEveryone>false</IsSharedToEveryone>
</ControlAccessParams>

 

 

0 Kudos
Shukran
Contributor
Contributor

I am just looking to remove access for one user from the access setting xml list.

I can traverse the list and remove that one object by matching the href that i am looking for.

I was wondering if there is an easier way that i can use.

0 Kudos
Macleud
Enthusiast
Enthusiast

I don't think there is an easier way.
Mapping by Href and deleting a block from xml.

Perhaps there is something more convenient in SDK (terraform, pyvcloud and others).

0 Kudos