This API helps you delete the role of a user on a resource.
You should be a resource owner, Administrator or a super user to delete a role. You should also have read privilege on User ID.
The syntax for calling this method is:
DELETE <Base_Url>/resource/{resourceId}/user/{userId}/role
A sample API call is as follows:
DELETE https://123.123.123.123/vCenter-CB/api/resource/10/user/11/role
This API does not take any request XML.
If the operation is successful, the API gets an XML indicates the status of the operation.
A sample response is provided here.
The following table explains the error codes displayed by the API.
Error code |
Description |
VCENTER_COMMON_ERR_INSUFFICIENT_PERMISSION |
User does not have sufficient permissions for performing this operation. |
VCENTER_COMMON_ERR_USER_NOT_AUTHENTICATED |
User is not authenticated to perform this operation. |
VCB_ERR_USER_NOT_FOUND |
No user exists with the given User ID. |
VCB_ERR_RESOURCE_NOT_FOUND |
No resource exists with the given Resource ID. |