Send a POST request to create a relationship between a data set and a data element.
To create a relationship, submit a request using the following method and endpoint, specifying the IDs of the assets you want to relate, along with the relationship type and scheme.
The following table describes the important parameters that you can specify in the request URL:
Parameter
Description
from_id, to_id
Enter the source and target IDs of the assets between which you want to create a relationship. For IDs, you can enter either the internal IDs or the unique reference IDs of the asset.
Note: You can enter either the internal ID or the external ID for the source and target assets. Do not enter the internal ID of one asset and the external ID of the other asset.
relationship_type
The type of relationship you want to create between the assets.
scheme
Specify the type of asset IDs that you have entered in the <from_id> and <to_id> parameters. Enter one of the following values:
- internal. Indicates that the asset ID that you specify in the request is the internal ID of the asset.
- external. Indicates that the asset ID that you specify in the request is the unique reference ID of the asset.
Note: You can obtain the core.identity ID by checking the user details in the search API. You can enter either internal ID or external ID to create relationships. For more information on the search API, see Search for assets.
The base API URL differs for each pod. For more information, see Send Requests.
The following table describes the possible response body parameters for creating relationships:
Parameter
Type
Description
relationship
Object
Contains details of asset relationships, including neighboring assets and paths that describe how these assets are connected through specific relationship type, such as data governance associations between data sets and data elements.
relationship.neighbors
Array
List of assets related to the requested asset.
relationship.neighbors.paths
Array
Paths describing how the related assets are linked, including a serialized representation of how these assets are connected through specific relationship type.
links
String
List of actionable links for updating (PATCH) or deleting (DELETE) the asset relationships.
links[].rel
String
The type of operation for the link (e.g. patch-relationship, delete-relationship).
links[].href
String
Endpoint URL for performing the specified operation.
links[].method
String
HTTP method used for the specified operation (e.g., PATCH, DELETE).
Example Request
The following is an example of the request parameters to create a relationship between two assets:
POST https://idmc-api.dm-us.informaticacloud.com/data360/content/v1/assets/9c3f035c-ae6a-49a3-91f5-b0f5793560e7/com.infa.ccgf.models.governance.asscDataSetDataElement/7128bad6-45f0-4acc-b422-c8b37a020087?scheme=external Authorization: Bearer <jwt_token> Accept: application/jsonContent Type: application/jsonBody
Example response
The following example shows the response of the POST request to create relationships between two assets: