Use the API to post data quality rule results - Data360_Govern - Latest

Data360 Govern Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 Govern
Version
Latest
ft:locale
en-US
Product name
Data360 Govern
ft:title
Data360 Govern Help
Copyright
2024
First publish date
2014
ft:lastEdition
2025-02-25
ft:lastPublication
2025-02-25T14:26:12.233000
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.

Note: You must have the required permissions to upload and edit rule results via the API and the specified assets must not be in an inactive state.

1. Identify the OwningAssetUid

Rule results must be tied to a rule that exists in your system. To relate the rule results to the rule, you must use the rule UID value (OwningAssetUid) in your request.

You can obtain the UID value of a rule by navigating to the details page of the rule.

2. Post rule results into Data360 Govern

Use the POST /api/v2/metrics/quality/results endpoint to upload data quality results to the specified rule.

Example request

In the request, you must include the following information:

  • The OwningAssetUid (rule UID value) that you obtained in step 1
  • The result values for the PassCount and FailCount
  • EffectiveDate and RunDate of the rule result, which cannot be a date in the future. You must use the yyyy-MM-dd format for the effective date and the yyyy-MM-dd HH:mm:ss format for the run date.

Optionally, you can also include the following information:

  • EvaluatedAssetUid - The UID value of a technical asset or business asset to which you want to relate the rule result. If you provide this information, the asset must not be in an inactive state and you must have the required permissions to the asset.
  • ExecutionItemUid - A UID value to identify the request. If you do not provide a value, one will be generated automatically and will be returned in the response. This value will be needed if you use the PUT /api/v2/metrics/quality/results endpoint.

This example posts data quality results for a rule which has the following UID value: 99533c04-142d-48c5-b7e8-f4e02c990085

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[ \  { \    "OwningAssetUid": "99533c04-142d-48c5-b7e8-f4e02c990085", \    "EffectiveDate": "2020-04-22", \    "RunDate": "2020-04-22 10:10:20", \    "PassCount": 20, \    "FailCount": 0 \  } \]' 'https://example.data3sixty.com/api/v2/metrics/quality/results'

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/metrics/quality/results HTTP/1.1 
Authorization: <API Key>;<API Secret>
Content-Type: application/json
Accept: application/json

Request body:

[  {    "OwningAssetUid": "99533c04-142d-48c5-b7e8-f4e02c990085",    "EffectiveDate": "2020-04-22",    "RunDate": "2020-04-22 10:10:20",    "PassCount": 20,    "FailCount": 0  }]

Example response

[  {    "Uid": "02c85456-da74-41ef-905d-6cf2d493dc9e",    "ExecutionItemUid": "4b5ef5be-cb43-4ba0-85ac-1fce602aa80c",    "Success": true  }]
Tip: The Uid value returned in the response (02c85456-da74-41ef-905d-6cf2d493dc9e) is the UID for the rule result. You can use this value with the PUT /api/v2/metrics/quality/results endpoint if you want to update any fields. See Updating rule results.

If your request is successful, you will see the updated data quality results for the specified rule on the Rules page in the UI.

For more information on data quality rules, see Quality rules.

Updating rule results

After you have loaded a rule result, you can use the PUT /api/v2/metrics/quality/results endpoint to update it. For example, to relate a specific business asset to the rule result.

1. Identify the rule result UID

The rule result UID is returned with the response when you use the POST /api/v2/metrics/quality/results endpoint. In the previous example in this topic, the Uid value was 02c85456-da74-41ef-905d-6cf2d493dc9e.

If you do not have this value to hand, you can obtain the UID value of a rule result by navigating to the Rule Results tab of a rule asset in the application. Alternatively, you can use the GET /api/v2/metrics/quality/results endpoint, as follows:

Example request

curl -X GET --header 'Accept: application/json' 'https://example.data3sixty.com/api/v2/metrics/quality/results?_owningAssetUid=99533c04-142d-48c5-b7e8-f4e02c990085'

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

https://documentation-igx.preview.data3sixty.com/api/v2/metrics/quality/results?_owningAssetUid=99533c04-142d-48c5-b7e8-f4e02c990085 HTTP/1.1 
Authorization: <API Key>;<API Secret>
Content-Type: application/json
Accept: application/json

Example response

