Skip to content

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

Parameters

Name In Type Required Description
type query array[string] false Comma-separated list of artifact types to filter by.
limit query integer false Maximum number of items to return per page.
offset query integer false Zero-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

Parameter Value
type RestApi
type LlmProvider
type LlmProxy

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

Status Meaning Description Schema
200 OK List of API keys retrieved successfully UserAPIKeyListResponse
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
500 Internal Server Error Internal Server Error. Error