Home > Cloud Cruiser 3 > REST API reference > Translation tables > Import a translation table from CSV

Import a translation table from CSV

Creates a translation table by importing data in CSV format.

Resource URL

POST http://<ccServerURL>/rest/v1/translations/import/<title>

Request

Parameters
  Name Type Description
URL path parameters (required) title string The title for the new translation table
URL query parameters (optional) description string A description for the new translation table
startDate string The starting date for the single effective date range of the new table, in yyyyMMdd format. Default is today's date.
endDate string The ending date for the single effective date range of the new table, in yyyyMMdd format. Default is 29991231.
Content-Type

text/csv

Body

The translation table in the CSV format described in Managing translation tables using flat files.

Response

Content-Type

application/xml

Body

The results of the import, as XML text with a root element of type itemImportResult​. The results specify which records were created, updated, and duplicate.

Schema


This XML schema describes the results of a translation table import from CSV.

<xs:element name="itemImportResult" type="tns:ItemImportResult"/>  
<xs:complexType name="ItemImportResult">
  <xs:sequence>
    <xs:element name="importedSummary">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="totalItems" type="xs:int"/>
          <xs:element name="newItems" type="xs:int"/>
          <xs:element name="duplicateItems" type="xs:int"/>
          <xs:element name="updatedItems" type="xs:int"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="newItemNames">
      <xs:complexType>
        <xs:sequence>
          <xs:element maxOccurs="unbounded" name="newItemName" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="duplicateItemNames">
      <xs:complexType>
        <xs:sequence>
          <xs:element maxOccurs="unbounded" name="duplicateItemName" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="updatedItemNames">
      <xs:complexType>
        <xs:sequence>
          <xs:element maxOccurs="unbounded" name="updatedItemName" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
  </xs:sequence>
</xs:complexType>

Example

URL invocation

POST http://localhost:8080/rest/v1/translations/import/test-3

Java invocation

ItemImportResult result= translateServiceProxy.importTranslationFromCSV(“test-3”);

Request body
  ,ak,,B-AA-KKKK-11
  ,al,,B-AA-LLLL-11
  ,ar,,B-AA-MMMM-11
  ,az,,B-AA-NNNN-11
  ,ca,,B-AA-OOOO-11
  ,co,,B-BB-KKKK-11
  ,ct,,B-BB-LLLL-11
  ,wv,,B-JJ-NNNN-EE
  ,wy,,B-JJ-OOOO-EE
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<itemImportResult xmlns="http://www.cloudcruiser.com/webservices/v1/Common">
  <importedSummary>
    <totalItems>9</totalItems>
    <newItems>9</newItems>
    <duplicateItems>0</duplicateItems>
    <updatedItems>0</updatedItems>
  </importedSummary>
  <newItemNames>
    <newItemName>ak</newItemName>
    <newItemName>al</newItemName>
    <newItemName>ar</newItemName>
    <newItemName>az</newItemName>
    <newItemName>ca</newItemName>
    <newItemName>co</newItemName>
    <newItemName>ct</newItemName>
    <newItemName>wv</newItemName>
    <newItemName>wy</newItemName>
  </newItemNames>
</itemImportResult>
Last modified

Tags

Classifications

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