UpdateApiBody
Request body for updating an Api.
Definition
TypeScript
interface UpdateApiBody {
handle?: string | undefined;
name?: string | undefined;
description?: string | null | undefined;
auth?:
| { kind: "public"; rateLimitPerMinute?: number | undefined }
| { kind: "workspace_api_key" }
| { kind: "oauth"; scope: string }
| { kind: "event_signature"; secretSource: "secret_ref"; secretId: string }
| undefined;
cors?:
| { allowOrigins: Array<string>; allowCredentials?: boolean | undefined }
| null
| undefined;
rateLimit?: { perMinute: number } | null | undefined;
enabled?: boolean | undefined;
}Fields
| Field | Type | Notes |
|---|---|---|
handle | string | undefined | optional — New URL-safe slug. Path changes break existing clients. |
name | string | undefined | optional — New name. |
description | string | null | undefined | optional — New description; null to clear. |
auth | { kind: "public"; rateLimitPerMinute?: number | undefined; } | { kind: "workspace_api_key"; } | { kind: "oauth"; scope: string; } | { kind: "event_signature"; secretSource: "secret_ref"; secretId: string; } | undefined | optional — Replace the default auth policy. |
cors | { allowOrigins: Array<string>; allowCredentials?: boolean | undefined; } | null | undefined | optional — Replace the default CORS policy; null to remove. |
rateLimit | { perMinute: number; } | null | undefined | optional — Replace the rate limit; null to remove. |
enabled | boolean | undefined | optional — Toggle whether the api accepts requests. |