Get Fixed Cost Values

This API enables you to get the values of a fixed cost.

Syntax

The syntax for calling this method is:

GET <Base_Url>/fixedCost/{fixedCostId}/values

A sample API call is as follows:

GET https://123.123.123.123/vCenter-CB/api/fixedCost/9/values

User Privilege

You must have a role with Read privilege on the fixed cost.

URL Parameters

Name

Data Type

Required/Optional

Description

Sample Value

startTime

Long

Required

Start time (in milliseconds; from January 1, 1970 GMT 00:00) of the time period for which the fixed costs are to be retrieved.

1232562600000

endTime

Long

Optional

End time (in milliseconds; from January 1, 1970 GMT 00:00) of the time period for which the fixed cost values are to be retrieved.  If this is not specified, the API returns all fixed cost values from the specified start time. If specified, this parameter must be specified as later than the start-time.

1232649000000

API Response

The API returns the following details of the fixed costs.

XPath

Type

Min Occurs

Max Occurs

Description

FixedCosts/FixedCost

1

1

Represents the fixed cost for which the API has retrieved the values.

FixedCosts/FixedCost/@id

xs:int

1

1

ID of the fixed cost.

FixedCosts/FixedCost/Name

xs:string

1

1

Name of the fixed cost.

FixedCosts/FixedCost/Description

xs:string

1

1

A brief description of the fixed cost.

FixedCosts/FixedCost/Values/Value

 

1

1

Represents the value of the fixed cost.

FixedCosts/FixedCost/Values/Value/Cost

xs:double

1

1

The value of the fixed cost.

FixedCosts/FixedCost/Values/Value/Duration

xs:int

1

1

The duration for which a fixed cost will be applied on an entity.

FixedCosts/FixedCost/Values/Value/StartTime

xs:long

1

1

The start time of a duration for which a fixed cost will be applied on an entity.

FixedCosts/FixedCost/Values/Value/EndTime

xs:long

1

1

The end time of a duration for which a fixed cost will be applied on an entity.

A sample response is provided here.

Error Response

The following table explains the error codes displayed by the API.

Error Code

Description

VCB_ERR_INVALID_FIXED_COST_ID

Fixed cost ID is invalid.

VCB_ERR_INVALID_TIME_PERIOD

Start-date is not specified or it is specified after the end-date.