Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Introducing Reference 360
  3. Getting started with Reference 360
  4. Manage system reference data
  5. Manage reference data sets
  6. Manage code lists
  7. Manage code values
  8. Manage crosswalks
  9. Import data
  10. Manage hierarchies
  11. Manage attributes
  12. Manage workflows
  13. Manage jobs
  14. Monitor Reference 360
  15. Reference 360 REST API
  16. Glossary

Reference 360

Reference 360

Export hierarchies to a CSV file (v4)

Export hierarchies to a CSV file (v4)

Exports a hierarchy to a CSV file based on the internal ID or alias.

POST request

To export a hierarchy based on the internal ID or alias, submit a POST request with the following URI:
/rdm-service/external/v4/export
In the request header, you must specify the
Accept
attribute to
application/octet-stream
.
Use the following parameters in the request body to specify the hierarchy to export:
Field
Type
Description
delimiter
String
Delimiter used to separate values. Value must be
ASTERISK
,
CIRCUMFLEX
,
COLON
,
COMMA
,
PIPE
,
SECTION
,
SEMICOLON
,
SPACE
, or
TAB
.
codepage
String
Code page used for the export file. Value must be
UTF8
.
decimalSeparator
String
Decimal separator used for numbers. Value must be
COMMA
or
DOT
.
thousandSeparator
String
Grouping separator used for numbers. Value must be
COMMA
,
DOT
,
SPACE
,
SINGLEQUOTE
, or
NONE
.
dateFormat
String
Format used for dates. Use one of the following formats:
  • DE
    . For dd.mm.yyyy format.
  • ISO
    . For yyyy-mm-dd format.
  • US_HYPHEN
    . For mm-dd-yyyy format.
  • US_SLASH
    . For mm/dd/yyyy format.
filename
String
File name for the exported file. Value must end with the
.csv
file extension.
containerType
String
Type of asset that contains code values. Value must be
hierarchy
.
containerKey
String
Internal ID or alias of a hierarchy.
filter
Object
Optional. Filter criteria for exporting filtered code values. For more information, see Filter criteria for export version 3 and 4.
columns
Array
Optional. Attribute columns you want to export. If you don't specify attribute columns, the export includes all attribute columns.
fieldName
String
Optional. Name of attribute column to include in the exported file.
codeListId
String
The ID of the code list associated to the attribute.
excludeParentId
Boolean
Optional. Indicates whether to include the parent ID of code values in the CSV file. Value is
true
or
false
.

POST response

The response is a CSV file. The CSV file contains two header rows followed by data rows.
The CSV file uses the following columns:
status.key
and
effectiveDate
. Based on your data model, you might have additional columns in the file.

POST example

To export the code values in a hierarchy based on an internal ID or alias, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v4/export HTTP/1.1 Content-Type: application/json Accept: application/octet-stream Content-Length: 456 IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX { "delimiter": "SEMICOLON", "textQualifier": "DOUBLE_QUOTE", "startingRow": "0", "codepage": "UTF8", "dateFormat": "ISO", "filename": "export.csv", "containerType": "hierarchy", "containerKey": "colour_hierarchy" }
To export code values with
US
in the Name attribute, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v4/export HTTP/1.1 Content-Type: application/json Accept: application/octet-stream Content-Length: 346 IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX { "delimiter":"SEMICOLON", "codepage":"UTF8", "decimalSeparator":"COMMA", "thousandSeparator":"DOT", "dateFormat":"ISO", "filename":"export.csv", "containerType":"crosswalk", "containerKey":"country_hierarchy", "filter": { "_and": [ { "Name": { "_contains": "US" } } ] } }
The following sample response shows the exported data in a CSV file:
HTTP/1.1 200 OK Content-Disposition: attachment;filename=testdata.csv Content-Type: application/octet-stream Content-Length: 140 Code,Description,Name,status,effectiveDate,parentCode Code,Description,Name,status,effectiveDate,parentCode B,,B,,, Black,,Black,,,B Blue,,Blue,,,B
For more information about exporting filtered code values, see Exporting filtered code values.

0 COMMENTS

We’d like to hear from you!