Skip to main content

Platform API: API keys

API key management operations for REST APIs and LLM Providers

List API keys for the current user, or for all users with ap:api_key:all:manage​

GET /me/api-keys

Code samples


curl -X GET https://localhost:9243/api/v0.9/me/api-keys \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Returns API keys created by the caller within the organization. Callers holding the ap:api_key:all:manage scope instead receive every user's API keys in the organization; the createdBy field identifies each key's creator. Optionally filter by one or more artifact types using a comma-separated type query parameter. The plain key value is never returned.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:api_key:read`, `ap:api_key:all:manage`

Parameters {#list-api-keys-for-the-current-user,-or-for-all-users-with-ap:api_key:all:manage-parameters}​

NameInTypeRequiredDescription
typequeryarray[string]falseComma-separated list of artifact types to filter by.
limitqueryintegerfalseMaximum number of items to return per page.
offsetqueryintegerfalseZero-based index of the first item to return.

Detailed descriptions​

type: Comma-separated list of artifact types to filter by. If omitted, all types are returned.

Enumerated Values​

ParameterValue
typeRestApi
typeLlmProvider
typeLlmProxy

Example responses

200 Response

{
"list": [
{
"id": "string",
"displayName": "string",
"maskedApiKey": "string",
"status": "active",
"createdAt": "2019-08-24T14:15:22Z",
"createdBy": "john.doe",
"updatedAt": "2019-08-24T14:15:22Z",
"expiresAt": "2019-08-24T14:15:22Z",
"issuer": "api-platform-devportal",
"allowedTargets": "string",
"artifactId": "wso2-openai-provider",
"artifactType": "RestApi"
}
],
"count": 0,
"pagination": {
"total": 10,
"offset": 0,
"limit": 10
}
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses {#list-api-keys-for-the-current-user,-or-for-all-users-with-ap:api_key:all:manage-responses}​

StatusMeaningDescriptionSchema
200OKList of API keys retrieved successfullyUserAPIKeyListResponse
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
500Internal Server ErrorInternal Server Error.Error

Was this page helpful?