To get the audit history of a specific asset, send a GET request using the audit API. Specify the asset ID in the endpoint and use the request URL parameters to sort, filter, and specify other details of the audit history that you want to view.
The following table provides the HTTP method and endpoint for the API call:
The <baseApiUrl> differs for each pod. For more information about the base API URL, see Send requests.
The <assetID> that you enter can be the internal ID or the external ID of the asset. You can specify in the scheme parameter of the request URL whether you want to retrieve the asset by external ID or internal ID.
Request parameters
In the request URL parameters, specify the type of asset ID that you want to use to retrieve the asset. You can additionally specify whether you want to view the audit history of the child assets in the hierarchy, pagination, and sorting parameters along with the other audit history details that you want the request to return.
The following table describes the parameters that you can specify in the request URL:
Parameter
Description
scheme
Specify the type of asset ID you want to use to retrieve assets. 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.
hierarchyOptions
Specify whether you want to get the audit history of the assets in the hierarchy of the open asset. Enter one of the following values:
- EXCLUDE HIERARCHY. Returns the audit history of only the specified asset.
- INCLUDE ALL CHILDREN. Returns the audit history of the specified asset and all its associated child assets.
- INCLUDE IMMEDIATE CHILDREN. Returns the audit history of the immediate child assets of the specified asset.
The default value is EXCLUDE HIERARCHY.
filters
Specify the fields and values of the audit events that you want the API to use to filter the results. The request returns the audit events based on the fields that you apply as filters. Use the following format to apply filters:
field name:operator:(field value)
You can apply filters on one or more field names from the following list:
- timestamp. Specify the date and time on which the asset was last updated. To specify the time range, use the following operators:
- GE. Greater than equal to
- LE. Less than equal to
For example, enter the following: timestamp:GE:(2024-01-29T18:21:14.564Z).
- eventType. Specify the events that include any changes to the asset, relationships, or stakeholders. For example, enter the following: eventType:IN:(Stakeholder,Relationship).
- action. Specify the actions that are performed on the asset. For example, enter the following: action:IN:(CREATE).
- changedAttributes. Specify the changed attribute of the asset. Your request can contain the following attributes:
- com.infa.odin.models.file.path
- core.assetLifecycle
- core.changedatacapture.audience
- core.changedatacapture.hiSequenceNo
- core.changedatacapture.lowSequenceNo
- core.changedatacapture.requestid
- core.changedatacapture.status
- core.changedatacapture.traceid
- core.createdOn
- core.identity
- core.name
- core.reference
- core.resourceType
- core.sourceModifiedOn
For example, enter the following: changedAttributes:IN:(com.infa.odin.models.file.path,core.resourceType,core.reference,core.name,core.assetLifecycle,core.sourceModifiedOn).
- modifiedBy. Specify the ID of the user who has performed any action on the asset. For example, enter the following: modifiedBy:IN:datastewards_org.
offset
Specify a numeric value to set an offset for pagination. The default value is zero.
limit
Specify a numeric value between 1 to 100 for the number of records that you want to view on the page. The default value is 100.
sort
Sort the order of the events of the audit history by timestamps, event type, action, or the user ID who modified the asset. By default, the audit history of each asset is sorted in the descending order of the time of its events.
For example, you can enter timestamp:ASC to sort the events of the audit history of assets in the ascending order of the time of their events.
Example request
Get the audit history of a specific asset
The following example shows the GET request to get the audit history of an asset based on the external ID specified in the endpoint. The response returns audit events that are generated after the specified date and time. The response returns a maximum of 100 records per page in the descending order of the event types.
GET https://idmc-api.dm-us.informaticacloud.com/data360/audit/v1/assets/50K_BT_CDGC_34/events?scheme=EXTERNAL&offset=0&limit=100&sort=eventType:DESC,filter=timestamp:GE:(2024-01-29T18:21:14.564Z)
Get the audit history of an asset and all its child assets
The following example shows the GET request to get the audit history of an asset and all its child assets based on the hierarchyOptions parameter. The response returns a maximum of 100 records per page in the ascending order of the date and time of the events.
GET https://idmc-api.dm-us.informaticacloud.com/data360/audit/v1/assets/50K_BT_CDGC_34/events?scheme=EXTERNAL&hierarchyOptions=INCLUDE_ALL_CHILDREN&offset=0&limit=100&sort=eventId:DESC,timestamp:ASC