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

 

 

Consumption Analytics Documentation

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

Get alerts for a customer

Retrieves all alerts generated for a specified customer during a specified accounting period or year.

Resource URL

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

Request

Parameters

None

Content-Type

application/xml

Body

A query for alerts, as XML text with the root element alertQueryInput or JAXB type com.cloudcruiser.server.webservices.v1.dto.budgets.AlertQueryInput.

Schema

This XML schema describes a query for customer alerts.

<xs:element name="alertQueryInput" type="tns:AlertQueryInput"/>

<xs:complexType name="AlertQueryInput">
  <xs:all>
    <xs:element minOccurs="0" name="customer" type="tns:Customer"/>
    <xs:element minOccurs="0" name="accountingYear" type="xs:short"/>
    <xs:element minOccurs="0" name="accountingPeriod" type="xs:short"/>
    <xs:element default="true" name="includeProjected" type="xs:boolean"/>
  </xs:all>
</xs:complexType>

Response

Content-Type

application/xml

Body

The requested alerts, as XML text with the root element alertInstances or JAXB type com.cloudcruiser.server.webservices.v1.dto.budgets.AlertInstances.

Schema

This XML schema describes one or more budget alerts.

<xs:element name="alertInstances">
  <xs:complexType>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="alertInstance" type="tns:AlertInstance"/>
    </xs:sequence>
    <xs:attribute name="count" type="xs:int"/>
  </xs:complexType>
</xs:element>

<xs:complexType name="AlertInstance">
  <xs:sequence>
    <xs:element name="customer" type="tns:Customer"/>
    <xs:element minOccurs="0" name="resource" type="tns:Resource"/>
    <xs:element minOccurs="0" name="currencyCode" type="xs:string"/>
    <xs:element minOccurs="0" name="description" type="xs:string"/>
    <xs:element name="thresholdPercent" type="xs:short"/>
    <xs:element name="accountingYear" type="xs:short"/>
    <xs:element name="accountingPeriod" type="xs:short"/>
    <xs:element name="accountingStartDate" type="ns1:Date"/>
    <xs:element name="accountingEndDate" type="ns1:Date"/>
    <xs:element name="periodBudgetValue" type="xs:double"/>
    <xs:element name="actualUsage" type="xs:double"/>
    <xs:element name="dailyUsage" type="xs:double"/>
    <xs:element name="projectedUsage" type="xs:double"/>
    <xs:element name="projectedOverage" type="xs:double"/>
    <xs:element name="isProjected" type="xs:boolean"/>
    <xs:element minOccurs="0" name="sendDate" type="ns1:Date"/>
    <xs:element name="sendTo">
      <xs:complexType>
        <xs:sequence>
          <xs:element maxOccurs="unbounded" name="address" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
  </xs:sequence>
  <xs:attribute name="id" type="xs:int"/>
  <xs:attribute name="budgetType" type="tns:BudgetAlertType"/>
  <xs:attribute name="valueType" type="tns:ValueType"/>
</xs:complexType>

Example

URL invocation

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

Java invocation

AlertInstances alerts = budgetsServiceProxy.getAlerts(alertQueryInput);​

Request body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alertQueryInput xmlns="http://www.cloudcruiser.com/webservices/v1/Budget">
  <customer accountId="B"/>
  <accountingYear>2013</accountingYear>
</alertQueryInput>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alertInstances xmlns="http://www.cloudcruiser.com/webservices/v1/Budget" count="1">
  <alertInstance id="10001" budgetType="COST" valueType="COST">
    <customer id="8" accountId="B" accountingDay="5"/>
    <currencyCode>usd</currencyCode>
    <description>Generated Cost Alert</description>
    <thresholdPercent>100</thresholdPercent>
    <accountingYear>2013</accountingYear>
    <accountingPeriod>11</accountingPeriod>
    <accountingStartDate year="2013" month="11" day="5"/>
    <accountingEndDate year="2013" month="12" day="4"/>
    <periodBudgetValue>42500.0</periodBudgetValue>
    <actualUsage>45342.61</actualUsage>
    <dailyUsage>15114.2</dailyUsage>
    <projectedUsage>453426.0</projectedUsage>
    <projectedOverage>410926.0</projectedOverage>
    <isProjected>false</isProjected>
    <sendDate year="2013" month="11" day="8"/>
    <sendTo>
      <address>admin@bigorg.com</address>
      <address>bob@b.com</address>
      <address>bart@b.com</address>
    </sendTo>
  </alertInstance>
</alertInstances>
Last modified

Tags

This page has no custom tags.

Classifications

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