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

Import hierarchy relationships (v3)

Import hierarchy relationships (v3)

Imports hierarchy relationships for code values and top-level code values into a hierarchy, with custom headers as optional settings. You can use this resource to import hierarchy relationships into a hierarchy based on the internal ID or alias.

POST request

To import hierarchy relationships based on an internal ID or alias, submit a POST request with the following URI:
/rdm-service/external/v3/import/hierarchy
The request contains form-data with two parameters:
file
Specify a CSV file that contains the hierarchy relationships. The CSV file contains one header row with two columns: Code and ParentCode. You can list the related code values below the header.
For example, you might have the following relationships in the CSV file:
Code,ParentCode C1,P1 C2,P2 C1,P3
If you import top-level code values, only use the Code column in the header row.
For example, you might have the following top-level code values:
Code P1 P2 P3
importSettings
Specify the file specific configuration and container details.
The
importSettings
includes the following attributes:
Field
Type
Description
delimiter
String
Delimiter used to separate values. Value must be
COMMA
,
SEMICOLON
,
SPACE
, or
TAB
.
textQualifier
String
Symbol used to indicate where a text begins and ends. Value must be
DOUBLE_QUOTE
,
SINGLE_QUOTE
, or
NO_QUOTE
.
codepage
String
Code page used for the import file. Value must be
UTF8
or
MS_WINDOWS
.
hierarchyKey
String
Internal ID or alias of the hierarchy to which you want to import relationships.
parentCodeListKey
String
Internal ID or alias of the parent code list.
If you import top-level code values, you do not need to provide this attribute.
childCodeListKey
String
Internal ID or alias of the child code list.
startingRow
String
Line number from which to start importing data. By default, all rows are imported.
repeatHeaders
Boolean
Optional. Indicates whether the file has two headers. Value is
true
or
false
. Default is
true
.
mappings
Object
Optional. Maps the column headers in the CSV file with the target attributes of code lists in the key-value format.
  • You can map the user-defined column name to source field name if required.
  • You can either choose to ignore the mapping or map all the columns in an import CSV file.
The key represents the header in the CSV file, and the value represents the field names in Reference 360.

POST response

The response contains details of the import job.
The following table describes the attributes in the response body:
Field
Type
Description
jobId
String
ID of the job.
state
String
Status of the job. Values are
CREATED
,
INPROGRESS
,
COMPLETED
,
SUSPENDED
,
FAILED
,
STOPPED
,
QUEUED
or
WARNING
.
startTime
Number
Time, in milliseconds, when the job started.
numOfRecordsProcessed
Number
Number of records processed.
numOfRecordsFailed
Number
Number of records that failed to be imported.
numOfRecordsSucceeded
Number
Number of records successfully imported.

POST example

To import hierarchy relationships into a hierarchy based on the internal ID or alias, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v3/import/hierarchy HTTP/1.1 Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX --6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm Content-Disposition: form-data; name=file; filename=import.csv Content-Type: text/plain --6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm Content-Disposition: form-data; name=importSettings Content-Type: application/json;charset=UTF-8 { "delimiter":"COMMA", "textQualifier":"DOUBLE_QUOTE", "startingRow":0, "codepage":"UTF8", "hierarchyId":"eeb38899dd463330df844b8e", "childCodeListId":"3ebff6c89e03c41d5dd08acc", "parentCodeListId":"68c3ba1b4c3402a7cc18169a", "mappings":{ "state":"Code", "country":"ParentCode" } }--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
The CSV file might contain the following header row and data rows:
Code,ParentCode C1,P1 C2,P2 C3,P3
To import top-level code values into a hierarchy, you might use the following request:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/import/hierarchy HTTP/1.1 Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX --6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm Content-Disposition: form-data; name=file; filename=import.csv Content-Type: text/plain --6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm Content-Disposition: form-data; name=importSettings Content-Type: application/json;charset=UTF-8 { "delimiter":"COMMA", "textQualifier":"DOUBLE_QUOTE", "startingRow":0, "codepage":"UTF8", "hierarchyId":"eeb38899dd463330df844b8e", "childCodeListId":"3ebff6c89e03c41d5dd08acc", "parentCodeListId":"68c3ba1b4c3402a7cc18169a", "mappings":{ "state":"Code", "country":"ParentCode" } }--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
The CSV file might contain the following header row and data rows:
Code P1 P2 P3
The following sample response shows that status of the import job:
{ "jobId":"32121c139c84a8edc8696c0c", "state":"INPROGRESS", "startTime":1631086520353, "numOfRecordsProcessed":100, "numOfRecordsFailed":25, "numOfRecordsSucceeded":75 }

0 COMMENTS

We’d like to hear from you!