Get Fixed Cost

This API enables you to get details of a fixed cost.

Syntax

The syntax for calling this method is:

GET <Base_Url>/fixedCost/{fixedCostId}

A sample API call is as follows:

GET https://123.123.123.123/vCenter-CB/api/fixedCost/20

User Privilege

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

Request Body Parameters

This API does not need any request parameters.

API Response

The API returns a response XML that provides the following details.

XPath

Type

Min Occurs

Max Occurs

Description

FixedCosts/FixedCost

1

1

Represents the fixed cost.

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

An optional description of the fixed cost.

FixedCosts/FixedCost/Currency

1

1

Represents the currency set for this fixed cost.

FixedCosts/FixedCost/Currency/@id

xs:int

1

1

ID of the currency set for this fixed cost.

FixedCosts/FixedCost/Currency/Name

xs:string

1

1

Name of the currency set for this fixed cost.

FixedCosts/FixedCost/IsProrated

xs:boolean

0

1

Represents whether the fixed cost is prorated or not.

FixedCosts/FixedCost/IsPowerStateBased

xs:boolean

0

1

Represents whether power state of the virtual machine is considered while applying the fixed cost. That is, fixed cost will be applied only when the virtual machine is powered on.

FixedCosts/FixedCost/Type

1

1

Represents the fixed cost type.

FixedCosts/FixedCost/Type/@id

xs:int

1

1

ID of the fixed cost type.

FixedCosts/FixedCost/Type/Name

xs:string

1

1

Name of the fixed cost type.

FixedCosts/FixedCost/IsDeleted

xs:boolean

1

1

If true, then the fixed cost is deleted and cannot be used for further cost configurations.

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.