NewWacht Bench is live — AI-assisted development for Wacht

listRateLimitSchemes()

Returns all configured API auth rate limit schemes from the deployment-scoped route used by the console compatibility layer.

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 listRateLimitSchemes() {  const client = await wachtClient();  return client.apiKeys.listRateLimitSchemes();}

Signature

function listRateLimitSchemes(): Promise<RateLimitScheme[]>

Return value

slug?: string | undefined;
Unique rate-limit scheme slug.
name?: string | undefined;
Rate-limit scheme display name.
description?: string | undefined;
Optional scheme description.
rules?: RateLimit[] | undefined;
Rate-limit rules in this scheme.
unit?: 'second' | 'minute' | 'hour' | 'day' | undefined;
Rate-limit window unit.
duration?: number | undefined;
Window duration count in `unit`.
max_requests?: number | undefined;
Maximum allowed requests per window.

Behavior

  • Returns all reusable API auth rate-limit schemes configured in the deployment.
  • Use these slugs when creating or updating API auth apps.

On this page