Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 4 > REST API reference > Lookup tables > Import a lookup table from CSV

Import a lookup table from CSV

Creates or updates a lookup table specified by title by importing data in CSV format as a new effective date range.

Resource URL

In version 4.0: POST http://<ccServerURL>/rest/v2/lookups/import/<title>

In version 4.1 and later: POST http://<ccServerURL>/rest/v2/lookups/import


Version 4.0
Version 4.1 and later

For Cloud Cruiser 4.1, use the following parameters:

  Name Type Description
Header parameters (optional) updateDuplicates boolean Specifies whether to update duplicate table revisions if a lookup table with the same title already exists. Default is false.
title string The title of the lookup table to create or update.
description string The description to set for the lookup table.
startDate string The starting date for the new effective date range of the table, in yyyyMMdd format. Default is today's date.
endDate string The ending date for the new effective date range of the table, in yyyyMMdd format. Default is 29991231.



The lookup table, in Lookup table CSV file format.





The results of the import, as XML text with a root element of type itemImportResult or JAXB type com.cloudcruiser.server.webservices.v2.dto.common.ItemImportResult​. The results specify which records were created, updated, and duplicate.


Version 4.0
Version 4.1 and later

For Cloud Cruiser 4.1 and later, this XML schema describes one or more lookup tables.

<xs:schema xmlns:xs="" xmlns:ns1="" xmlns:tns=""attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="">
  <xs:import namespace=""/>
  <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:element maxOccurs="unbounded" minOccurs="0" name="entry" type="tns:DetailEntry"/>
    <xs:attribute name="entryCount" type="xs:int"/>
  <xs:complexType name="DetailEntry">
      <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:attribute name="order" type="xs:short"/>
  <xs:complexType name="LookupTable">
      <xs:element name="title" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element ref="tns:revisions"/>
    <xs:attribute name="id" type="xs:int"/>
  <xs:complexType name="Revisions">
      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:revision"/>
  <xs:complexType name="Revision">
      <xs:element name="LookupTable">
          <xs:attribute name="title" type="xs:string" use="required"/>
          <xs:attribute name="id" type="xs:int" use="required"/>
      <xs:element name="startDate" type="ns1:Date"/>
      <xs:element name="endDate" type="ns1:Date"/>
      <xs:element name="detailTable" type="tns:DetailTable"/>
    <xs:attribute name="id" type="xs:int"/>
  <xs:complexType name="LookupTableList">
      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:lookupTable"/>
    <xs:attribute name="totalTables" type="xs:int"/>
    <xs:attribute name="retrievedTables" type="xs:int"/>


URL invocation

POST http://localhost:8080/rest/v2/lookups/import

Java invocation
Request body
,,001,Micro VM
,,002,Small VM
,,004,Medium VM
,,008,Large VM
,,,Extra Large VM
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<itemImportResult xmlns="">
Last modified



This page has no classifications.

 (c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP