Audit logs
Audit logs
Query flag change history and filter entries by flag key or event type
Overview
The audit log resource records a project's flag change history. Each entry identifies the event, the flag involved when applicable, the actor that made the change, and snapshots from before and after the change.
Use this resource to list entries for a project. Results are returned newest first. You can filter the history by a specific flag with flagKey or by one event type with event. Supported event types are flag.created, flag.updated, flag.deleted, and targeting.updated.
The endpoint requires a server API key and returns matching entries under the data response field.
Note:
The before snapshot is null for creates, and the after snapshot is null for deletes. Other snapshots contain the resource state captured for that change.
Schema
The list request accepts the following query fields. Each returned audit log entry contains the response fields below.
| Field | Type | Required | Description |
|---|---|---|---|
flagKey | string | No | Request filter. Returns only entries for this flag. |
event | string | No | Request filter. Returns only entries for this event type: flag.created, flag.updated, flag.deleted, or targeting.updated. |
limit | positive integer | No | Maximum number of entries to return. Defaults to 50 and cannot exceed 200. |
data | array of audit log entries | Yes | Response collection containing the project's matching audit log entries. |
id | string | Yes | Audit log entry identifier. |
projectId | string | Yes | Identifier of the project associated with the entry. |
event | string | Yes | Event recorded for the change, using the webhook event vocabulary. |
flagKey | string or null | Yes | Flag key associated with the change, or null when no flag key is associated with the entry. |
actor | string | Yes | API key identifier that performed the change, or system. |
before | JSON value or null | Yes | Resource snapshot before the change; null for creates. |
after | JSON value or null | Yes | Resource snapshot after the change; null for deletes. |
createdAt | string | Yes | Timestamp for when the audit log entry was created. |
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /v1/projects/{projectId}/audit-logs | List a project's flag change history, newest first, with optional flagKey, event, and limit filters. |