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.

FieldTypeRequiredDescription
flagKeystringNoRequest filter. Returns only entries for this flag.
eventstringNoRequest filter. Returns only entries for this event type: flag.created, flag.updated, flag.deleted, or targeting.updated.
limitpositive integerNoMaximum number of entries to return. Defaults to 50 and cannot exceed 200.
dataarray of audit log entriesYesResponse collection containing the project's matching audit log entries.
idstringYesAudit log entry identifier.
projectIdstringYesIdentifier of the project associated with the entry.
eventstringYesEvent recorded for the change, using the webhook event vocabulary.
flagKeystring or nullYesFlag key associated with the change, or null when no flag key is associated with the entry.
actorstringYesAPI key identifier that performed the change, or system.
beforeJSON value or nullYesResource snapshot before the change; null for creates.
afterJSON value or nullYesResource snapshot after the change; null for deletes.
createdAtstringYesTimestamp for when the audit log entry was created.

Endpoints

MethodPathDescription
GET/v1/projects/{projectId}/audit-logsList a project's flag change history, newest first, with optional flagKey, event, and limit filters.