All pages
Powered by GitBook
1 of 1

Loading...

System Audit Logs

Endpoints for monitoring Veza user activity

Operation
Syntax

GET /api/preview/system/audit

GET /api/preview/system/audit/action_names

GET /api/v1/system/audit/export

Audit Logs record every API call, providing a record of actions conducted within Veza. Depending on your use case, you can export a continuous list of events, or get events matching a filter, newest first by default. Developers, administrators, and security teams can use these requests to:

  • Integrate Veza with an SIEM platform or other auditing tools

  • Detect potential inappropriate access or usage

  • Get insight into how users are interacting with the Veza platform

See for more details about the audit event object.

You can also browse audit events in the Veza UI. See .

Responses will include a next_page_token. Use this page_token in the request query to get the next batch of results.

Setting a page size is required for requests. The maximum page size is currently 10,000 records.

This endpoint supports filtering by ended_at timestamp, method, user_id, url, outcome (SUCCESS or FAILURE), and action_name. The endpoint returns the newest events first. To return the oldest events first, set order_by=asc on the first request. Later pages keep the order of the first request.

You must include an ended_at GE filter that starts no earlier than 90 days ago. To set an upper bound, add an ended_at LT filter. The ended_at filter and the result order use the time the audit log stored each event, which can be later than the event's ended_at value. As a result, a filtered list can include events whose ended_at value is earlier than the filter value, and the order can differ from ended_at order.

In the examples, replace <TIMESTAMP> with an RFC 3339 time within the last 90 days, in the form YYYY-MM-DDThh:mm:ssZ.

Example:

To list the actions of a single user, add a user_id filter with the user's Veza user ID (the identity.user_id value in their audit events). The results include calls made with API keys that the user owns.

To list only failed actions, add an outcome filter. Set it to FAILURE for requests that returned an error, or SUCCESS for requests that succeeded. The values are case-sensitive.

To list the events for one action, add an action_name filter with the action's name, such as Create API Key. The filter supports only EQ, and the value is case-sensitive. Use a name returned by . Events recorded without an action name don't match, even though the API returns a name derived from the endpoint for them.

Returns the action names you can use in the action_name filter of . It requires the same role as listing audit events and returns the names sorted alphabetically.

Returns a paginated list of events, intended for exporting entries into an external log management system.

To ingest events as they become available without skipping any entries, first make a call with a persisted_at GE "<TIMESTAMP>" filter. Then, continuously call the next page. If the first call has no filter, the export starts 24 hours ago.

If you request the next page within a minute of a page that returned no entries, the export endpoint returns the error code ResourceExhausted (error reason SYSTEM_AUDIT_EXPORT_BACKOFF). Wait a minute before retrying the request.

In the example, replace <TIMESTAMP> with an RFC 3339 time within the last 90 days, in the form YYYY-MM-DDThh:mm:ssZ.

Example:

An event describes an API-level action, including the IP address and user agent of the caller. Requests can originate from user sessions, or from applications using API keys. The following is a sample event for a successful API key generation:

Field
Description
Field
Description
Field
Description
Field
Description
  • request and response both only contain some whitelisted fields. Due to size limitations, the entire message is not recorded.

The following fields give a human-readable summary of the action. These are the fields surfaced in the UI.

Field
Description
curl -X GET "$VEZA_URL/api/preview/system/audit?page_token=&page_size=1&filter=ended_at+GE+%22<TIMESTAMP>%22" \
-H "authorization: Bearer $VEZA_TOKEN"
curl -X GET "$VEZA_URL/api/preview/system/audit?page_token=&page_size=1&filter=ended_at+GE+%22<TIMESTAMP>%22+and+user_id+EQ+%22aeaa34cf-e97f-4315-b185-249018cf191c%22" \
-H "authorization: Bearer $VEZA_TOKEN"
curl -X GET "$VEZA_URL/api/preview/system/audit?page_token=&page_size=1&filter=ended_at+GE+%22<TIMESTAMP>%22+and+outcome+EQ+%22FAILURE%22" \
-H "authorization: Bearer $VEZA_TOKEN"
curl -X GET "$VEZA_URL/api/preview/system/audit?page_token=&page_size=1&filter=ended_at+GE+%22<TIMESTAMP>%22+and+action_name+EQ+%22Create+API+Key%22" \
-H "authorization: Bearer $VEZA_TOKEN"
curl -X GET "$VEZA_URL/api/preview/system/audit/action_names" \
-H "authorization: Bearer $VEZA_TOKEN"
{
    "action_names": [
        "Create API Key",
        "List API Keys",
        "Revoke API Key"
    ]
}
curl -X GET "$VEZA_URL/api/v1/system/audit/export?filter=persisted_at+GE+%22<TIMESTAMP>%22&page_size=5&page_token=" \
-H "authorization: Bearer $VEZA_TOKEN"
{
    "identity": {
        "user_id": "aeaa34cf-e97f-4315-b185-249018cf191c",
        "session_id": "b0ba024d-0158-4c7e-a47f-bbe8f7b98806",
        "api_key_id": "",
        "email": "cookie@cookie.ai"
    },
    "status": {
        "grpc_code": "OK",
        "http_status": 200,
        "error_reason": "OK"
    },
    "client": {
        "ip": "10.42.1.1",
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
    },
    "endpoint": "/api_protos.v1.APIKeyService/CreateAPIKey",
    "method": "POST",
    "url": "/api/preview/keys",
    "request_id": "1a98184880f9952551c53d836598b258",
    "request": {
        "name": "KeyName1"
    },
    "response": {
        "value": {
            "id": "fde4386f-3d85-4ef2-82d0-324dacb6e9ba",
            "name": "KeyName1",
            "team_id": "613df06e-9a40-4331-947c-5c327b54b228",
            "user_id": "aeaa34cf-e97f-4315-b185-249018cf191c"
        }
    },
    "started_at": "2023-07-26T08:23:17.134994459Z",
    "ended_at": "2023-07-26T08:23:17.151080751Z"
}

