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 4 > REST API reference > Customers > Get a customer by ID

Get a customer by ID

Retrieves detailed information for a customer specified by its numeric ID.

Resource URL

GET http://<ccServerURL>/rest/v2/customers/<id>

Request

Parameters
  Name Type Description
URL path parameters (required) id integer The ID of the customer to retrieve
Body

None

Response

Content-Type

application/xml

Body

The information of the identified customer, as XML text with the root element customer or JAXB type com.cloudcruiser.server.webservices.v2.dto.customer.Customer.

Schema

Version 4.0
Version 4.1 and later

For HPE Consumption Analytics Portal 4.1 and later, this XML schema describes a customer or list of customers.

<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/Customer" attributeFormDefault="unqualified"elementFormDefault="qualified" targetNamespace="http://www.cloudcruiser.com/webservices/v2/Customer">
  <xs:import namespace="http://www.cloudcruiser.com/webservices/v2/Common"/>
  <xs:import/>
  <xs:element name="customer" type="tns:Customer"/>
  <xs:element name="customerList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:customer"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="customerSummaryList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="0" name="customerSummary" type="tns:CustomerSummary"/>
      </xs:sequence>
      <xs:attribute name="totalCount" type="xs:int" use="required"/>
      <xs:attribute name="retrievedCount" type="xs:int" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="CustomerSummary">
    <xs:sequence>
      <xs:element name="accountId" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int" use="required"/>
  </xs:complexType>
  <xs:complexType name="Customer">
    <xs:sequence>
      <xs:element name="accountId" type="xs:string"/>
      <xs:element name="active" type="xs:boolean"/>
      <xs:element default="1" name="accountingDay" type="xs:short"/>
      <xs:element default="1" name="fiscalStartMonth" type="xs:short"/>
      <xs:element minOccurs="0" name="altAccountId" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element minOccurs="0" name="flag1" type="xs:string"/>
      <xs:element minOccurs="0" name="flag2" type="xs:string"/>
      <xs:element minOccurs="0" name="flag3" type="xs:string"/>
      <xs:element minOccurs="0" name="flag4" type="xs:string"/>
      <xs:element minOccurs="0" name="flag5" type="xs:string"/>
      <xs:element name="ratePlan">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="transactions">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="unbounded" name="transaction" type="tns:Transaction"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="discountInstances">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="unbounded" name="discountInstance" type="tns:DiscountInstance"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="contacts" type="tns:Contacts"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType abstract="true" name="Transaction">
    <xs:sequence>
      <xs:element name="service" type="ns1:Service"/>
      <xs:element default="true" name="active" type="xs:boolean"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element default="MONEY_AMOUNT" name="amountType" type="xs:string"/>
      <xs:element name="amount" type="xs:double"/>
      <xs:element minOccurs="0" name="lastProcessedDate" type="ns1:Date"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="NonRecurringTransaction">
    <xs:complexContent>
      <xs:extension base="tns:Transaction">
        <xs:sequence>
          <xs:element name="transactionDate" type="ns1:Date"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RecurringTransaction">
    <xs:complexContent>
      <xs:extension base="tns:Transaction">
        <xs:sequence>
          <xs:element name="frequencyType" type="xs:string"/>
          <xs:element name="startDate" type="ns1:StartOfDay"/>
          <xs:element name="endDate" type="ns1:EndOfDay"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DiscountInstance">
    <xs:sequence>
      <xs:element name="active" type="xs:boolean"/>
      <xs:element name="startDate" type="ns1:StartOfDay"/>
      <xs:element name="endDate" type="ns1:EndOfDay"/>
      <xs:element name="discount">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="Contacts">
    <xs:sequence>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="emailContact">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="emailAddress" type="xs:string"/>
            <xs:element minOccurs="0" name="description" type="xs:string"/>
            <xs:element default="false" name="receiveAlerts" type="xs:boolean"/>
          </xs:sequence>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="postalContact">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="description" type="xs:string"/>
            <xs:element name="address1" type="xs:string"/>
            <xs:element minOccurs="0" name="address2" type="xs:string"/>
            <xs:element minOccurs="0" name="address3" type="xs:string"/>
            <xs:element minOccurs="0" name="address4" type="xs:string"/>
            <xs:element minOccurs="0" name="address5" type="xs:string"/>
          </xs:sequence>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
</xs:schema>

Example

URL invocation

GET http://localhost:8080/rest/v2/customers/10200

Java invocation
Response body
<customer xmlns="http://www.cloudcruiser.com/webservices/v2/Customer" id="10200">
  <accountId>T|A3</accountId>
  <active>true</active>
  <accountingDay>5</accountingDay>
  <fiscalStartMonth>6</fiscalStartMonth>
  <description>Business Banking, Dept 1</description>
  <ratePlan name="Default" id="1"/>
  <transactions>
    <transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RecurringTransaction" id="10200">
      <service id="10103" name="test-svc-11"/>
      <active>true</active>
      <description>recur-1</description>
      <amountType>UNITS_AMOUNT</amountType>
      <amount>5.0</amount>
      <frequencyType>DAILY</frequencyType>
      <startDate year="2014" month="9" day="1"/>
      <endDate year="2014" month="12" day="31"/>
    </transaction>
  </transactions>
  <discountRevisions>
    <discountRevision id="10100">
      <active>true</active>
      <startDate year="2000" month="1" day="1"/>
      <endDate year="2999" month="12" day="31"/>
      <discount name="Discount10" id="1"/>
    </discountRevision>
  </discountRevisions>
  <contacts id="10200">
    <emailContact id="10200">
      <emailAddress>admin@big.org</emailAddress>
      <description>Business Banking, Dept 1 Email</description>
      <receiveAlerts>true</receiveAlerts>
    </emailContact>
    <emailContact id="10201">
      <emailAddress>b_aa@big.org</emailAddress>
      <description>Business Banking, Dept 1 Email</description>
      <receiveAlerts>false</receiveAlerts>
    </emailContact>
    <postalContact id="10202">
    <description>Business Banking, Dept 1 Address</description>
      <address1>102 Douglas Blvd</address1>
      <address2>Roseville</address2>
      <address3>CA</address3>
      <address4>95650</address4>
    </postalContact>
  </contacts>
</customer>
Last modified

Tags

Classifications

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