You can use the Reference 360 REST APIs to manage hierarchies.
REST APIs to manage hierarchies
You can use a set of REST APIs to list hierarchies, list hierarchy details, list hierarchy model relationships, and import hierarchy relationships.
The following table describes the REST APIs for managing hierarchies:
REST API
Description
List hierarchies
Retrieves all hierarchies.
List hierarchy details
Retrieves the details of a hierarchy, such as the properties and status.
List hierarchy model relationships
Retrieves the relationships in a hierarchy model.
List hierarchy relationships
Imports top-level code values and relationships into a hierarchy.
Managing hierarchies
You can create hierarchies to show hierarchical relationships between code values in multiple code lists. A hierarchy consists of two components: the hierarchy model and the hierarchy tree. In the hierarchy model, you define the top-level code list and add relationships to other code lists. Then based on the hierarchy model, you can create the hierarchy tree and define relationships between the code values in the code lists.
For example, you might create a location hierarchy. First, you define the hierarchy model. You define the Region code list as the top-level code list. Then you create a parent-child relationship from the Region code list to the Enterprise Country Codes code list. Based on this hierarchy model, in the hierarchy, you create a hierarchy relationship from the North America code value to the United States code value. You create a hierarchy relationship from the North America code value to the Canada code value.
To create and manage hierarchies, perform the following actions:
1In Reference 360, create the hierarchy asset and define the hierarchy model. For more information, see Creating hierarchy models.
2Use the List hierarchies REST API to retrieve all hierarchies.
3Use the List hierarchy model relationships REST API to retrieve the relationships in a hierarchy model.
4Use the Import hierarchy relationships REST API to import relationships in a hierarchy tree.
Step 1. Get hierarchies
You can retrieve all hierarchies in Reference 360.
Before you begin, you must get a session ID. The session ID authenticates your requests. For more information, see Session IDs.
1To retrieve all hierarchies, use the List hierarchies REST API.
For more information about the List hierarchies REST API, see Get hierarchies.
For example, the following request retrieves all hierarchies:
GET https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/hierarchies HTTP/1.1 Accept: application/json IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
For example, the List hierarchies REST API returns the following hierarchies:
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Content-Length: 452 IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
You can retrieve the top-level code list and the relationships between code lists in a hierarchy model. Then, based on the hierarchy model, you can import hierarchy relationships between code values in the code lists.
To retrieve the relationships in a hierarchy model, use the List hierarchy model relationships REST API.
The child.codeListId attribute contains the top-level node relationship. For example, the first relationship in the example is the top-level node relationship.
Step 3. Import hierarchy relationships
You can import top-level code values and parent-child relationships into a hierarchy. For example, in a locations hierarchy, you might define the North America code value as a top-level code value. Then you define a relationship from the North America code value to the United States code value. You might also define a relationship from the North America code value to the Canada code value.
1To import top-level code values into a hierarchy, use the Import hierarchy relationships REST API to specify the CSV file that contains the code values.