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. Reference 360 REST API
  15. Glossary

Reference 360

Reference 360

Export hierarchies to JSON format

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
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.
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" } } ] }

0 COMMENTS

We’d like to hear from you!