NewWacht Bench is live — AI-assisted development for Wacht

getApiAuditTimeseries()

Loads interval-bucketed audit metrics for one app.

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: GetApiAuditTimeseriesOptions = {    interval: 'hour',  };  return client.apiKeys.getApiAuditTimeseries(appSlug, options);}

Signature

function getApiAuditTimeseries(  appSlug: string,  options?: GetApiAuditTimeseriesOptions,): Promise<ApiAuditTimeseriesResponse>

GetApiAuditTimeseriesOptions

appSlug?: string | undefined;
API auth app slug.
options.start_date?: string | undefined;
Start timestamp.
options.end_date?: string | undefined;
End timestamp.
options.interval?: string | undefined;
Requested bucket interval.
options.key_id?: string | number | undefined;
Optional key filter.

Return value

data?: ApiAuditTimeseriesPoint[] | undefined;
Timeseries points for each bucket.
interval?: string | undefined;
Resolved interval returned by backend.

On this page