Use the API to add relationships - Data360_Govern - Latest

Data360 Govern Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Precisely Data Integrity Suite > Govern
Data360 Govern
Version
Latest
Language
English
Product name
Data360 Govern
Title
Data360 Govern Help
Copyright
2024
First publish date
2014
Tip: If you are not already familiar with the Data360 Govern API, see API documentation for a general introduction.

The example requests in this topic use Curl syntax to show all of the information that is required in a request, including request headers, methods, endpoints, and data, as well as mandatory and optional parameters. Additionally, for each request, the same header information is displayed in a separate block for use when connecting to the Data360 Govern API via an API client.

1. Identify the relationship type UID

  1. Navigate to the Configuration > Relationships page.
  2. Locate the relationship in the Relationship Types panel and click the information icon to display the "Intersect Type" UID value.

In this example the relationship is "Reports References Investments" and the UID value is 918d2b69-0275-48e0-8012-481b63c8f7d6.

2. Identify the relationship subject and object

When you create a new relationship via the API, you need to include the UID of the subject and the UID of the object in your request.

  1. Navigate to the detail page of the Report asset that you want to be the subject of the relationship, and copy the UID value.
  2. Navigate to the detail page for the Investment asset that you want to be the object of the relationship, and copy the UID value.

For example:

  • Subject (Report asset "Investments report") - 8dab72ca-5679-4144-8395-b1850ff39278
  • Object (Investment asset "Investor 3") - 52ea5336-3377-46e8-837a-03f4ab9a5142

3. Post a new relationship

Use the POST /api/v2/relationships/{intersectTypeUid} endpoint to add a new relationship between the specified assets.

Example request

The intersectTypeUID is the relationship type UID value that you obtained in step one.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[ \ 
    { \ 
        "SubjectAssetUid": "8dab72ca-5679-4144-8395-b1850ff39278", \ 
        "ObjectAssetUid": "52ea5336-3377-46e8-837a-03f4ab9a5142", \ 
        "Fields": {} \ 
    } \ 
  ]' 'https://example.data3sixty.com/api/v2/relationships/918d2b69-0275-48e0-8012-481b63c8f7d6?triggerWorkflow=true'

The following example shows the header information for the same request for use when connecting to the Data360 Govern API via an API client:

POST https://example.data3sixty.com/api/v2/dataquality/relationships/918d2b69-0275-48e0-8012-481b63c8f7d6?triggerWorkflow=true HTTP/1.1 
Authorization: <API Key>;<API Secret>
Content-Type: application/json
Accept: application/json

Request body:

[
	{
		"SubjectAssetUid": "8dab72ca-5679-4144-8395-b1850ff39278",
		"ObjectAssetUid": "52ea5336-3377-46e8-837a-03f4ab9a5142",
		"Fields": {}
	}
]
Tip: In this example, the request URL includes the following optional query parameter:https://example.data3sixty.com/api/v2/dataquality/relationships/918d2b69-0275-48e0-8012-481b63c8f7d6?triggerWorkflow=trueThis indicates that the action of adding a new relationship will trigger a workflow if there are any existing workflows built around adding or editing a relationship, and if all other conditions of the workflow are met.

Example response

[
	{
		"ItemNumber": 1,
		"IntersectID": 6537,
		"Success": true,
		"IsNew": true,
		"uid": "63b5f8bf-a31a-4afe-ba58-2201fa38f5e4"
	}
]

The newly added relationship will be displayed on the Relationships tab when viewing the detail page of either the relationship subject or object.