Get All Fixed Costs

This API enables you to retrieve the following:

Note that you can retrieve only the fixed costs for which you have Read privilege.

Syntax

The syntax for calling this method is:

GET <Base_Url>/fixedCosts

A sample API call is as follows:

GET https://123.123.123.123/vCenter-CB/api/fixedCosts

User Privilege

You must be authenticated with vCenter Chargeback Manager but do not need any special privileges.

URL Parameters

Name

Data Type

Required/Optional

Description

Sample Value

currencyId

int

Optional

ID of the currency

1

Request Body Parameters

This API does not need any request parameters.

Response Type

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

XPath

Type

Min Occurs

Max Occurs

Description

FixedCosts/FixedCost

1

unbounded

Represents the fixed cost retrieved by the API.

FixedCosts/FixedCost/@id

xs:int

1

1

ID of the fixed cost retrieved by the API.

FixedCosts/FixedCost/Name

xs:string

1

1

Name of the fixed cost. The name must not exceed 255 characters.

FixedCosts/FixedCost/Description

xs:string

1

1

An optional description of the fixed cost. The description must not exceed 512 characters.

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_CURRENCY

URL parameter specifies an invalid currency .