Audit Log

The following methods allow for interaction into the Tenable Vulnerability Management audit log API endpoints.

Methods available on io.audit_log:

class AuditLogAPI(api: restfly.session.APISession)[source]
events(*filters, **kw)[source]

Retrieve audit logs from Tenable Vulnerability Management.

audit-log: events

Parameters
  • *filters (tuple, optional) –

    Filters to allow the user to get to a specific subset of data within the audit log. For a more detailed listing of what filters are available, please refer to the API documentation linked above, however some examples are as such:

    • ('date', 'gt', '2017-07-05')

    • ('date', 'lt', '2017-07-07')

    • ('actor_id', 'match', '6000a811-8422-4096-83d3-e4d44f44b97d')

    • ('target_id', 'match', '6000a811-8422-4096-83d3-e4d44f44b97d')

  • limit (int, optional) – The limit of how many events to return. The API will default to 50 unless otherwise specified.

Returns

List of event records

Return type

list

Examples

>>> events = tio.audit_log.events(
...     ('date', 'gt', '2018-01-01'), limit=100)
>>> for e in events:
...     pprint(e)