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 > Lookup tables > Get lookup tables

Get lookup tables

Retrieves lookup tables.

Resource URL

GET http://<ccServerURL>/rest/v2/lookups

Request

Parameters

In HPE Consumption Analytics Portal version 4.1 and later, you can include the following query parameters:

  Name Type Description
URL query parameters (optional) title string The title of a lookup table to retrieve.
effDate string The effective date (in yyyyMMdd format) used to filter the results.
Body

None

Response

Content-Type

application/xml

Body

In version 4.1 and later, a list of lookup tables, as XML text with a root element of type LookupTableList or JAXB type com.cloudcruiser.server.<wbr/>webservices.v2.dto.lookup.<wbr/>LookupTableList.

I, version 4.0, all revisions for all lookup tables, as XML text with a root element of type lookups or JAXB type com.cloudcruiser.server.webservices.v1.dto.Lookup.lookups.

Schema

Version 4.0
Version 4.1 and later

For HPE Consumption Analytics Portal 4.1 and later, this XML schema describes one or more lookup tables.

<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/Lookup"attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.cloudcruiser.com/webservices/v2/Lookup">
  <xs:import namespace="http://www.cloudcruiser.com/webservices/v2/Common"/>
  <xs:element name="lookupTable" type="tns:LookupTable"/>
  <xs:element name="lookupTableList" type="tns:LookupTableList"/>
  <xs:element name="revision" type="tns:Revision"/>
  <xs:element name="revisions" type="tns:Revisions"/>
  <xs:complexType name="DetailTable">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="entry" type="tns:DetailEntry"/>
    </xs:sequence>
    <xs:attribute name="entryCount" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="DetailEntry">
    <xs:sequence>
      <xs:element minOccurs="0" name="expression" type="xs:string"/>
      <xs:element minOccurs="0" name="lowId" type="xs:string"/>
      <xs:element minOccurs="0" name="highId" type="xs:string"/>
      <xs:element name="targetId" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="order" type="xs:short"/>
  </xs:complexType>
  <xs:complexType name="LookupTable">
    <xs:sequence>
      <xs:element name="title" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element ref="tns:revisions"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="Revisions">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:revision"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Revision">
    <xs:sequence>
      <xs:element name="LookupTable">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="title" type="xs:string" use="required"/>
          <xs:attribute name="id" type="xs:int" use="required"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="startDate" type="ns1:Date"/>
      <xs:element name="endDate" type="ns1:Date"/>
      <xs:element name="detailTable" type="tns:DetailTable"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="LookupTableList">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:lookupTable"/>
    </xs:sequence>
    <xs:attribute name="totalTables" type="xs:int"/>
    <xs:attribute name="retrievedTables" type="xs:int"/>
  </xs:complexType>
</xs:schema>

Example

URL invocation

GET http://localhost:8080/rest/v2/lookups?title=cc_table

Java invocation
Request body

None

Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lookupTableList xmlns="http://www.cloudcruiser.com/webservices/v2/Lookup" totalTables="5" retrievedTables="1">
  <lookupTable id="10100">
    <title>cc_table</title>
    <description>Translate IDs to customer names</description>
    <revisions>
      <revision id="10000">
        <LookupTable title="cc_table" id="10100"/>
        <startDate year="2000" month="1" day="1"/>
        <endDate year="2999" month="12" day="31"/>
        <detailTable entryCount="3">
          <entry order="1">
            <lowId>aa</lowId>
            <highId>az</highId>
            <targetId>Customer A</targetId>
          </entry>
          <entry order="2">
            <lowId>ba</lowId>
            <highId>zz</highId>
            <targetId>Customer B</targetId>
          </entry>
          <entry order="3">
            <targetId>Customer C</targetId>
          </entry>
        </detailTable>
      </revision>
    </revisions>
  </lookupTable>
</lookupTableList>
Last modified

Tags

Classifications

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