This API retrieves details of the vCenter Server that has the identifier vCenterServerId, if the specified vCenter Server was added but not deleted from the vCenter Chargeback Manager. The vCenterServerId comes from the XML response of the Add vCenter Server API.
The syntax for calling this API is:
GET <Base_URL>/vCenterServer/{vCenterServerId}
A sample API call is as follows:
GET https://123.123.123.123/vCenter-CB/api/vCenterServer/99
You must have a role with the Read privilege on the vCenter Server you want to get.
This API call does not take any input parameters.
If the request succeeds, the API returns XML with details of the specified vCenter Server.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
VCenterServers/VCenterServer |
|
1 |
1 |
This is the vCenter Server element. |
VCenterServers/VCenterServer/@id |
xs:int |
1 |
1 |
The vCenter Server identifier. This ID will be the same as the vCenterServer Id specified in the API URL. |
VCenterServers/VCenterServer/Url |
xs:string |
1 |
1 |
URL with IP address (or host name) and port number of the vCenter Server. |
VCenterServers/VCenterServer/LastSynchronizationTime |
xs:long |
1 |
1 |
Long integer identifying the time of last synchronization. A value of 0 indicates that the vCenter Server is not synchronized with the vCenter Chargeback Manager. |
VCenterServers/VCenterServer/Name |
xs:string |
1 |
1 |
Short name for the vCenter Server. |
VCenterServers/VCenterServer/Description |
xs:string |
0 |
1 |
A description of the vCenter Server. |
VCenterServers/VCenterServer/UserName |
xs:string |
1 |
1 |
Login name of the user with which the vCenter Server is added to vCenter Chargeback Manager. |
VCenterServers/VCenterServer/PluginRegistered |
xs:boolean |
1 |
1 |
Whether the vCenter Chargeback Manager is registered as a plugin to this vCenter Server. |
VCenterServers/VCenterServer/StatsSync |
xs:boolean |
1 |
1 |
Whether statistics from the vCenter Server database are replicated in the vCenter Chargeback Manager database. |
VCenterServers/VCenterServer/DataSourceUrl |
xs:string |
1 |
1 |
URL with IP address (or host name) of the vCenter Server database. |
VCenterServers/VCenterServer/DataSourceName |
xs:string |
1 |
1 |
Name of the vCenter Server database. |
VCenterServers/VCenterServer/DataSourceUserName |
xs:string |
1 |
1 |
Login name of the user to authenticate with the vCenter Server database. |
VCenterServers/VCenterServer/DataSourceAuthType/@id |
xs:int |
1 |
1 |
ID of the authorization type of the vCenter Server database. |
VCenterServers/VCenterServer/DataSourceAuthType/Name |
xs:string |
1 |
1 |
Name of the authorization type of the vCenter Server database. |
VCenterServers/VCenterServer/DataSourceType/@id |
xs:int |
1 |
1 |
Integer identifying the type of the vCenter Server database. |
VCenterServers/VCenterServer/DataSourceType/Name |
xs:string |
1 |
1 |
Name of the data source type. |
VCenterServers/VCenterServer/Version |
xs:string |
1 |
1 |
Version of vCenter Server. |
A sample response is provided here.
The following table explains the possible error codes.
Error code |
Description |
VCB_ERR_INVALID_VC_ID |
Returned if the vCenter Server id is invalid |