Data360 Govern

 View Only
  • 1.  Audit log availability in the API

    Posted 01-14-2020 06:26

    At the moment, it doesn't sound possible to access the audit log (in read mode) to track the history of all the changes on a specific business asset. Should it be possible to have access to this through the API?



  • 2.  RE: Audit log availability in the API

    Employee
    Posted 01-14-2020 07:56

    It's possible to query audit information from the database. There's currently an enhancement request in place to add an API to retrieve the same information.

    Here's some queries to pull audit information. These queries may take a minute to run, depending on how many audit records are in your instance. If you're looking for all audit information (this may return millions of records), you can use the first query below:

    SELECT audit.[Date]
    ,resource.[Email]
    ,audit.[ActionDescription]
    ,audit.[Object]
    ,audit.[ObjectID]
    ,audit.[ObjectName]
    ,audit.[Action]
    ,audit.[ActionObject]
    ,audit.[ActionObjectID]
    ,audit.[ActionObjectTypeName]
    ,audit.[ActionObjectName]
    FROM [reporting].[Global_Audit] audit
    JOIN [reporting].[Global_Resource] resource
    ON audit.[ResourceID] = resource.[ResourceID]
    ORDER BY audit.[Date] DESC

    If you want to filter for a specific user, you can use the query below. It adds a WHERE clause to filter by a specific email address:

    SELECT audit.[Date]
    ,resource.[Email]
    ,audit.[ActionDescription]
    ,audit.[Object]
    ,audit.[ObjectID]
    ,audit.[ObjectName]
    ,audit.[Action]
    ,audit.[ActionObject]
    ,audit.[ActionObjectID]
    ,audit.[ActionObjectTypeName]
    ,audit.[ActionObjectName]
    FROM [reporting].[Global_Audit] audit
    JOIN [reporting].[Global_Resource] resource
    ON audit.[ResourceID] = resource.[ResourceID]
    WHERE resource.[Email] = 'sample@sampleemail.com'
    ORDER BY audit.[Date] DESC