{  "pageSize": 250,  "pageNum": 1,  "total": 2,  "items": [    {      "ResultUid": "02c85456-da74-41ef-905d-6cf2d493dc9e",      "OwningAssetUid": "99533c04-142d-48c5-b7e8-f4e02c990085",      "EvaluatedAssetUid": "00000000-0000-0000-0000-000000000000",      "EffectiveDate": "2020-04-22T00:00:00.000Z",      "RunDate": "2020-04-22T10:10:20.000Z",      "PassCount": 20,      "FailCount": 0,      "Passed": true    },    {      "ResultUid": "984bfc0c-bdbe-411e-8482-84b13133a7d3",      "OwningAssetUid": "99533c04-142d-48c5-b7e8-f4e02c990085",      "EvaluatedAssetUid": "00000000-0000-0000-0000-000000000000",      "EffectiveDate": "2020-04-22T00:00:00.000Z",      "RunDate": "2020-04-22T10:10:20.000Z",      "PassCount": 20,      "FailCount": 0,      "Passed": true    }  ]}

The response includes the rule result UID: "ResultUid": "02c85456-da74-41ef-905d-6cf2d493dc9e"

2. Update the rule result

In this example, a business asset with a UID value of 8dab72ca-5679-4144-8395-b1850ff39278 is added to the rule result, this is the EvaluatedAssetUid value. You can obtain the UID value for an asset by navigating to the detail page of the asset.

Example request

curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[ \  { \    "Uid": "99533c04-142d-48c5-b7e8-f4e02c990085", \    "EvaluatedAssetUid": "8dab72ca-5679-4144-8395-b1850ff39278", \  } \]' 'https://example.data3sixty.com/api/v2/metrics/quality/results'

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

PUT https://example.data3sixty.com/api/v2/metrics/quality/results HTTP/1.1 
Authorization: <API Key>;<API Secret>
Content-Type: application/json
Accept: application/json

Request body:

[  {    "Uid": "02c85456-da74-41ef-905d-6cf2d493dc9e",    "EvaluatedAssetUid": "8dab72ca-5679-4144-8395-b1850ff39278"  }]

In this example, the EvaluatedAssetUid is provided in the PUT request. You must include at least one of the four following optional fields in the request:

  • EvaluatedAssetUid
  • RunDate
  • PassCount
  • FailCount

Any fields that you do not provide will not be updated.

Example response

[  {    "Uid": "02c85456-da74-41ef-905d-6cf2d493dc9e",    "ExecutionItemUid": "628b96bb-2964-4485-817e-abfc18ff675f",    "Success": true  }]

3. Verify that the rule result has been updated

After updating the rule result using the PUT endpoint, you can use the GET endpoint again to verify that the EvaluatedAssetUid has been added to the rule result. The GET endpoint uses the rule UID (OwningAssetUid) that you obtained in the first step in this topic.

Example request

curl -X GET --header 'Accept: application/json' 'https://example.data3sixty.com/api/v2/metrics/quality/results?_owningAssetUid=99533c04-142d-48c5-b7e8-f4e02c990085'

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

https://documentation-igx.preview.data3sixty.com/api/v2/metrics/quality/results?_owningAssetUid=99533c04-142d-48c5-b7e8-f4e02c990085 HTTP/1.1 
Authorization: <API Key>;<API Secret>
Content-Type: application/json
Accept: application/json

Example response

The response shows that the PUT was successful and the EvaluatedAssetUid ( 8dab72ca-5679-4144-8395-b1850ff39278) has been added to the rule result (02c85456-da74-41ef-905d-6cf2d493dc9e).

{  "pageSize": 250,  "pageNum": 1,  "total": 2,  "items": [    {      "ResultUid": "02c85456-da74-41ef-905d-6cf2d493dc9e",      "OwningAssetUid": "99533c04-142d-48c5-b7e8-f4e02c990085",      "EvaluatedAssetUid": "8dab72ca-5679-4144-8395-b1850ff39278",      "EffectiveDate": "2020-04-22T00:00:00.000Z",      "RunDate": "2020-04-22T10:10:20.000Z",      "PassCount": 20,      "FailCount": 0,      "Passed": true    },    {      "ResultUid": "984bfc0c-bdbe-411e-8482-84b13133a7d3",      "OwningAssetUid": "99533c04-142d-48c5-b7e8-f4e02c990085",      "EvaluatedAssetUid": "00000000-0000-0000-0000-000000000000",      "EffectiveDate": "2020-04-22T00:00:00.000Z",      "RunDate": "2020-04-22T10:10:20.000Z",      "PassCount": 20,      "FailCount": 0,      "Passed": true    }  ]}