user_id

Unique user identifier.

session_id

Unique session identifier.

api_key_id

Unique identifier of an API key.

email

User email address.

full_name

Display name of the actor (user or API key).

grpc_code

gRPC code indicating request status.

http_status

HTTP status code of the response.

error_reason

Details about a bad request.

ip

Client IP address.

user_agent

Client user agent string.

endpoint

The API endpoint that was accessed.

method

The HTTP method used for the request.

url

The URL of the request.

request_id

The unique identifier for the request.

request

action_name

Human-readable description of the action, such as Update Role Mapping.

outcome

Result of the action, such as Success or Failed.

resources

The resources the action affected, each with an id, name, and type. Empty for list and system-wide actions.

context_events

Related changes captured with the action, such as the specific role mappings added or removed.

Pagination

List audit events

List action names

Export audit events

Question: If a customer includes the persisted_at timestamp hard-coded in a script, and Veza only exports events for 1 month, what happens after a month?

Answer: The persisted_at parameter is ignored if you send a page_token in the API call. It won’t matter if the date is more than 90 or 30 days in the past.

Audit events

Identity

Status

Client

For audit entries recorded between the July 20 and August 10, 2026 releases, client.ip recorded an internal address (such as 10.x.x.x) instead of the public client IP. A later release resolves the issue, and the original public IPs from this window cannot be recovered. See for details.

Event

Action and resources

Audit events
Audit Log
List action names
List audit events
Audit Log
List audit events
List action names
Export audit events

type

Actor type, such as USER, API_KEY, or SERVICE_ACCOUNT.

The contents of the API request.

response

Excerpt of the API response.

started_at

RFC 3339 timestamp when the event started.

ended_at

RFC 3339 timestamp when the event ended.

Audit Log
get
Authorizations
AuthorizationstringRequired

Veza API key for authentication. Generate keys in Administration > API Keys.

Query parameters
filterstringRequired

Filter expression (required). Must include an ended_at GE timestamp filter that is within the last 90 days. Supports filtering by ended_at, method, user_id, url, outcome (SUCCESS or FAILURE), and action_name (EQ only, case-sensitive; list the valid values with GET /api/preview/system/audit/action_names). Cannot be set when page_token is provided. Example: ended_at GE "2025-01-01T00:00:00Z"

page_sizeinteger · int32Required

Number of results per page (required). Minimum: 1, maximum: 10,000.

page_tokenstringOptional

Pagination token from a previous response. When provided, the filter parameter must not be set — the page token carries forward the original filter constraints.

order_bystringOptional

Sort direction: desc (newest first, the default) or asc (oldest first). Set it on the first request. Later pages keep the order of the first request.

Responses
200

OK

application/json
user_idstringOptional
session_idstringOptional
api_key_idstringOptional
emailstringOptional
full_namestringOptional
typestringOptional
grpc_codestringOptional
http_statusinteger · uint32Optional
error_reasoninteger · enumOptional
ipstringOptional
user_agentstringOptional
endpointstringOptional
methodstringOptional
urlstringOptional
request_idstringOptional
requestobjectOptional
responseobjectOptional
started_atstring · date-timeOptional
ended_atstring · date-timeOptional
action_namestringOptional
outcomestringOptional
idstringOptional
namestringOptional
typestringOptional
event_typestringOptional

event_type is the unique, customer-facing identifier for classifying the event type and shape

