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 > Resources > Get a revision

Get a revision

Retrieves the specified revision of the specified resource.

URL syntax

http://<ccServerURL
>/rest/v1/resources/resource/<headerId
>/revisions/<revisionId
>

HTTP method

GET

Request

URL path parameters (required)

headerId (type: int )

revisionId (type: int )

Request body

None

Response

Content-Type
application/xml
Response body

XML text with root element revision and the following XML schema:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.cloudcruiser.com/webservices/v1/Common" xmlns:tns="http://www.cloudcruiser.com/webservices/v1/Resource" targetNamespace="http://www.cloudcruiser.com/webservices/v1/Resource">
<xs:element name="revision" type="tns:Revision"/>
<xs:complexType name="Revision">
  <xs:sequence>
    <xs:element name="ratePlanName" type="xs:string"/>
    <xs:element minOccurs="0" name="startDate" type="ns1:StartOfDay"/>
    <xs:element minOccurs="0" name="endDate" type="ns1:EndOfDay"/>
    <xs:element minOccurs="0" name="chargeInterval" type="chargeIntervalType"/>
    <xs:element minOccurs="0" name="conversion" type="ns1:ConversionType"/>
    <xs:element default="BASIC" name="detailType" type="resourceDetailType"/>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="detail" type="tns:Detail"/>
  </xs:sequence>
  <xs:attribute name="id" type="xs:int"/>
</xs:complexType>
 
<xs:simpleType name="chargeIntervalType">
  <xs:restriction base="xs:string">
    <xs:enumeration value="DAILY"/>
    <xs:enumeration value="HOURLY"/>
    <xs:enumeration value="MONTHLY"/>
    <xs:enumeration value="WEEKLY"/>
    <xs:enumeration value="YEARLY"/>
  </xs:restriction>
</xs:simpleType>
 
<xs:simpleType name="conversionOperatorType">
  <xs:restriction base="xs:string">
    <xs:enumeration value="NONE"/>
    <xs:enumeration value="MULT"/>
    <xs:enumeration value="DIV"/>
  </xs:restriction>
</xs:simpleType>
 
<xs:simpleType name="resourceDetailType">
  <xs:restriction base="xs:string">
    <xs:enumeration value="BASIC"/>
    <xs:enumeration value="SHIFT"/>
    <xs:enumeration value="TIER"/>
    <xs:enumeration value="STATE"/>
  </xs:restriction>
</xs:simpleType>
 
<xs:complexType name="Detail">
  <xs:sequence>
    <xs:element minOccurs="0" name="description" type="xs:string"/>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="rate" type="tns:Rate"/>
    <xs:element minOccurs="0" name="resourceState" type="xs:string"/>
    <xs:element minOccurs="0" name="shift" type="xs:short"/>
    <xs:element minOccurs="0" name="tier" type="tns:Tier"/>
  </xs:sequence>
  <xs:attribute name="id" type="xs:int"/>
</xs:complexType>
 
<xs:complexType name="Rate">
  <xs:sequence>
    <xs:element minOccurs="0" name="fixedCharge" type="xs:double"/>
    <xs:element minOccurs="0" name="variableCharge" type="xs:double"/>
    <xs:element minOccurs="0" name="comments" type="xs:string"/>
    <xs:element minOccurs="0" name="userFlag1" type="xs:string"/>
    <xs:element minOccurs="0" name="userFlag2" type="xs:string"/>
  </xs:sequence>
  <xs:attribute name="id" type="xs:int"/>
  <xs:attribute name="currencyCode" type="xs:string" use="required"/>
</xs:complexType>
 
<xs:complexType name="Tier">
  <xs:sequence/>
    <xs:attribute name="lowValue" type="xs:double"/>
    <xs:attribute name="highValue" type="xs:double"/>
</xs:complexType>
</xs:schema>

JAXB type

com.cloudcruiser.server.webservices.v1.dto.resource.Revision

Example

URL
http://localhost:8080/rest/v1/resources/resource/10011/revisions/10015
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<revision xmlns="http://www.cloudcruiser.com/webservices/v1/Resource" id="10015">
  ratePlanName>default</ratePlanName>
  <startDate year="2000" month="1" day="1"/>
  <endDate year="2999" month="12" day="31"/>
  <detailType>BASIC</detailType>
  <detail id="10015">
    <rate id="10015" currencyCode="usd">
      <variableCharge>1.0E-4</variableCharge>
    </rate>
  </detail>
</revision>
Java
Revision revision = resourceServiceProxy.getRevision(10011,10015);
Last modified

Tags

This page has no custom tags.

Classifications

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