![]() |
Consumption Analytics Documentation |
To invoke the API from a browser, enter a valid Cloud Cruiser REST URL in the browser address bar, then enter your username and password when prompted. When you have successfully authenticated to the Cloud Cruiser server, the response appears in the browser. The following are examples of browser invocation.
The request URL http://localhost:8080/rest/v1/resources/resource/10041
might generate the following response:
<?xml version="1.0" encoding="UTF‐8"?> <resourceInfo xmlns="http://www.cloudcruiser.com/webservices/v1/Resource" id="10041"> <name>AmazonEC2.DiskReadOps</name> <group id="21"> <name>Amazon</name> </group> <active>true</active> <hidden>false</hidden> <allocated>false</allocated> <resourceType>STANDARD</resourceType> <rateType>PRICE</rateType> <unitsDecimals>4</unitsDecimals> <rateDecimals>4</rateDecimals> <numericType>INTEGER</numericType> <unitDesc>operations</unitDesc> <ratePlan id="1"> <name>default</name> <description>Amazon EC2 completed read operations from all disks</description> <revision id="10045"> <ratePlanName>default</ratePlanName> <startDate year="2000" month="1" day="1"/> <endDate year="2999" month="12" day="31"/> <detailType>BASIC</detailType> <detail id="10059"> <rate id="10055" currencyCode="usd"> <variableCharge>0.02</variableCharge> </rate> </detail> </revision> </ratePlan> </resourceInfo>
The request URL http://localhost:8080/rest/v1/resources/resource/name/myTest-1
might generate the following response:
<?xml version="1.0" encoding="UTF‐8" standalone="yes"?> <resourceInfo xmlns="http://www.cloudcruiser.com/webservices/v1/Resource" id="11301"> <name>myTest‐1</name> <group id="27"> <name>QA/Test and Development Services</name> </group> <active>true</active> <hidden>true</hidden> <allocated>true</allocated> <resourceType>STANDARD</resourceType> <rateType>COGS</rateType> <unitsDecimals>3</unitsDecimals> <rateDecimals>2</rateDecimals> <alternativeCode>alternative code</alternativeCode> <numericType>INTEGER</numericType> <unitDesc>GB</unitDesc> <ratePlan id="1"> <name>default</name> <description>Desc‐1 for resource myTest‐1</description> <revision id="11404"> <ratePlanName>default</ratePlanName> <startDate year="2006" month="6" day="22"/> <endDate year="2999" month="12" day="31"/> <chargeInterval>MONTHLY</chargeInterval> <detailType>TIER</detailType> <detail id="11413"> <description>Tier 1</description> <rate id="11408" currencyCode="usd"> <fixedCharge>645.12</fixedCharge> <variableCharge>0.0</variableCharge> </rate> <tier lowValue="0.0" highValue="768.0"/> </detail> <detail id="11414"> <description>Tier 2</description> <rate id="11409" currencyCode="usd"> <variableCharge>0.35</variableCharge> </rate> <tier lowValue="768.0"/> </detail> </revision> </ratePlan> <ratePlan id="2"> <name>Customer 1</name> <description>Desc‐2 for resource myTest‐1</description> <revision id="11405"> <ratePlanName>Customer 1</ratePlanName> <startDate year="2011" month="9" day="2"/> <endDate year="2999" month="12" day="31"/> <chargeInterval>MONTHLY</chargeInterval> <detailType>TIER</detailType> <detail id="11416"> <description>Tier 1</description> <rate id="11410" currencyCode="usd"> <fixedCharge>645.12</fixedCharge> <variableCharge>0.0</variableCharge> </rate> <tier lowValue="0.0" highValue="768.0"/> </detail> <detail id="11417"> <description>Tier 2</description> <rate id="11411" currencyCode="usd"> <variableCharge>0.35</variableCharge> </rate> <tier lowValue="768.0"/> </detail> </revision> </ratePlan> <ratePlan id="10000"> <name>updated‐default‐rate‐plan</name> <description>Description for updated‐default‐rate‐plan</description> <revision id="11406"> <ratePlanName>updated‐default‐rate‐plan</ratePlanName> <startDate year="2000" month="6" day="5"/> <endDate year="2999" month="12" day="31"/> <chargeInterval>MONTHLY</chargeInterval> <detailType>TIER</detailType> <detail id="11419"> <description>Tier 1</description> <rate id="11412" currencyCode="usd"> <fixedCharge>645.12</fixedCharge> <variableCharge>0.0</variableCharge> </rate> <tier lowValue="0.0" highValue="768.0"/> </detail> <detail id="11420"> <description>Tier 2</description> <rate id="11413" currencyCode="usd"> <variableCharge>0.35</variableCharge> </rate> <tier lowValue="768.0"/> </detail> </revision> </ratePlan> </resourceInfo>
(c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP