This API enables you to log in to vCenter Chargeback Manager.
None
The syntax for calling this API is:
POST <Base_URL>/login
A sample API call is as follows:
POST https://123.123.123.123/vCenter-CB/api/login
Name |
Data Type |
Required/Optional |
Description |
Sample Value |
---|---|---|---|---|
version |
String |
Required |
The API version that the client wants to call. |
1.5.0 |
The API takes a request XML that includes the following body parameters.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
---|---|---|---|---|
Users/User |
|
1 |
1 |
The User element. |
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. If a string other than local, ldpapgroup, or ldapuser is specified, then by default, local will be selected. |
Users/User/Name |
xs:string |
1 |
1 |
Name of the user. |
Users/User/Password |
xs:string |
1 |
1 |
Password for the user. |
Users/User/CaptchaId |
xs:string |
0 |
1 |
The ID of the Captcha image . |
Users/User/CaptchaText |
xs:string |
0 |
1 |
The text entered by the user for the Captach image. |
Users/User/LdapServer/@id |
xs:int |
0 |
1 |
LDAP Server ID of the user. Mandatory field while adding ldapuser or ldapgroup. |
LdapServers/LdapServer |
|
|
|
|
LdapServers/LdapServer/LdapServerName |
xs:string |
0 |
1 |
Name of the LDAP server. The LDAP Server ID or the LDAP Server name must be specified to log in to an LDAP server. |
A sample request XML is provided here.
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 |
This is the user element. |
Users/User/IsAuthenticated |
xs:boolean |
1 |
1 |
Indicates if the user is authenticated. |
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 the user type is ldapuser or ldapgroup. |
Users/User/Name |
xs:string |
1 |
1 |
Name of the user. |
Users/User/LdapServer/@id |
xs:int |
0 |
1 |
LDAP Server ID of the user who will log in. Either the LdapServerId or the LdapServerName must be specified to log in to the LDAP server. |
Users/User/vCenterServer/@id |
xs:int |
0 |
1 |
vCenter Server ID of the user who will log in. |
Users/User/Role/@id |
xs:int |
0 |
1 |
Role assigned to the user on the vCenter Chargeback Manager. |
ResourceTypes/ResourceType |
|
|
|
Represents the resource. |
ResourceTypes/ResourceType/@id |
xs:int |
1 |
1 |
ID of the resource. |
ResourceTypes/ResourceType/Name |
xs:string |
1 |
1 |
Name of the resource. |
ResourceTypes/ResourceType/Description |
xs:string |
1 |
1 |
Description of the resource. |
A sample response is provided here.
The following table describes the errors displayed by the API.
Error Code |
Description |
---|---|
VCENTER_COMMON_ERR_INVALID_INPUT_XML |
The request XML is not in the expected format. |
VCENTER_RBAC_USER_ACCOUNT_LOCKED |
The vCenter Server user account is locked. |
VCB_ERR_LDAP_SERVER_NOT_FOUND |
No LDAP server with the given LDAP server ID exists. |