Tutorial: Query the Access Server Log Database Using the Web API⁠

Overview⁠

Access Server maintains a log database that records VPN and web service activity. You can use the Web API to query this database for troubleshooting, auditing, reporting, and monitoring purposes.

This tutorial provides example API calls to retrieve activity logs by time ranges, users, and service types.

Before you begin⁠

All examples in this tutorial assume you're connected to the Access Server console with root privileges.

About the log reporting endpoint⁠

Access Server provides the following endpoint for querying activity logs:

/api/log/reports

This endpoint can be filtered by:

  • Time range

  • User

  • Service type

  • Sort order

  • Pagination options

Customize query results⁠

The examples in this tutorial use the following settings:

  • page size: 25 — returns up to 25 records.

  • offset: 0 — starts with the first page of results.

  • order_by: timestamp — sorts by event time.

  • sort_by: desc — displays the newest events first.

Modify these values to match your reporting requirements.

Prerequisites⁠

  • Access Server 3.1.0 or newer.

  • Root privileges on your Access Server's console.

  • (Optional) A remote machine for running API calls.