Get Users

This API enables you to get a list of users that you are authorized to see in vCenter Chargeback Manager.

User Privileges Required


Syntax

The syntax for calling this method is:

GET <Base_Url>/users

A sample API call is as follows:

GET https://123.123.123.123/vCenter-CB/api/users

Request Type

This API does not take any request XML.

Response Type

If successful, the API, returns an XML that provides the following details.

XPath

Type

Min Occurs

Max Occurs

Description

Users/User

 

 

 

Represents the user element.

Users/User/@id

xs:int

1

1

ID of the user.

Users/User/Name

xs:string

Optional

 

Name of the user.

Users/User/Type

xs:string

1

1

Type of the user. User type can be local, vcuser, ldapgroup or ldapuser.

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

0

1

LDAP server ID in case of LDAP user/group. The LDAP Server ID will be specified only if user type is ldapuser or ldapgroup.

Users/User/VCenterServer/@id

xs:int

0

1

vCenter server user ID in case of vCenter Server user. The vCenter Server ID will be specified only if user type is vcuser.

LdapServers/LdapSever

 

 

 

 

LdapServers/LdapSever/@id

xs:string

0

1

LDAP Server ID

LdapServers/LdapServer/Host

xs:string

1

1

Type of the user. User type can be local, vcuser, ldapgroup or ldapuser.

LdapServers/LdapServer/Port

xs:int

1

1

ID of the user who created this user.

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

LDAP server name

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.

Error Codes

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.