Adds the settings of the LDAP server in vCenter Chargeback Manager.
The syntax for calling this API is:
POST <Base_URL>/ldapServer
A sample API call is as follows:
POST https://123.123.123.123/vCenter-CB/api/ldapServer
You must have the Super User role or the Administrator role.
The request XML for this API can include the parameters described in the following table.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
LdapServers/LdapServer |
|
1 |
1 |
This is the LdapServer element. |
LdapServers/LdapServer/Host |
xs:string |
1 |
1 |
URL with the IP address or the FQDN of the LDAP server. |
LdapServers/LdapServer/Port |
xs:int |
1 |
1 |
Port on which the LDAP Server service is listening. |
LdapServers/LdapServer/ LdapServerName |
xs:string |
1 |
1 |
Name of the LDAP server to be used by an LDAP user logging into vCenter Chargeback Manager. |
LdapServers/LdapServer/UserName |
xs:string |
1 |
1 |
The LDAP account for authentication on the LDAP server |
LdapServers/LdapServer/Password |
xs:string |
1 |
1 |
Password for the user name entered |
LdapServers/LdapServer/LdapServerType/@id |
xs:int |
1 |
1 |
Integer to select type of the LDAP server. Currently the only supported LDAP Server type is Active Directory, for which the ID is 1. |
LdapServers/LdapServer/BaseDn |
xs:string |
0 |
1 |
The distinguished name (DN) of the entity in the LDAP hierarchy from which groups and users can be added to the application. If not sepcified, vCenter Chargeback Manager automatically fetches the root base dn and uses this value. |
LdapServers/LdapServer/Limit |
xs:int |
0 |
1 |
The maximum number of Active Directory users or groups to fetch and display in the Add Users Account screen of the application. The default value of the limit is 500. |
LdapServers/LdapServer/SslEnabled |
xs:boolean |
1 |
1 |
Indicates whether communication with the LDAP Server is done over SSL or not. Valid value can be true or false. |
A sample request XML is provided here.
If the request succeeds, the API adds the LDAP server settings in vCenter Chargeback Manager. The following table provides the information about the response XML.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
LdapServers/LdapServer |
|
1 |
1 |
This is the LdapServer element. |
LdapServers/LdapServer/@id |
xs:int |
1 |
1 |
The LDAP server ID. |
LdapServers/LdapServer/Host |
xs:string |
1 |
1 |
URL with the IP address or the FQDN of the LDAP server. |
LdapServers/LdapServer/Port |
xs:int |
1 |
1 |
Port on which the LDAP Server service is listening. |
LdapServers/LdapServer/BaseDn |
xs:string |
1 |
1 |
The distinguished name (DN) of the entity in the LDAP hierarchy from which groups and users can be added to the application. |
LdapServers/LdapServer/ LdapServerName |
xs:string |
1 |
1 |
Name of the LDAP server used by an LDAP user logging into vCenter Chargeback Manager. |
LdapServers/LdapServer/LdapServerType/@id |
xs:int |
1 |
1 |
Integer to indicate type of the LDAP server. Currently the only supported LDAP Server type is Active Directory for which the ID is 1. |
LdapServers/LdapServer/Limit |
xs:int |
1 |
1 |
The maximum number of Active Directory users or groups retrieved |
LdapServers/LdapServer/SslEnabled |
xs:boolean |
1 |
1 |
Indicates whether communication with the LDAP Server is done over SSL or not. Valid value can be true or false. |
A sample response is provided here.
The following table explains the possible error codes.
Error code |
Description |
VCENTER_COMMON_ERR_INVALID_DATA_LENGTH |
Returned if the LDAP Server URL exceeds 255 characters or if the password exceeds 1024 characters. |
VCB_ERR_LDAP_SERVER_CONNECTION |
Failed to connect to LDAP server |
VCB_ERR_LDAP_SERVER_AUTHENTICATION |
Failed to authenticate with LDAP Server |
VCB_ERR_INVALID_LDAP_BASE_DN |
Returned if the LDAP server base domain name is invalid. |
VCB_ERR_INVALID_LDAP_USER_NAME |
Returned if the LDAP server user name exceeds 255 characters |
VCB_ERR_INVALID_LDAP_TYPE_ID |
Returned if the LDAP type is unsupported (current LDAP type supported is Active Directory) |
VCB_ERR_LDAP_SERVER_EXISTS |
Returned if the LDAP Server is already added to vCenter Chargeback Manager. |
VCB_ERR_UNTRUSTED_SSL_CERTIFICATE |
Returned if the SSL certificate is untrusted. |