This API enables you to list details of all the computing resources available in vCenter Chargeback Manager.
The syntax for calling this method is:
GET <Base_Url>/computingResources
A sample API call is as follows:
GET https://123.123.123.123/vCenter-CB/api/computingResources
None.
This API does not require any request parameters.
The API, on successful execution, returns the details of all computing resources.
XPath |
Type |
Min Occurs |
Max occurs |
Description |
---|---|---|---|---|
ComputingResources/ComputingResource |
|
0 |
1 |
Computing resource. |
ComputingResources/ComputingResource/@Id |
xs:long |
1 |
1 |
ID of the computing resource. |
ComputingResources/ComputingResource/Name |
xs:string |
1 |
1 |
Name of the computing resource. |
ComputingResources/ComputingResource/Description |
xs:string |
1 |
1 |
Description of the computing resource. |
ComputingResources/ComputingResource/Unit |
xs:string |
1 |
1 |
Unit in which the computer resource is measured. |
ComputingResources/ComputingResource/Enabled |
xs:boolean |
0 |
1 |
Specifies whether the computing resource is enabled in vCenter Chargeback Manager. |
ComputingResources/ComputingResource/RollUpType |
xs:string |
0 |
1 |
Based on this field, vCenter Chargeback Manager decides the computation method for the computing resource. In this release, this is not a user modifiable parameter. Possible values are: Average and empty(computation is based upon Timed Average of usage); Sum(Computation is based upon summation of usage) |
ComputingResources/ComputingResource/ConversionFactor |
xs:double |
0 |
1 |
Specifies the conversion factor for the data collected for a particular computing resource. Default value of 1.0 is used in case no conversion factor is explicitly specified. |
ComputingResources/ComputingResource/Attributes/Attribute |
1 |
unbounded |
Attributes for the computing resource. |
|
ComputingResources/ComputingResource/Attributes/Attribute/Name |
xs:string |
1 |
1 |
Name of the attribute for the computing resource. |
A sample response is provided here.
The following table explains the error codes displayed by the API.
Error Code |
Description |
VCB_ERR_INVALID_COMPUTING_RESOURCE_ID |
The computing resource with the given id does not exist. |