Developing Longview AuditQuerySpecs
Creating AuditQuerySpec documents
An AuditQuerySpec document consists of functions and comments. The AuditQuerySpec document is used in conjunction with the Application Framework commands GET METADATAAUDITRAIL and RESET METADATAAUDITTRAIL to query specific metadata audit details, and to reset specific metadata audit trail activity.
Using AuditQuerySpec functions
The following table lists the functions that are used in a AuditQuerySpec document. Click the links to view detailed usage and syntax information.
CategoryFilter
Use this function to retrieve metadata or reset audit trail activity for a subset of categories. The Category function in a AuditQuerySpec document has the following syntax:
Syntax:
CategoryFilter Category1|Catetgory2|..|CategoryN
where:
-
CategoryN is one of the following:
Field Description ALL
All Activity Types
ATTRIBUTE
Attribute Maintenance Activity
AUTHORIZATION
Authorization Maintenance Activity
GROUP
Group Maintenance Activity
GROUPMEMBERSHIP
Group Membership Activity
METADATA
Metadata Audit Trail Activity. Applies to GET METADATAAUDITTRAIL only.
ROLE
Role Maintenance Activity
SYMBOL
Symbol Maintenance Activity
USER
User Maintenance Activity
Syntax example:
CATEGORY USER|GROUP|GROUPMEMBERSHIP
DateFilter
Use this function to indicate whether to download metadata audit trail information associated with a particular date or range of dates.
The DateFilter function in an AuditDataSpec document has the following syntax:
Syntax:
DateFilter startRange, TO, endRange
where:
- startRange is the starting range for the date in YYYY-MM-DD format.
- endRange is the ending range for the date in YYYY-MM-DD format.
UserFilter
Use this function to indicate whether to filter metadata audit trail information associated with a particular user who initiated the metadata activity.
Syntax:
UserFilter userID|ALL
where:
- userID is the user to specify.
- ALL specifies that metadata audittrail should be retrieved for all users who initiated metadata activity.
Note: To specify a specific Date, use the same value for the parameters startRange and endRange.
Syntax example:
USERFILTER user123
USERFILTER ALL
Using commands and functions that reference AuditQuerySpec documents
The following Longview Application Framework commands can reference a AuditQuerySpec document:
- Get MetadataAuditTrail
- Reset MetadataAuditTrail
For more information on these and other commands and functions, see Developing Longview Procedures.
Sample AuditQuerySpec document
The following example illustrates an AuditQuerySpec document named AuditQuery.lvaud.
Note: To add a comment to syntax, insert two forward slashes ( // ) at the beginning of the comment.
AuditQuerySpec syntax example
// Sample comment
DATEFILTER 2018-09-05, TO, 2018-09-30
CATEGORYFILTER USER|GROUP|GROUPMEMBERSHIP
USERFILTER ALL