This API enables you to retrieve details of a specific vCenter Chargeback Manager user.
The syntax for calling this method is:
GET <Base_Url>/user/{userId}
A sample API call is as follows:
GET https://123.123.123.123/vCenter-CB/api/user/1
This API does not take any request XML.
If the operation is successful, the API gets an XML response with the following details.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
---|---|---|---|---|
Users/User |
|
1 |
1 |
Represents the user element |
Users/User/@id |
xs:string |
1 |
1 |
ID of the user which was added. |
Users/User/Name |
xs:string |
1 |
1 |
Name of the user. |
Users/User/Type |
xs:string |
1 |
1 |
Type of the user. Type can be local, ldapgroup or ldapuser. The LdapServerId should be specified only if user type is ldapuser or ldapgroup. |
Users/User/Role/@id |
xs:int |
1 |
1 |
Role assigned to the user on vCenter Chargeback Manager. |
Users/User/CreatedByUser |
xs:int |
1 |
1 |
ID of the user who created this user. |
Users/User/LdapServer/@id |
xs:int |
1 |
1 |
LDAP server ID in case of LDAP user/group. The LDAP Server ID will be displayed only if user type is ldapuser or ldapgroup. |
Users/User/VCenterServer/@id |
xs:int |
1 |
1 |
vCenter server user ID that the user belongs to. The vCenter Server ID will be displayed only if the user type is vcuser. |
LdapServers/LdapSever |
|
|
|
|
LdapServers/LdapSever/@id |
xs:int |
0 |
1 |
LDAP server ID |
LdapServers/LdapServer/Host |
xs:string |
1 |
1 |
LDAP server URL |
LdapServers/LdapServer/Port |
xs:int |
1 |
1 |
LDAP server port |
LdapServers/LdapServer/BaseDn |
xs:string |
1 |
1 |
LDAP server base DN |
LdapServers/LdapServer/LdapServerName |
xs:string |
1 |
1 |
LDAP server name |
LdapServers/LdapServer/LdapServerType |
|
|
|
|
LdapServers/LdapServer/LdapServerType/@id |
xs:int |
1 |
1 |
LDAP server type. |
LdapServers/LdapServer/LdapServerType/Name |
xs:string |
1 |
1 |
Name of the LDAP server type. |
LdapServers/LdapServer/Limit |
xs:int |
1 |
1 |
LDAP server limit |
VCenterServers/VCenterServer |
|
|
|
|
VCenterServers/VCenterServer/@id |
xs:int |
0 |
1 |
vCenter Server ID |
VCenterServers/VCenterServer/Url |
xs:string |
1 |
1 |
vCenter Server URL |
VCenterServers/VCenterServer/Name |
xs:string |
1 |
1 |
vCenter Server name |
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 the required permissions to perform 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. |