API Keys
Issue, rotate, and revoke API keys for the account, and grant or revoke each key’s access to individual workspaces.
List API keys
client.apiKeys.list(APIKeyListParams { bundleKey, cursor, includeInfo, 4 more } query?, RequestOptionsoptions?): CursorPagination<APIKey { metadata, spec, info } >
GET/v1/account/api_keys
Create a new API key
client.apiKeys.create(APIKeyCreateParams { metadata, spec, initialWorkspaceIds } body, RequestOptionsoptions?): APIKey { metadata, spec, info }
POST/v1/account/api_keys
Get an API key by ID
client.apiKeys.retrieve(stringid, RequestOptionsoptions?): APIKey { metadata, spec, info }
GET/v1/account/api_keys/{id}
Delete an API key
client.apiKeys.delete(stringid, RequestOptionsoptions?): void
DELETE/v1/account/api_keys/{id}
Update an API key
client.apiKeys.update(stringid, APIKeyUpdateParams { metadata, spec, updateMask } body, RequestOptionsoptions?): APIKey { metadata, spec, info }
PATCH/v1/account/api_keys/{id}
Rotate an API key
client.apiKeys.rotate(stringid, RequestOptionsoptions?): APIKey { metadata, spec, info }
PUT/v1/account/api_keys/{id}/rotate
API KeysAccess
Issue, rotate, and revoke API keys for the account, and grant or revoke each key’s access to individual workspaces.
Grant an API key access to a workspace
client.apiKeys.access.add(stringid, AccessAddParams { workspaceId } body, RequestOptionsoptions?): APIKey { metadata, spec, info }
POST/v1/account/api_keys/{id}/workspaces
Revoke an API key's access to a workspace
client.apiKeys.access.remove(stringworkspaceID, AccessRemoveParams { id } params, RequestOptionsoptions?): void
DELETE/v1/account/api_keys/{id}/workspaces/{workspaceId}
List the workspaces an API key has access to
client.apiKeys.access.list(stringid, AccessListParams { cursor, limit } query?, RequestOptionsoptions?): CursorPagination<Workspace { metadata, spec, status } >
GET/v1/account/api_keys/{id}/workspaces