The apikeys area has 4 methods on the client. Each takes one object of path, query and body arguments and an optional CallOptions, and returns a promise of the response body. A refused call rejects with OverlaneApiError (see the SDK index).
apikeysCreate
Create an API key; the secret is shown once (secrets class)
- Request:
POSTon/v1/tenants/{tenantId}/api-keys - Needs an approval for agents: class
secrets
apikeysCreate(args: { tenantId: string; body: CreateApiKeyRequest }, options?: CallOptions): Promise<ApiKeyCreated>apikeysList
List the team’s API keys; a key shows its prefix, never the secret
- Request:
GETon/v1/tenants/{tenantId}/api-keys
apikeysList(args: { tenantId: string }, options?: CallOptions): Promise<ApiKeyList>apikeysRevoke
Revoke an API key; the next call with it fails (secrets class)
- Request:
DELETEon/v1/tenants/{tenantId}/api-keys/{apiKeyId} - Needs an approval for agents: class
secrets
apikeysRevoke(args: { tenantId: string; apiKeyId: string }, options?: CallOptions): Promise<ApiKey>apikeysRotate
Rotate an API key: a new key with the same settings, the old one revoked (secrets class)
- Request:
POSTon/v1/tenants/{tenantId}/api-keys/{apiKeyId}/rotate - Needs an approval for agents: class
secrets
apikeysRotate(args: { tenantId: string; apiKeyId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<ApiKeyCreated>