Reference 360 > Reference 360 REST API > export version 2
  

export version 2

Use this resource to export data to CSV or JSON format. You can export code values in a code list, value mappings in a crosswalk, or relationships in a hierarchy.

Export code values to a CSV file

Exports the code values in a code list to a CSV file.

POST request

To export code values in a code list, submit a POST request with the following URI:
/rdm-service/external/v2/export
Note: 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 code list 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. 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 codelist.
containerId
String
The ID of the code list.
Note: You can find the ID of assets in Reference 360 or use REST APIs to retrieve the IDs. For more information, see Asset IDs.
filter
Object
Optional. Filter criteria for exporting filtered code values. For more information, see Filter criteria for export version 2 and 3.
columns
Array
Optional. Attribute columns you want to export. If you do not specify attribute columns, the export includes all attribute columns.
fieldName
String
Optional. Name of attribute column to include in the exported file.
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 contains 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 code list, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/export HTTP/1.1
Content-Type: application/json
Accept: application/octet-stream
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"delimiter":"SEMICOLON",
"codepage":"UTF8",
"decimalSeparator":"COMMA",
"thousandSeparator":"DOT",
"dateFormat":"ISO",
"filename":"testdata.csv",
"containerType":"codelist",
"containerId":"dd318e233414acf05ffa451b",
"columns":[
{
"fieldName":"Name"
},
{
"fieldName":"Code"
}
],
"excludeParentId":false
}
To export code values with Jo in the Name attribute, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/export HTTP/1.1
Content-Type: application/json
Accept: application/octet-stream
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"delimiter":"SEMICOLON",
"codepage":"UTF8",
"decimalSeparator":"COMMA",
"thousandSeparator":"DOT",
"dateFormat":"ISO",
"filename":"testdata.csv",
"containerType":"codelist",
"containerId":"dd318e233414acf05ffa451b",
"filter":{
"_and":[
{
"Name":{
"_contains":"Jo"
}
}
]
},
"columns":[
{
"fieldName":"Name"
},
{
"fieldName":"Code"
}
],
"excludeParentId":false
}
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: 130

Name,Code
Name0,Code0
Name1,Code1
Name2,Code2
Name3,Code3
Name4,Code4
Name5,Code5
Name6,Code6
Name7,Code7
Name8,Code8
Name9,Code9
For more information about exporting filtered code values, see Exporting filtered code values.

Export code values to JSON format

Exports the code values in a code list to the JSON format.

POST request

To export code values in a code list, submit a POST request with the following URI:
/rdm-service/external/v2/export
Note: In the request header, you must specify the Accept attribute to application/json.
Use the following parameters in the request body to specify the code list to export:
Field
Type
Description
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. For mm/dd/yyyy format.
containerType
String
Type of asset that contains code values. Value must be codelist.
containerId
String
The ID of the code list.
Note: You can find the ID of assets in Reference 360 or use REST APIs to retrieve the IDs. For more information, see Asset IDs.
filter
Object
Optional. Filter criteria for exporting filtered code values. For more information, see Filter criteria for export version 2 and 3.

POST response

The response is in JSON format.

POST example

To export the code values in a code list, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/export HTTP/1.1
Content-Type: application/json
Accept: application/json
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"dateFormat":"ISO",
"containerType":"codelist",
"containerId":"1c03a6555058fdd134f7f417",
"filter":{
"_and":[
{
"Name":{
"_eq":"ABC University"
}
}
]
}
}
The following sample response shows the exported data in JSON format:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 292

{
"content":[
{
"Code":"UNIVERSITY-001",
"children":[
{
"Code":"STUDENT-1001",
"fields":{
"Code":"STUDENT-1001",
"Name":"BKImL"
}
}
],
"fields":{
"Code":"UNIVERSITY-001",
"Name":"ABC University"
}
}
]
}

Export value mappings to a CSV file

Exports the value mappings in a crosswalk to a CSV file.

POST request

To export value mappings in a crosswalk, submit a POST request with the following URI:
/rdm-service/external/v2/export
Note: 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 crosswalk 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. 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 value mappings. Value must be crosswalk.
containerId
String
The ID of the crosswalk.
Note: You can find the ID of assets in Reference 360 or use REST APIs to retrieve the IDs. For more information, see Asset IDs.

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 value mappings in a crosswalk, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/export HTTP/1.1
Content-Type: application/json
Accept: application/octet-stream
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"delimiter" : "SEMICOLON",
"codepage" : "UTF8",
"decimalSeparator" : "COMMA",
"thousandSeparator" : "DOT",
"dateFormat" : "ISO",
"filename" : "testdata.csv",
"containerType" : "crosswalk",
"containerId" : "5d123f6e4077c700010d59e4"
}
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: 578

sourcePKey,_from.id.sourcePKey,_to.id.sourcePKey
sourcePKey,_from.id.sourcePKey,_to.id.sourcePKey
sourceCode0_targetCode0,sourceCode0,targetCode0
sourceCode1_targetCode1,sourceCode1,targetCode1
sourceCode2_targetCode2,sourceCode2,targetCode2
sourceCode3_targetCode3,sourceCode3,targetCode3
sourceCode4_targetCode4,sourceCode4,targetCode4
sourceCode5_targetCode5,sourceCode5,targetCode5
sourceCode6_targetCode6,sourceCode6,targetCode6
sourceCode7_targetCode7,sourceCode7,targetCode7
sourceCode8_targetCode8,sourceCode8,targetCode8
sourceCode9_targetCode9,sourceCode9,targetCode9

