Cloud Cruiser became HPE Consumption Analytics on Nov. 1, 2018. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 3 > REST API reference > Budgets and alerts > Get usage for a customer

Get usage for a customer

Retrieves the budget and corresponding usage for a specified customer and accounting period.

Resource URL

POST http://<ccServerURL>/rest/v1/budgets/usage

Request

Parameters

None

Content-Type

application/xml

Body

A budget query, as XML text with the root element budgetQueryInput or JAXB type com.cloudcruiser.server.webservices.v1.dto.budgets.BudgetQueryInput.

Response

Content-Type

application/xml

Body

The requested budget and usage, as XML text with the root element budgetAndUsage or JAXB type com.cloudcruiser.server.webservices.v1.dto.budgets.BudgetAndUsage​.

Example

URL invocation

POST http://localhost:8080/rest/v1/budgets/usage

Java invocation

BudgetAndUsage budgetUsage= budgetsServiceProxy.getBudgetAndUsage(queryInput);​

Request body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<budgetQueryInput xmlns="http://www.cloudcruiser.com/webservices/v1/Budget">
  <customer accountId="B-BB"/>
  <accountingYear>2013</accountingYear>
  <accountingPeriod>10</accountingPeriod>
</budgetQueryInput>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<budgetAndUsage xmlns="http://www.cloudcruiser.com/webservices/v1/Budget">
  <customer id="8" accountId="B-BB" accountingDay="5"/>
  <accountingYear>2013</accountingYear>
  <accountingPeriod>10</accountingPeriod>
  <accountingStartDate year="2013" month="10" day="5"/>
  <accountingEndDate year="2013" month="11" day="4"/>
  <standardAlertsEnabled>true</standardAlertsEnabled>
  <projectedAlertsEnabled>true</projectedAlertsEnabled>
  <useDefaultThresholds>true</useDefaultThresholds>
  <threshold1Percent>80</threshold1Percent>
  <threshold2Percent>100</threshold2Percent>
  <threshold3Percent>120</threshold3Percent>
  <periodBudgetUsage budgetId="5011">
    <budgetType>COST</budgetType>
    <valueType>COST</valueType>
    <currencyCode>usd</currencyCode>
    <periodBudgetValue>42500.0</periodBudgetValue>
    <actualUsage>0.0</actualUsage>
    <usagePercent>0</usagePercent>
    <status>NO_USAGE</status>
  </periodBudgetUsage>
</budgetAndUsage>
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.