Audit log#
Query audit log entries to track changes made across your organization.
Provider required
BrandwaveProvider ancestor in your component tree. See the React Hooks overview for setup instructions.useListAuditLog#
List audit log entries with structured filtering. Use entityType to filter by category (e.g. "creator", "campaign", "activity") and action to filter by what happened (e.g. "created", "deleted", "updated", "linked"). This is the preferred action for questions like "show creator entries" or "show deletions".
import { useListAuditLog } from '@brandwave/react';
const { data, isLoading } = useListAuditLog({
pageIndex: 0,
pageSize: 25,
organizationId: 'org_123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| pageIndex | integer | Required | Zero-based page index for pagination. |
| pageSize | integer | Required | Number of items per page (1-100). |
| organizationId | string (UUID) | Required | Organization identifier. |
| searchTerm | string | — | Free-text search term to filter results (max 200 characters). |
| sortBy | string | — | Column name to sort by. |
| sortDirection | 'asc' | 'desc' | — | Sort direction: ascending or descending. |
| entityType | 'activity' | 'campaign' | 'creator' | 'conversion' | 'conversion_source' | 'campaign_activity' | 'activity_creator' | 'cost' | 'note' | 'organization' | 'user' | — | Filter by entity type. |
| entityId | string (UUID) | — | Filter by specific entity identifier. |
| action | 'created' | 'updated' | 'deleted' | 'linked' | 'unlinked' | 'refreshed' | 'attributed' | 'restored' | — | Filter by action type. |
| relatedActivityId | string (UUID) | — | Filter by related activity. |
| relatedCampaignId | string (UUID) | — | Filter by related campaign. |
| relatedCreatorId | string (UUID) | — | Filter by related creator. |
| startDate | string (ISO 8601) | null | — | Start of the date range filter. |
| endDate | string (ISO 8601) | null | — | End of the date range filter. |
Response#
Returns { items, totalCount, facets } with paginated results.
Underlying SDK method: bw.auditLog.list(params)
useSearchAuditLog#
Search audit log entry content using full-text matching across names, titles, and descriptions inside changes and metadata. Use this when looking for specific text in the data values, e.g. a creator name or activity title. Do NOT use this to filter by entity type or action — use list-audit-log with entityType/action filters instead.
import { useSearchAuditLog } from '@brandwave/react';
const { data, isLoading } = useSearchAuditLog({
organizationId: 'org_123',
query: '...',
pageIndex: 0,
pageSize: 25,
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier. |
| query | string | Required | Full-text search query (1-500 characters). |
| pageIndex | integer | Required | Zero-based page index. |
| pageSize | integer | Required | Number of items per page (1-100). |
| startDate | string (ISO 8601) | null | — | Start of the date range filter. |
| endDate | string (ISO 8601) | null | — | End of the date range filter. |
Response#
Returns { items, totalCount, facets } with paginated results.
Underlying SDK method: bw.auditLog.search(params)
useAuditLogEntry#
Retrieve a single audit log entry by ID.
import { useAuditLogEntry } from '@brandwave/react';
const { data, isLoading } = useAuditLogEntry({
id: 'abc-123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Audit log entry identifier. |
Response#
Returns { data } with the result.
Underlying SDK method: bw.auditLog({ id })