This API enables you to remove an existing user from vCenter Chargeback Manager. As a superuser, you can delete any user other than system users. As an administrator, you can delete only those users that you have created.
You cannot delete a system user with the ID 1 .
You must be the creator of the user or have the Super User role.
The syntax for calling this method is:
DELETE <Base_Url>/user/{userId}
A sample API call is as follows:
DELETE https://123.123.123.123/vCenter-CB/api/user/2
The API takes a request XML that captures the following body parameters. A request XML is not required for normal users and for the deleted administrator or superuser that does not have child entities.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
---|---|---|---|---|
Users/User |
|
1 |
1 |
This is the User element |
Users/User/@id |
xs:int |
1 |
1 |
ID of the administrator or superuser to whom the child entities of the deleted administrator or the super user needs to be reassigned. |
The API returns an XML that indicates the status of the operation.
The following table explains the error codes displayed by the API.
Error Code |
Description |
---|---|
VCB_ERR_RBAC_DELETE_NOT_PERMITTED |
User does not have the required permissions to perform this operation. |
VCENTER_COMMON_ERR_USER_NOT_AUTHENTICATED |
User has not authenticated with vCenter Chargeback Manager. |
VCB_ERR_USER__NOT_FOUND |
No user exists with the given user ID. |
VCB_ERR_ALTER_SUPERUSER |
The user with the given user ID is a system user. |