Home > Cloud Cruiser 3 > REST API reference > Budgets and alerts > Get a budget

Get a budget

Retrieves a customer budget specified by budget ID.

Resource URL

GET http://<ccServerURL>/rest/v1/budgets/budget/<id>

Request

Parameters
  Name Type Description
URL path parameters (required) id int The ID of the budget to retrieve
URL query parameters (optional) None
Body

None

Response

Content-Type

application/xml

Body

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

Schema

This XML schema describes a customer budget.

<xs:element name="customerBudget" type="tns:CustomerBudget"/>

<xs:complexType name="CustomerBudget">
  <xs:sequence>
    <xs:element name="customer" type="tns:Customer"/>
    <xs:element minOccurs="0" name="resource" type="tns:Resource"/>
    <xs:element name="accountingYear" type="xs:short"/>
    <xs:element name="currencyCode" type="xs:string"/>
    <xs:element name="description" type="xs:string"/>
    <xs:element name="standardAlertsEnabled" type="xs:boolean"/>
    <xs:element name="projectedAlertsEnabled" type="xs:boolean"/>
    <xs:element name="useDefaultThresholds" type="xs:boolean"/>
    <xs:element minOccurs="0" name="threshold1Percent" type="xs:short"/>
    <xs:element minOccurs="0" name="threshold2Percent" type="xs:short"/>
    <xs:element minOccurs="0" name="threshold3Percent" type="xs:short"/>
    <xs:element name="costPeriods" type="tns:BudgetPeriods"/>
    <xs:element minOccurs="0" name="unitsPeriods" type="tns:BudgetPeriods"/>
  </xs:sequence>
  <xs:attribute name="budgetId" type="xs:int"/>
  <xs:attribute name="budgetType" type="tns:BudgetAlertType" use="required"/>
</xs:complexType>

Example

URL invocation

GET http://localhost:8080/rest/v1/budgets/budget/5011

Java invocation

CustomerBudget custBudget = budgetsServiceProxy.getBudgetById(5011);​

Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customerBudget xmlns="http://www.cloudcruiser.com/webservices/v1/Budget" budgetId="5011" budgetType="COST">
  <customer id="8" accountId="B-BB" accountingDay="5"/>
  <accountingYear>2013</accountingYear>
  <currencyCode>usd</currencyCode>
  <standardAlertsEnabled>true</standardAlertsEnabled>
  <projectedAlertsEnabled>true</projectedAlertsEnabled>
  <useDefaultThresholds>true</useDefaultThresholds>
  <threshold1Percent>80</threshold1Percent>
  <threshold2Percent>100</threshold2Percent>
  <threshold3Percent>120</threshold3Percent>
  <costPeriods>
    <period accountingPeriod="1" budgetValue="42500.0"/>
    <period accountingPeriod="2" budgetValue="42500.0"/>
    <period accountingPeriod="3" budgetValue="42500.0"/>
    <period accountingPeriod="4" budgetValue="42500.0"/>
    <period accountingPeriod="5" budgetValue="42500.0"/>
    <period accountingPeriod="6" budgetValue="42500.0"/>
    <period accountingPeriod="7" budgetValue="42500.0"/>
    <period accountingPeriod="8" budgetValue="42500.0"/>
    <period accountingPeriod="9" budgetValue="42500.0"/>
    <period accountingPeriod="10" budgetValue="42500.0"/>
    <period accountingPeriod="11" budgetValue="42500.0"/>
    <period accountingPeriod="12" budgetValue="42500.0"/>
  </costPeriods>
</customerBudget>
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP