Home > Cloud Cruiser 4 > REST API reference > Rate plans > Get the date ranges for a rate plan

Get the date ranges for a rate plan

Retrieves the effective date ranges for a rate plan specified by its name.

This method is available in Cloud Cruiser version 4.1 and later.

Resource URL

GET http://<ccServerURL>/rest/v2/ratePlans/<planId>/revisions

Request

Parameters
  Name Type Description
URL path parameters (required) planId integer The ID of the rate plan for which to retrieve date ranges
URL query parameters (optional) effDate string A date for which to retrieve the effective date range, in the format yyyymmdd. This filters the response to a single date range.
Body

None

Response

Content-Type

application/xml

Body

The date ranges, as XML text with the root element revisions or JAXB type com.cloudcruiser.server.webservices.v2.dto.rateplan.Revisions.

Schema

Version 4.0
Version 4.1 and later

For Cloud Cruiser 4.1 and later, this XML schema describes rate plans and their contained effective date ranges.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.cloudcruiser.com/webservices/v2/Common" xmlns:tns="http://www.cloudcruiser.com/webservices/v2/Rateplan" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.cloudcruiser.com/webservices/v2/Rateplan">
  <xs:import namespace="http://www.cloudcruiser.com/webservices/v2/Common"/>
  <xs:import/>
  <xs:element name="ratePlan" type="tns:RatePlan"/>
  <xs:element name="ratePlanList" type="tns:RatePlanList"/>
  <xs:element name="ratePlanSummaryList" type="tns:RatePlanSummaryList"/>
  <xs:element name="revision" type="tns:Revision"/>
  <xs:element name="revisions" type="tns:Revisions"/>
  <xs:element name="serviceRate" type="tns:ServiceRate"/>
  <xs:complexType name="RatePlan">
    <xs:sequence>
      <xs:element name="planName" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element default="false" name="defaultPlan" type="xs:boolean"/>
      <xs:element default="false" name="costPlan" type="xs:boolean"/>
      <xs:element default="true" name="valid" type="xs:boolean"/>
      <xs:element maxOccurs="unbounded" ref="tns:revision"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="associatedCustomer" type="tns:AssociatedCustomer"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="Revision">
    <xs:sequence>
      <xs:element minOccurs="0" name="ratePlan">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="name" type="xs:string"/>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="startDate" type="ns1:StartOfDay"/>
      <xs:element name="endDate" type="ns1:EndOfDay"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:serviceRate"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="ServiceRate">
    <xs:sequence>
      <xs:element name="service" type="ns1:Service"/>
      <xs:element minOccurs="0" name="serviceRateDesc" type="xs:string"/>
      <xs:element default="4" name="priceDecimals" type="xs:short"/>
      <xs:element minOccurs="0" name="minimumCommit">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="value" type="xs:double"/>
            <xs:element name="interval" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="targetAccountField" type="xs:string"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="tag">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="value" type="xs:string" use="required"/>
        </xs:complexType>
      </xs:element>
      <xs:element maxOccurs="unbounded" name="rateItem" type="tns:RateItem"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType abstract="true" name="RateItem">
    <xs:sequence>
      <xs:element minOccurs="0" name="rate" type="xs:double"/>
      <xs:element minOccurs="0" name="fixedCharge" type="xs:double"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="PassthroughRateItem">
    <xs:complexContent>
      <xs:extension base="tns:RateItem">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BasicRateItem">
    <xs:complexContent>
      <xs:extension base="tns:RateItem">
        <xs:sequence>
          <xs:element minOccurs="0" name="minUnits" type="xs:double"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType abstract="true" name="TierRateItem">
    <xs:complexContent>
      <xs:extension base="tns:RateItem">
        <xs:sequence>
          <xs:element name="tierName" type="xs:string"/>
          <xs:element name="lowRange" type="xs:double"/>
          <xs:element minOccurs="0" name="highRange" type="xs:double"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PerTierRateItem">
    <xs:complexContent>
      <xs:extension base="tns:TierRateItem">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="HighTierMeteredRateItem">
    <xs:complexContent>
      <xs:extension base="tns:TierRateItem">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="HighTierAllocatedRateItem">
    <xs:complexContent>
      <xs:extension base="tns:TierRateItem">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PerTierAllocatedRateItem">
    <xs:complexContent>
      <xs:extension base="tns:TierRateItem">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="HighTierRateItem">
    <xs:complexContent>
      <xs:extension base="tns:TierRateItem">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PerTierMeteredRateItem">
    <xs:complexContent>
      <xs:extension base="tns:TierRateItem">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AssociatedCustomer">
    <xs:sequence/>
    <xs:attribute name="id" type="xs:int"/>
    <xs:attribute name="customerid" type="xs:string"/>
  </xs:complexType>
  <xs:complexType name="RatePlanSummaryList">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="ratePlanSummary" type="tns:RatePlanSummary"/>
    </xs:sequence>
    <xs:attribute name="totalPlans" type="xs:int"/>
    <xs:attribute name="retrievedPlans" type="xs:int"/>
    <xs:attribute name="startFrom" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="RatePlanSummary">
    <xs:sequence>
      <xs:element name="planName" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element maxOccurs="unbounded" name="revisionSummary">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="id" type="xs:int" use="required"/>
          <xs:attribute name="startDate" type="xs:string" use="required"/>
          <xs:attribute name="endDate" type="xs:string" use="required"/>
          <xs:attribute name="serviceCount" type="xs:int"/>
        </xs:complexType>
      </xs:element>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="associatedCustomer" type="tns:AssociatedCustomer"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int" use="required"/>
    <xs:attribute name="defaultPlan" type="xs:boolean"/>
    <xs:attribute name="costPlan" type="xs:boolean"/>
    <xs:attribute name="valid" type="xs:boolean"/>
  </xs:complexType>
  <xs:complexType name="Revisions">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:revision"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="RatePlanList">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:ratePlan"/>
    </xs:sequence>
    <xs:attribute name="totalPlans" type="xs:int"/>
    <xs:attribute name="retrievedPlans" type="xs:int"/>
  </xs:complexType>
</xs:schema>

Example

URL invocation (basic)

GET http://localhost:8080/rest/v2/ratePlans/10200/revisions

URL invocation (for specified date)

GET http://localhost:8080/rest/v2/ratePl...fDate=20140810

Java invocation
Response body
<revisions xmlns="http://www.cloudcruiser.com/webservices/v2/Rateplan">
  <revision id="10300">
    <ratePlan name="test-plan-12" id="10200"/>
    <startDate year="2000" month="1" day="1"/>
    <endDate year="2014" month="12" day="31"/>
    <serviceRate>
      <service serviceName="Small VM" groupName="Virtual Machines" id="10000"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="BasicRateItem">
        <rate>80.0</rate>
        <fixedCharge>2.0</fixedCharge>
      </rateItem>
    </serviceRate>
    <serviceRate>
      <service serviceName="test-svc-2" groupName="testGrp-1" id="10600"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="HighTierRateItem">
        <rate>11.0</rate>
        <tierName>t-1</tierName>
        <lowRange>0.0</lowRange>
        <highRange>200.0</highRange>
      </rateItem>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="HighTierRateItem">
        <rate>10.0</rate>
        <tierName>t-2</tierName>
        <lowRange>200.0</lowRange>
      </rateItem>
    </serviceRate>
    <serviceRate>
      <service serviceName="test-svc-1" groupName="testGrp-2" id="10400"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PerTierRateItem">
        <rate>20.0</rate>
        <tierName>t1</tierName>
        <lowRange>0.0</lowRange>
        <highRange>100.0</highRange>
      </rateItem>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PerTierRateItem">
        <rate>18.0</rate>
        <tierName>t2</tierName>
        <lowRange>100.0</lowRange>
      </rateItem>
    </serviceRate>
    <serviceRate>
      <service serviceName="Network Traffic In" groupName="Network" id="10003"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="BasicRateItem">
        <rate>0.55</rate>
      </rateItem>
    </serviceRate>
  </revision>
  <revision id="10301">
    <ratePlan name="test-plan-12" id="10200"/>
    <startDate year="2015" month="1" day="1"/>
    <endDate year="2016" month="12" day="31"/>
    <serviceRate>
      <service serviceName="test-svc-2" groupName="testGrp-1" id="10600"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PerTierRateItem">
        <rate>21.0</rate>
        <tierName>t-1</tierName>
        <lowRange>0.0</lowRange>
        <highRange>100.0</highRange>
      </rateItem>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PerTierRateItem">
        <rate>20.0</rate>
        <tierName>t-2</tierName>
        <lowRange>100.0</lowRange>
      </rateItem>
    </serviceRate>
    <serviceRate>
      <service serviceName="Network Traffic In" groupName="Network" id="10003"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="BasicRateItem">
        <rate>0.55</rate>
      </rateItem>
    </serviceRate>
    <serviceRate>
      <service serviceName="Small VM" groupName="Virtual Machines" id="10000"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="BasicRateItem">
        <rate>80.0</rate>
        <fixedCharge>2.0</fixedCharge>
      </rateItem>
    </serviceRate>
  </revision>
  <revision id="10400">
    <ratePlan name="test-plan-12" id="10200"/>
    <startDate year="2017" month="1" day="1"/>
    <endDate year="2999" month="12" day="31"/>
    <serviceRate>
      <service serviceName="test-svc-1" groupName="testGrp-2" id="10400"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PerTierRateItem">
        <rate>20.0</rate>
        <tierName>t1</tierName>
        <lowRange>0.0</lowRange>
        <highRange>100.0</highRange>
      </rateItem>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PerTierRateItem">
        <rate>18.0</rate>
        <tierName>t2</tierName>
        <lowRange>100.0</lowRange>
      </rateItem>
    </serviceRate>
    <serviceRate>
      <service serviceName="test-svc-2" groupName="testGrp-1" id="10600"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="HighTierRateItem">
        <rate>31.0</rate>
        <tierName>t1</tierName>
        <lowRange>0.0</lowRange>
        <highRange>300.0</highRange>
      </rateItem>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="HighTierRateItem">
        <rate>30.0</rate>
        <tierName>t2</tierName>
        <lowRange>300.0</lowRange>
      </rateItem>
    </serviceRate>
    <serviceRate>
      <service serviceName="Small VM" groupName="Virtual Machines" id="10000"/>
      <priceDecimals>0</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="BasicRateItem">
        <rate>100.0</rate>
        <fixedCharge>1.0</fixedCharge>
      </rateItem>
    </serviceRate>
    <serviceRate>
      <service serviceName="Network Traffic In" groupName="Network" id="10003"/>
      <priceDecimals>4</priceDecimals>
      <rateItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="BasicRateItem">
        <rate>0.65</rate>
      </rateItem>
    </serviceRate>
  </revision>
</revisions>
Last modified

Tags

Classifications

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