This API enables you to retrieve vService costs set for a cost model.
The syntax for calling this method is:
GET <Base_Url>/costModel/{costModelId}/vServices
A sample API call is as follows:
GET https://123.123.123.123/vCenter-CB/api/costModel/20/vServices
You must have Read privilege on the cost model.
Name |
Data Type |
Required/Optional |
Description |
Sample Value |
startTime |
Long |
Required |
Start-time (in milliseconds; from January 1, 1970 GMT 00:00) for the time period for which the fixed costs are to be modified. |
1232562600000 |
endTime |
Long |
Optional |
End-time (in milliseconds; from January 1, 1970 GMT 00:00) for the time period for which the fixed costs are to be modified. If this is not specified, the API modifies all the fixed costs specified in the request XML. If specified, this parameter must not fall before start-time. |
1232649000000 |
This API does not need a request XML.
The API returns a response XML that includes the following parameters.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
VServices/VService |
1 |
unbounded |
Represents the vService. |
|
VServices/VService/Name |
xs:string |
1 |
1 |
Name of the vService |
VServices/VService/FixedCosts/FixedCost |
1 |
1 |
Represents the fixed cost applied to the vService. |
|
VServices/VService/FixedCosts/FixedCost/@id |
xs:int |
1 |
1 |
ID of the fixed cost applied to the vService. |
VServices/VService/FixedCosts/FixedCost/Name |
xs:string |
1 |
1 |
Name of the fixed cost. |
VServices/VService/FixedCosts/FixedCost/Description |
xs:string |
1 |
1 |
Description of the fixed cost. |
VServices/VService/FixedCosts/FixedCost/Type |
1 |
1 |
Represents the fixed cost type. |
|
VServices/VService/FixedCosts/FixedCost/Type/@id |
xs:int |
1 |
1 |
Type of fixed cost. |
VServices/VService/FixedCosts/FixedCost/Type/Name |
xs:string |
1 |
1 |
Name of the type of fixed cost: One time or recurring. |
VServices/VService/FixedCosts/FixedCost/Currency |
1 |
1 |
Represents the currency of the fixed cost. |
|
VServices/VService/FixedCosts/FixedCost/Currency/@id |
xs:int |
1 |
1 |
ID of the currency of the fixed cost. |
VServices/VService/FixedCosts/FixedCost/Currency/Name |
xs:string |
1 |
1 |
Name of the currency of the fixed cost. |
VServices/VService/FixedCosts/FixedCost/Values |
1 |
1 |
|
|
VServices/VService/FixedCosts/FixedCost/Values/Value |
0 |
unbounded |
Represents the values of the fixed cost. |
|
VServices/VService/FixedCosts/FixedCost/Values/Value/Cost |
xs:double |
1 |
1 |
Value of the fixed cost. |
VServices/VService/FixedCosts/FixedCost/Values/Value/Duration |
|
1 |
1 |
Represents the duration for which this fixed cost value will be effective. |
VServices/VService/FixedCosts/FixedCost/Values/Value/Duration/@id |
xs:int |
1 |
1 |
Duration for which this fixed cost value will be effective. |
VServices/VService/FixedCosts/FixedCost/Values/Value/Duration/Name |
xs:string |
1 |
1 |
Duration for which this fixed cost value will be effective. |
VServices/VService/FixedCosts/FixedCost/Values/Value/StartTime |
xs:long |
1 |
1 |
Start time of a duration for which a specific fixed cost value was effective. |
VServices/VService/FixedCosts/FixedCost/Values/Value/EndTime |
xs:long |
1 |
1 |
End time of a duration for which a specific fixed cost value was effective. If not specified, the value will be effective without an end time. |
A sample response is provided here.
The following table explains the error codes displayed by the API.
Error Code |
Description |
VCB_ERR_INVALID_COST_MODEL_ID |
The specified cost model ID is invalid. |
VCB_ERR_INVALID_FIXED_COST_ID |
The specified fixed cost ID is invalid. |