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

FieldTypeNotes
handlestring | undefinedoptional — New URL-safe slug. Path changes break existing clients.
namestring | undefinedoptional — New name.
descriptionstring | null | undefinedoptional — 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; } | undefinedoptional — Replace the default auth policy.
cors{ allowOrigins: Array<string>; allowCredentials?: boolean | undefined; } | null | undefinedoptional — Replace the default CORS policy; null to remove.
rateLimit{ perMinute: number; } | null | undefinedoptional — Replace the rate limit; null to remove.
enabledboolean | undefinedoptional — Toggle whether the api accepts requests.