Export value mappings to JSON format

Exports the value mappings in a crosswalk to the JSON format.

POST request

To export value mappings in a crosswalk, submit a POST request with the following URI:
/rdm-service/external/v2/export
Note: In the request header, you must specify the Accept attribute to application/json.
Use the following parameters in the request body to specify the crosswalk to export:
Field
Type
Description
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. For mm/dd/yyyy format.
containerType
String
Type of asset that contains code values. Value must be crosswalk.
containerId
String
The ID of the crosswalk.
Note: You can find the ID of assets in Reference 360 or use REST APIs to retrieve the IDs. For more information, see Asset IDs.

POST response

The response is in JSON format.

POST example

To export the value mappings in a crosswalk, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/export HTTP/1.1
Content-Type: application/json
Accept: application/json
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"dateFormat" : "ISO",
"containerType" : "crosswalk",
"containerId" : "1c03a6555058fdd134f7f417"
}
The following sample response shows the exported data:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 234

{
"content":[
{
"fields":{
"toCode":"DEU",
"fromCode":"DE"
},
"sourcePKey":"DE_DEU"
},
{
"fields":{
"toCode":"AFG",
"fromCode":"AF"
},
"sourcePKey":"AF_AFG"
}
]
}

Export hierarchies to a CSV file

Exports a hierarchy to a CSV file.

POST request

To export a hierarchy, submit a POST request with the following URI:
/rdm-service/external/v2/export
Note: 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. 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.
containerId
String
The ID of the hierarchy.
Note: You can find the ID of assets in Reference 360 or use REST APIs to retrieve the IDs. For more information, see Asset IDs.
filter
Object
Optional. Filter criteria for exporting filtered code values. For more information, see Filter criteria.
columns
Array
Optional. Attribute columns you want to export. If you do not 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, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/export HTTP/1.1
Content-Type: application/json
Accept: application/octet-stream
Content-Length: 456
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"delimiter":"SEMICOLON",
"codepage":"UTF8",
"decimalSeparator":"COMMA",
"thousandSeparator":"DOT",
"dateFormat":"ISO",
"filename":"testdata.csv",
"containerType":"hierarchy",
"containerId":"7681b69b2f02a8f81389307d",
"columns":[
{
"fieldName":"Name",
"codeListId":"5495ed772814d1a29c588599"
},
{
"fieldName":"Code",
"codeListId":"5495ed772814d1a29c588599"
}
],
"excludeParentId":false
}
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/v2/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":"testdata.csv",
"containerType":"crosswalk",
"containerId":"350e0fcf85d589f5578226e9",
"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

Name,Code
Name,Code
Name0,Code0
Name1,Code1
Name2,Code2
Name3,Code3
Name4,Code4
Name5,Code5
Name6,Code6
Name7,Code7
Name8,Code8
Name9,Code9
For more information about exporting filtered code values, see Exporting filtered code values.

Export hierarchies to JSON format

Exports a hierarchy to the JSON format.

POST request

To export a hierarchy, submit a POST request with the following URI:
/rdm-service/external/v2/export
Note: In the request header, you must specify the Accept attribute to application/json.
Use the following parameters in the request body to specify the hierarchy to export:
Field
Type
Description
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. For mm/dd/yyyy format.
containerType
String
Type of asset that contains code values. Value must be hierarchy.
containerId
String
The ID of the code list.
Note: You can find the ID of assets in Reference 360 or use REST APIs to retrieve the IDs. For more information, see Asset IDs.
excludeParentId
Boolean
Optional. Indicates whether to include the parent ID of code values in the CSV file. Value is true or false.
includeAssetName
Boolean
Optional. Indicates whether to include the Name field of code lists in the JSON file. Value can be true or false. Default is false.

POST response

The response is in JSON format.

POST example

To export a hierarchy, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/export HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 163
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"dateFormat":"ISO",
"containerType":"hierarchy",
"containerId":"cbf658b0c0cb82c8323ed9d5",
"excludeParentId":false,
"includeAssetName":true
}
The following sample response shows the exported data in JSON format:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1114

{
"content":[
{
"Code":"root1",
"children":[
{
"Code":"child1_1",
"codeListId":"Id of Child 1",
"codeListName":"Name of Child 1",
"fields":{
"Name":"Name of child 1.1",
"Code":"child1_1"
}
},
{
"Code":"child1_2",
"codeListId":"Id of Child 1",
"codeListName":"Name of Child 1",
"fields":{
"Name":"Name of child 1.2",
"Code":"child1_2"
}
}
],
"fields":{
"Name":"Name of root 1",
"Code":"root1"
}
},
{
"Code":"root2",
"children":[
{
"Code":"child2_1",
"codeListId":"Id of Child 2",
"codeListName":"Name of Child 2",
"fields":{
"Name":"Name of child 2.1",
"Code":"child2_1"
}
},
{
"Code":"child2_2",
"codeListId":"Id of Child 2",
"codeListName":"Name of Child 2",
"fields":{
"Name":"Name of child 2.2",
"Code":"child2_2"
}
}
],
"fields":{
"Name":"Name of root 2",
"Code":"root2"
}
}
]
}