API - Admin Audit Logs

The admin audit log includes events that occurred in your Advanced Browser Security tenant. You can use the Advanced Browser Security Admin Audit Logs API to access the admin audit log. The Advanced Browser Security Admin Audit Logs API lets you monitor what's happening in your Advanced Browser Security Console tenant. The Admin Audit Logs API can be used by "security information and event management" (SIEM) tools to provide analysis of how your Advanced Browser Security Console tenant is being accessed. You can also use the Admin Audit Logs API to write your own applications that will show how members of your organization are using the Advanced Browser Security Console.

Advanced Browser Security maintains events in the admin audit log for 365 days.

This topic includes the following sections:

What the Admin Audit Logs API can do

The Admin Audit Logs API lets you monitor the audit events that occur in the Advanced Browser Security Console. This lets you:

  • ensure continued compliance

  • safeguard against inappropriate system access

  • audit suspicious behavior within your tenant

The Admin Audit Logs API gives Advanced Browser Security Console administrators the ability to query administrative actions in the tenant. With this API, you can:

  • automatically feed Advanced Browser Security Console access data into an SIEM or another auditing tool

  • proactively monitor for potential security issues or malicious access attempts

  • write custom apps to gain insight into how your organization uses the Advanced Browser Security Console

The Admin Audit Logs API provides insight into audit events that have actually occurred in the Advanced Browser Security Console of a tenant, and is therefore read only. There are no write methods for Admin Audit Log events.

The Advanced Browser Security Console does not perform any kind of automated intrusion detection. The Admin Audit Logs API will return the data, but cannot automatically determine or indicate whether an action was appropriate.

Who is the Admin Audit Logs API for

The Admin Audit Logs API is meant for anyone interested in programmatically monitoring audit events in a Advanced Browser Security Console tenant. This may include:

  • providers of SIEM solutions looking to integrate with the Advanced Browser Security Console

  • Advanced Browser Security Console administrators looking for insight into how their team is accessing the Advanced Browser Security Console

  • security professionals interested in actively monitoring their Advanced Browser Security Console activity for potential security issues

Using the Advanced Browser Security API to fetch Admin Audit Logs

You use PowerShell scripts to run the Advanced Browser Security API calls to fetch admin audit logs. For details on how to write PowerShell scripts that authenticate with the Advanced Browser Security Console, see API [ABS only].

The Advanced Browser Security API includes the following "admin audit log" calls:

  • GET /api/admin-audit-log-entries

    This call may include the following parameters:

    • since: Limits the response to device event entries that were generated since a specified timestamp.

    • limit: Limits the number of results that can be included in the response.

    • pageToken: A token that is used to retrieve the next page of partial results.

  • GET /api/admin-audit-log-entries/{auditlogId}

Retrieving full logs using pagination - pages of partial logs

Admin audit logs can be extremely long. The Advanced Browser Security API therefore lets you implement pagination - you can return logs that are composed of multiple pages of partial logs, that together can combine to produce the full admin audit logs. Each of these pages of partial logs is shorter and more manageable. This is achieved using a page token-based approach. For details on how to implement pagination, see API - Implementing Pagination.

Examples

Example 1: The full log

To fetch an admin audit log, use the GET ​/admin-audit-log-entries API call. For example:

inherit
(Invoke-RestMethod -Method Get -Uri "https://console.hysolate.com/api/admin-audit-log-entries" -Headers $Headers).items
  • The entries in the returned log are sorted in chronological order - the first entry is the oldest.

Example 2: Time/date limit

The full admin audit log may be very long. You can query the admin audit log, and use the since parameter to return only those events that occurred [on or] after a specified timestamp. To add the query, add a question mark [?] to the right-end of the -Uri parameter, then add the parameter name "since", add an equal sign [=], and then specify the required date/time. For example:

inherit
(Invoke-RestMethod -Method Get -Uri "https://console.hysolate.com/api/admin-audit-log-entries?since=2021-01-07T11:33:39.557Z" -Headers $Headers).items
  • The returned events are inclusive of the specified date/time.

Example 3:

You can fetch the details of a specific event in the admin audit log - based on the ID of the event. For example:

inherit
Invoke-RestMethod -Method Get -Uri "https://console.hysolate.com/api/admin-audit-log-entries/60082ff597fe4891e255ec30" -Headers $Headers

Example 4: Multiple consecutive pages, each page with a quantity limit

The full audit log may be very long. You can query the log multiple times, and use the limit and pageToken parameters together, to return only a limited number of events in each consecutive query.

This approach may be useful when the output from the admin audit log API is sent to security information and event management (SIEM) tools.

The following example returns multiple pages of events. Each page can include a maximum of 100 events.

inherit
# load $pageToken from a persistent state storage, or set to $null if missing
$pageToken = $null
 
do {
  $url = "https://console.hysolate.com/api/admin-audit-log-entries?limit=100"
  if ($null -ne $pageToken) {
    $url += "&pageToken=$pageToken"
  }
 
  $response = Invoke-RestMethod -Method Get -Uri $url -Headers $Headers
  $items = $response.items
 
  # Handle/Forward event items here
 
  $pageToken = $response.nextPageToken

} while ($items.Length -ne 0)

# store $pageToken to a persistent state storage, unless it is $null
  • For details on the events structure, refer to the documentation of this API call in Swagger.

  • For details on how to access the general Advanced Browser Security API documentation in Swagger, see API [ABS only].