Audit Logs Operations Export Csv

Audit Logs Operations Export Csv
Export every audit record that matches the list filters as CSV

CSV of every audit record that matches the Audit Logs list filters (the same filters as /api/v1/audit-logs), not paginated and newest first in descending audit ID order. The rows are read in one consistent snapshot taken when the export starts, so records written, changed or purged during the export neither appear twice nor go missing, and the export never contains its own audit record. The response is text/csv with charset UTF-8, sent as an attachment named audit-logs-export-YYYY-MM-DD.csv (the current UTC date) with caching disabled. The first line is the header row, in this order, Audit ID, Timestamp (UTC), Actor, Actor IP, Action, Target Type, Target ID, Target Name, Outcome, Details. Audit ID is an unquoted number; the other columns are enclosed in double quotes with embedded quotes doubled, and a value whose first non-space character is =, +, -, @, tab, CR or LF is prefixed with a single quote. Timestamp (UTC) is an ISO-8601 UTC instant and Details is the stored JSON object as text (empty when there are none). An unknown outcome, or from later than to, answers 400 INVALID_FILTER before any CSV is written. A failure after streaming has started aborts the connection, so the download fails instead of ending early. Requires the ADMIN, SECURITY_OPERATOR or AUDITOR role, the same roles that can read audit logs. Every attempt is audited (AUDIT_LOGS_EXPORTED with the row count, or AUDIT_LOGS_EXPORT_FAILED); the search text itself is not stored

Request
URI
GET
https://{api_host}/api/v1/audit-logs/export
COPY
Query Parameters
string
q
Optional

Substring search matching actor username, action or target name

q example
alice
string
actor
Optional

Filter by actor username (case-insensitive exact match)

actor example
alice.example
string
action
Optional

Filter by action identifier

action example
PREFERENCE_UPDATE
string
targetType
Optional

Filter by target resource domain. Either one of the Audit Logs Type categories (POLICY, RULE, GROUP, USER, SESSION, HYPERVISOR, ALERT, PREFERENCE, REPORT, SYSTEM), which covers every stored target type of that category (for example USER also covers HYPERVISOR_USER, HYPERVISOR_USER_GROUP and API_TOKEN; SYSTEM also covers SETTING, SSO_SETTINGS, RULE_PACK, DATABASE and SyslogForwarder; REPORT also covers AUDIT_LOG; RULE also covers FILE_CATALOG), or one exact stored target type. AUTH and AUTHENTICATION are accepted as aliases of SESSION and GROUPS of GROUP

targetType example
PREFERENCE
string
outcome
Optional

Filter by event outcome (SUCCESS or FAILURE, case-insensitive)

outcome example
SUCCESS
string
from
Optional

Start timestamp filter (inclusive), ISO 8601 date-time with an offset (for example 2026-01-15T09:30:00Z or 2026-01-15T11:30:00+02:00); any offset is accepted

from example
2026-01-15T09:30:00Z
string
to
Optional

End timestamp filter (inclusive), ISO 8601 date-time with an offset (for example 2026-01-15T09:30:00Z); any offset is accepted

to example
2026-01-16T09:30:00Z

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK CSV file stream. Every matching audit record, sent as an attachment named audit-logs-export-YYYY-MM-DD.csv

"Audit ID,Timestamp (UTC),Actor,Actor IP,Action,Target Type,Target ID,Target Name,Outcome,Details\n2002,\"2026-09-30T09:27:05Z\",\"admin\",\"192.0.2.15\",\"ALERT_ACKNOWLEDGE\",\"ALERT\",\"1001\",\"Alert #1001\",\"SUCCESS\",\"{\"\"newState\"\":\"\"ACKNOWLEDGED\"\"}\"\n"

400

400 Bad Request: INVALID_FILTER when outcome is not SUCCESS or FAILURE, or from is later than to; INVALID_ARGUMENT when from or to is not an ISO-8601 date-time

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


401

401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked

Returns Unauthenticated of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


403

403 Forbidden: FORBIDDEN when the signed-in role is not allowed to call this operation; PASSWORD_CHANGE_REQUIRED when the account must change its password first (only GET /api/v1/auth/session, POST /api/v1/auth/logout and POST /api/v1/auth/change-password are exempt); LICENSE_REQUIRED or LICENSE_EXPIRED while the license pool is restricted (no license, or expired past grace) (exempt: every route under /api/v1/auth, GET /api/v1/user/preferences, GET /api/v1/licensing/summary and POST /api/v1/licensing/licenses)

Returns ForbiddenRead of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/audit-logs/export