eventobjectOptional

event is the protojson form of the event encoded as a Struct so the payload renders as a nested JSON object both at the DB column and across the gRPC trailer wire format. Using bytes here would force protojson to emit a base64-encoded string for what is otherwise structured data.

next_page_tokenstringOptional
default

Default error response

application/json

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.

codeinteger · int32Optional

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

messagestringOptional

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

@typestringOptional

The type of the serialized message.

Other propertiesanyOptional
get/api/preview/system/audit
GET /api/preview/system/audit?filter=text&page_size=1 HTTP/1.1
Host: your-tenant.vezacloud.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "values": [
    {
      "identity": {
        "user_id": "text",
        "session_id": "text",
        "api_key_id": "text",
        "email": "text",
        "full_name": "text",
        "type": "text"
      },
      "status": {
        "grpc_code": "text",
        "http_status": 1,
        "error_reason": 1
      },
      "client": {
        "ip": "text",
        "user_agent": "text"
      },
      "endpoint": "text",
      "method": "text",
      "url": "text",
      "request_id": "text",
      "request": {},
      "response": {},
      "started_at": "2026-01-01T00:00:00.000Z",
      "ended_at": "2026-01-01T00:00:00.000Z",
      "action_name": "text",
      "outcome": "text",
      "resources": [
        {
          "id": "text",
          "name": "text",
          "type": "text"
        }
      ],
      "context_events": [
        {
          "event_type": "text",
          "event": {}
        }
      ]
    }
  ],
  "next_page_token": "text"
}

List Audit Log action names

get

Returns the action names that the action_name filter of the list audit events endpoint can match, sorted alphabetically. Entries recorded without an action name show a name derived from the endpoint, and the filter can't match them. A renamed action is listed only by its current name.

Authorizations
AuthorizationstringRequired

Veza API key for authentication. Generate keys in Administration > API Keys.

Responses
200

OK

application/json
action_namesstring[]Optional
default

Default error response

application/json

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.

codeinteger · int32Optional

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

messagestringOptional

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

@typestringOptional

The type of the serialized message.

Other propertiesanyOptional
get/api/preview/system/audit/action_names
GET /api/preview/system/audit/action_names HTTP/1.1
Host: your-tenant.vezacloud.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "action_names": [
    "text"
  ]
}
get
Authorizations
AuthorizationstringRequired

Veza API key for authentication. Generate keys in Administration > API Keys.

Query parameters
filterstringOptional
page_sizeinteger · int32Optional
page_tokenstringOptional
Responses
200

OK

application/json
user_idstringOptional
session_idstringOptional
api_key_idstringOptional
emailstringOptional
full_namestringOptional
typestringOptional
grpc_codestringOptional
http_statusinteger · uint32Optional
error_reasoninteger · enumOptional
ipstringOptional
user_agentstringOptional
endpointstringOptional
methodstringOptional
urlstringOptional
request_idstringOptional
requestobjectOptional
responseobjectOptional
started_atstring · date-timeOptional
ended_atstring · date-timeOptional
action_namestringOptional
outcomestringOptional
idstringOptional
namestringOptional
typestringOptional
event_typestringOptional

event_type is the unique, customer-facing identifier for classifying the event type and shape

eventobjectOptional

event is the protojson form of the event encoded as a Struct so the payload renders as a nested JSON object both at the DB column and across the gRPC trailer wire format. Using bytes here would force protojson to emit a base64-encoded string for what is otherwise structured data.

next_page_tokenstringOptional
default

Default error response

application/json

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.

codeinteger · int32Optional

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

messagestringOptional

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

@typestringOptional

The type of the serialized message.

Other propertiesanyOptional
get/api/v1/system/audit/export
GET /api/v1/system/audit/export HTTP/1.1
Host: your-tenant.vezacloud.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "values": [
    {
      "identity": {
        "user_id": "text",
        "session_id": "text",
        "api_key_id": "text",
        "email": "text",
        "full_name": "text",
        "type": "text"
      },
      "status": {
        "grpc_code": "text",
        "http_status": 1,
        "error_reason": 1
      },
      "client": {
        "ip": "text",
        "user_agent": "text"
      },
      "endpoint": "text",
      "method": "text",
      "url": "text",
      "request_id": "text",
      "request": {},
      "response": {},
      "started_at": "2026-01-01T00:00:00.000Z",
      "ended_at": "2026-01-01T00:00:00.000Z",
      "action_name": "text",
      "outcome": "text",
      "resources": [
        {
          "id": "text",
          "name": "text",
          "type": "text"
        }
      ],
      "context_events": [
        {
          "event_type": "text",
          "event": {}
        }
      ]
    }
  ],
  "next_page_token": "text"
}