Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scripting_function


Panel
titleDescription

Queries an audit profile for audit history. Returns the results as a dataset.

Panel
titleClient Permission Restrictions

This scripting function has no Client Permission restrictions.

New_in
Version8.0.3


In version 8.0.3 this function was added to the gateway scope, using the syntax listed below:

Panel
titleSyntax

system.util.queryAuditLog(auditProfileName, [startDate], [endDate], [actorFilter], [actionFilter], [targetFilter], [valueFilter], [systemFilter], [contextFilter])


  • Parameters

String auditProfileName - The name of the audit profile to pull the history from. 

Date startDate - The earliest audit event to return. If omitted, the current time - 8 hours will be used. [optional]

Date endDate - The latest audit event to return. If omitted, the current time will be used. [optional]

String actorFilter - A filter string used to restrict the results by actor. [optional]

String actionFilter - A filter string used to restrict the results by action. [optional]

String targetFilter - A filter string used to restrict the results by target. [optional]

String valueFilter - A filter string used to restrict the results by value. [optional]

String systemFilter - A filter string used to restrict the results by system. [optional]

Integer contextFilter - A bitmask used to restrict the results by context. 0x01 = Gateway, 0x02 = Designer, 0x04 = Client. [optional]

  • Returns

Dataset - A dataset with the audit events from the specified profile that match the filter arguments.

  • Scope

    Gateway



Panel
titleSyntax

system.util.queryAuditLog([auditProfileName], [startDate], [endDate], [actorFilter], [actionFilter], [targetFilter], [valueFilter], [systemFilter], [contextFilter])

  • Parameters

String auditProfileName - The name of the audit profile to pull the history from. [optional] (Note that the project must have an Audit Profile configured in Project Properties. Otherwise this parameter is mandatory)

Date startDate - The earliest audit event to return. If omitted, the current time - 8 hours will be used. [optional]

Date endDate - The latest audit event to return. If omitted, the current time will be used. [optional]

String actorFilter - A filter string used to restrict the results by actor. [optional]

String actionFilter - A filter string used to restrict the results by action. [optional]

String targetFilter - A filter string used to restrict the results by target. [optional]

String valueFilter - A filter string used to restrict the results by value. [optional]

String systemFilter - A filter string used to restrict the results by system. [optional]

Integer contextFilter - A bitmask used to restrict the results by context. 0x01 = Gateway, 0x02 = Designer, 0x04 = Client. [optional]

  • Returns

Dataset - A dataset with the audit events from the specified profile that match the filter arguments.

  • Scope

    Perspective Session, Vision Client

Panel
titleCode Examples
Code Block
languagepy
# This script will queryqueries an audit log, and checkchecks to see if a user john made any tag writes in the last 8 hours
# (since the startDate parameter is omitted), and writewrites the results to a table
.   
data = system.util.queryAuditLog(auditProfileName='AuditLog', actorFilter='john', actionFilter='tag write')
 
event.source.parent.getComponent("Table").data = data
Panel
titleKeywords

system util queryAuditLog, util.queryAuditLog