Get Billing Policy

This API enables you to retrieve a specific billing policy.

Syntax

The syntax for calling this method is:

GET <Base_Url>/billingPolicy/{billingPolicyId}

A sample API call is as follows:

GET https://123.123.123.123/vCenter-CB/api/billingPolicy/1

User Privilege

You must have Read privilege on the billing policy that you want to retrieve.

API Response

XPath

Type

Min Occurs

Max Occurs

Description

BillingPolicies/BillingPolicy

1

1

Represents the billing policy that is modified.

BillingPolicies/BillingPolicy/@id

xs:int

1

1

ID of the billing policy.

BillingPolicies/BillingPolicy/Name

xs:string

1

1

Name of the billing policy. Name should not exceed 255 characters.

BillingPolicies/BillingPolicy/Description

xs:string

1

1

Description of the billing policy. Description should not exceed 512 characters.

BillingPolicies/BillingPolicy/Expression

xs:string

1

1

Expression used to calculate the cost. The expressions should follow the correct syntax.

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_BILLING_POLICY_ID

Billing policy ID is invalid.