getApiAuditLogs()
Returns audit logs with filtering and cursor options.
Usage
The following example shows a basic usage of the backend client from @wacht/nextjs/server.
import { wachtClient } from '@wacht/nextjs/server';export async function example() { const client = await wachtClient(); const appSlug: string = 'appslug'; const options: ListApiAuditLogsOptions = { limit: 50, outcome: 'blocked', }; return client.apiKeys.getApiAuditLogs(appSlug, options);}Signature
function getApiAuditLogs( appSlug: string, options?: ListApiAuditLogsOptions,): Promise<ApiAuditLogsResponse>ListApiAuditLogsOptions
›appSlug?: string | undefined;
appSlug?: string | undefined;API auth app slug.
›options.limit?: number | undefined;
options.limit?: number | undefined;Maximum records in one page.
›options.offset?: number | undefined;
options.offset?: number | undefined;Offset-based pagination value.
›options.outcome?: string | undefined;
options.outcome?: string | undefined;Outcome filter (for example allowed/blocked).
›options.key_id?: string | number | undefined;
options.key_id?: string | number | undefined;Filter by key id.
›options.start_date?: string | undefined;
options.start_date?: string | undefined;Inclusive start timestamp.
›options.end_date?: string | undefined;
options.end_date?: string | undefined;Inclusive end timestamp.
›options.cursor?: string | undefined;
options.cursor?: string | undefined;Cursor token for keyset pagination.
Return value
›data?: ApiAuditLog[] | undefined;
data?: ApiAuditLog[] | undefined;Audit events for this page.
›limit?: number | undefined;
limit?: number | undefined;Effective page size.
›has_more?: boolean | undefined;
has_more?: boolean | undefined;Whether more rows are available.
›next_cursor?: string | undefined;
next_cursor?: string | undefined;Cursor for the next page.