PERS SDK - v2.3.26 / Exports / ApiKeyApi
Platform-Agnostic API Key API Client
Handles API key management operations for tenant admins. All operations require admin authentication and operate within tenant context.
• new ApiKeyApi(apiClient): ApiKeyApi
| Name | Type |
|---|---|
apiClient | PersApiClient |
▸ getTenantApiKeys(type?, includeRevoked?, options?): Promise<PaginatedResponseDTO<ApiKeyDTO>>
ADMIN: Get all tenant API keys
| Name | Type | Default value | Description |
|---|---|---|---|
type? | IntegrationApiKeyType | undefined | Optional filter by integration API key type (database-stored tokens that can be revoked) |
includeRevoked | boolean | false | Include revoked API keys in results (default: false) |
options? | PaginationOptions | undefined | Pagination options (page, limit, sortBy, sortOrder) |
Promise<PaginatedResponseDTO<ApiKeyDTO>>
Paginated response with API keys for the current tenant
▸ createApiKey(req): Promise<ApiKeyCreatedDTO>
ADMIN: Create new API key
| Name | Type | Description |
|---|---|---|
req | ApiKeyRequestDTO | API key creation request containing type, name, and optional configuration |
Promise<ApiKeyCreatedDTO>
Created API key with the actual key (store securely - only returned once)
▸ revokeApiKey(apiKeyId): Promise<ApiKeyVerificationDTO>
ADMIN: Revoke API key
| Name | Type | Description |
|---|---|---|
apiKeyId | string | Unique identifier of the API key to revoke |
Promise<ApiKeyVerificationDTO>
API key verification details with revocation status