Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/rest-apis/gateway/certificate-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Upload a new TLS certificate (PEM format) to the Gateway. The certificate is loa
<aside class="warning">
This operation requires <strong>Basic Auth</strong> authentication.

Required roles: `admin`, `developer`
Required roles: `admin`

</aside>

Expand Down
213 changes: 213 additions & 0 deletions docs/rest-apis/platform-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@

<h1 id="wso2-api-platform-platform-api">WSO2 API Platform - Platform API v0.9.0</h1>

This document specifies a **RESTful API** for WSO2 **API Platform** - **Platform API**.

## Authentication

Most API endpoints require a Bearer JWT token in the `Authorization` header. Tokens are
validated against a configured Identity Provider (IDP) using JWKS-based signature
verification.

**Required claim**: `organization` — UUID of the caller's organization. All operations are
automatically scoped to this organization.

**Supported signing algorithms**: RS256, RS384, RS512 (RSA) and ES256, ES384, ES512 (ECDSA).
Works with any standards-compliant IDP (Keycloak, Azure AD, Okta, Auth0, WSO2 IS, etc.).

## Scope-Based Access Control

Authorization is enforced via OAuth2 scopes carried in the JWT. Both read (GET) and write
operations require specific scopes declared in the `security` field of each operation.

Base URLs:
* <a href="https://localhost:9243/api/v0.9">https://localhost:9243/api/v0.9</a>
* <a href="https://api.platform.com/api/v0.9">https://api.platform.com/api/v0.9</a>

License: <a href="https://www.apache.org/licenses/LICENSE-2.0.html">Apache 2.0</a>

## Table of Contents

### [Authentication](authentication.md)

- [Overview](authentication.md#overview)
- [Authentication Modes](authentication.md#authentication-modes)
- [Required Claims](authentication.md#required-claims)
- [Authorization](authentication.md#authorization)
- [Error Responses](authentication.md#error-responses)
- [Troubleshooting](authentication.md#troubleshooting)
- [Scope Reference](authentication.md#scope-reference)

### [Organizations](organizations.md)

- [Register a new organization](organizations.md#register-a-new-organization)
- [List organizations](organizations.md#list-organizations)
- [Get organization by ID](organizations.md#get-organization-by-id)
- [Check if organization exists](organizations.md#check-if-organization-exists)

### [Projects](projects.md)

- [Create a new project](projects.md#create-a-new-project)
- [Get all projects for current user's organization](projects.md#get-all-projects-for-current-users-organization)
- [Get project by ID](projects.md#get-project-by-id)
- [Update project](projects.md#update-project)
- [Delete project](projects.md#delete-project)

### [Applications](applications.md)

- [Create a new application](applications.md#create-a-new-application)
- [Get applications for current user's organization](applications.md#get-applications-for-current-users-organization)
- [Get application by handle](applications.md#get-application-by-handle)
- [Update application](applications.md#update-application)
- [Delete application](applications.md#delete-application)
- [List application API key mappings](applications.md#list-application-api-key-mappings)
- [Add application API key mappings](applications.md#add-application-api-key-mappings)
- [Remove application API key mapping](applications.md#remove-application-api-key-mapping)
- [List application associations](applications.md#list-application-associations)
- [Add application associations](applications.md#add-application-associations)
- [Remove application association](applications.md#remove-application-association)
- [List application API key mappings for an association](applications.md#list-application-api-key-mappings-for-an-association)

### [REST APIs](rest-apis.md)

- [Get all REST APIs for an organization](rest-apis.md#get-all-rest-apis-for-an-organization)
- [Create a new REST API](rest-apis.md#create-a-new-rest-api)
- [Get REST API by ID](rest-apis.md#get-rest-api-by-id)
- [Update REST API](rest-apis.md#update-rest-api)
- [Delete REST API](rest-apis.md#delete-rest-api)
- [Get gateways for REST API](rest-apis.md#get-gateways-for-rest-api)
- [Add gateways for REST API](rest-apis.md#add-gateways-for-rest-api)
- [Create API key](rest-apis.md#create-api-key)
- [Update API key](rest-apis.md#update-api-key)
- [Revoke API key](rest-apis.md#revoke-api-key)

### [REST API Deployments](rest-api-deployments.md)

- [Create and deploy a new deployment](rest-api-deployments.md#create-and-deploy-a-new-deployment)
- [Get deployments for a REST API](rest-api-deployments.md#get-deployments-for-a-rest-api)
- [Get deployment by ID](rest-api-deployments.md#get-deployment-by-id)
- [Delete deployment](rest-api-deployments.md#delete-deployment)
- [Undeploy deployment from gateway](rest-api-deployments.md#undeploy-deployment-from-gateway)
- [Restore a previous deployment](rest-api-deployments.md#restore-a-previous-deployment)

### [Gateways](gateways.md)

- [Register a new gateway](gateways.md#register-a-new-gateway)
- [List all gateways](gateways.md#list-all-gateways)
- [Get gateway by ID](gateways.md#get-gateway-by-id)
- [Update gateway](gateways.md#update-gateway)
- [Delete gateway](gateways.md#delete-gateway)
- [Get gateway policy manifest](gateways.md#get-gateway-policy-manifest)

### [Gateway Tokens](gateway-tokens.md)

- [List active gateway tokens](gateway-tokens.md#list-active-gateway-tokens)
- [Rotate gateway token](gateway-tokens.md#rotate-gateway-token)
- [Revoke gateway token](gateway-tokens.md#revoke-gateway-token)

### [Gateway Policies](gateway-policies.md)

- [Get synced custom policies for the current organization](gateway-policies.md#get-synced-custom-policies-for-the-current-organization)
- [Sync a custom policy from the gateway manifest](gateway-policies.md#sync-a-custom-policy-from-the-gateway-manifest)
- [Get a specific custom policy version](gateway-policies.md#get-a-specific-custom-policy-version)
- [Delete a specific custom policy version](gateway-policies.md#delete-a-specific-custom-policy-version)

### [LLM Providers](llm-providers.md)

- [Create a new LLM provider](llm-providers.md#create-a-new-llm-provider)
- [List all LLM providers](llm-providers.md#list-all-llm-providers)
- [Get LLM provider by identifier](llm-providers.md#get-llm-provider-by-identifier)
- [Update an existing LLM provider](llm-providers.md#update-an-existing-llm-provider)
- [Delete an LLM provider](llm-providers.md#delete-an-llm-provider)
- [List LLM proxies by provider](llm-providers.md#list-llm-proxies-by-provider)
- [Create a new API key for an LLM provider](llm-providers.md#create-a-new-api-key-for-an-llm-provider)
- [List API keys for an LLM provider](llm-providers.md#list-api-keys-for-an-llm-provider)
- [Delete an API key for an LLM provider](llm-providers.md#delete-an-api-key-for-an-llm-provider)

### [LLM Proxies](llm-proxies.md)

- [Create a new LLM proxy](llm-proxies.md#create-a-new-llm-proxy)
- [List all LLM proxies](llm-proxies.md#list-all-llm-proxies)
- [Get LLM proxy by unique identifier](llm-proxies.md#get-llm-proxy-by-unique-identifier)
- [Update an existing LLM proxy](llm-proxies.md#update-an-existing-llm-proxy)
- [Delete an LLM proxy](llm-proxies.md#delete-an-llm-proxy)
- [Create a new API key for an LLM proxy](llm-proxies.md#create-a-new-api-key-for-an-llm-proxy)
- [List API keys for an LLM proxy](llm-proxies.md#list-api-keys-for-an-llm-proxy)
- [Delete an API key for an LLM proxy](llm-proxies.md#delete-an-api-key-for-an-llm-proxy)

### [LLM Provider Templates](llm-provider-templates.md)

- [Create a new LLM provider template family](llm-provider-templates.md#create-a-new-llm-provider-template-family)
- [List templates, list a family's versions, or get a single version](llm-provider-templates.md#list-templates-list-a-familys-versions-or-get-a-single-version)
- [Create a new version by copying an existing one](llm-provider-templates.md#create-a-new-version-by-copying-an-existing-one)
- [Get LLM provider template by id](llm-provider-templates.md#get-llm-provider-template-by-id)
- [Update an existing LLM provider template](llm-provider-templates.md#update-an-existing-llm-provider-template)
- [Enable or disable a template version](llm-provider-templates.md#enable-or-disable-a-template-version)
- [Delete a template version](llm-provider-templates.md#delete-a-template-version)

### [LLM Provider Deployments](llm-provider-deployments.md)

- [Create and deploy a new LLM provider deployment](llm-provider-deployments.md#create-and-deploy-a-new-llm-provider-deployment)
- [Get deployments for an LLM provider](llm-provider-deployments.md#get-deployments-for-an-llm-provider)
- [Get LLM provider deployment by ID](llm-provider-deployments.md#get-llm-provider-deployment-by-id)
- [Delete LLM provider deployment](llm-provider-deployments.md#delete-llm-provider-deployment)
- [Undeploy LLM provider deployment from gateway](llm-provider-deployments.md#undeploy-llm-provider-deployment-from-gateway)
- [Restore a previous LLM provider deployment](llm-provider-deployments.md#restore-a-previous-llm-provider-deployment)

### [LLM Proxy Deployments](llm-proxy-deployments.md)

- [Create and deploy a new LLM proxy deployment](llm-proxy-deployments.md#create-and-deploy-a-new-llm-proxy-deployment)
- [Get deployments for an LLM proxy](llm-proxy-deployments.md#get-deployments-for-an-llm-proxy)
- [Get LLM proxy deployment by ID](llm-proxy-deployments.md#get-llm-proxy-deployment-by-id)
- [Delete LLM proxy deployment](llm-proxy-deployments.md#delete-llm-proxy-deployment)
- [Undeploy LLM proxy deployment from gateway](llm-proxy-deployments.md#undeploy-llm-proxy-deployment-from-gateway)
- [Restore a previous LLM proxy deployment](llm-proxy-deployments.md#restore-a-previous-llm-proxy-deployment)

### [API Keys](api-keys.md)

- [List API keys for the current user](api-keys.md#list-api-keys-for-the-current-user)

### [MCP Proxies](mcp-proxies.md)

- [Create a new MCP proxy](mcp-proxies.md#create-a-new-mcp-proxy)
- [List all MCP proxies](mcp-proxies.md#list-all-mcp-proxies)
- [Get MCP proxy by unique identifier](mcp-proxies.md#get-mcp-proxy-by-unique-identifier)
- [Update an existing MCP proxy](mcp-proxies.md#update-an-existing-mcp-proxy)
- [Delete an MCP proxy](mcp-proxies.md#delete-an-mcp-proxy)
- [Fetch server info from MCP proxy backend services](mcp-proxies.md#fetch-server-info-from-mcp-proxy-backend-services)

### [MCP Proxy Deployments](mcp-proxy-deployments.md)

- [Create and deploy a new deployment for MCP proxy](mcp-proxy-deployments.md#create-and-deploy-a-new-deployment-for-mcp-proxy)
- [Get deployments for an MCP proxy](mcp-proxy-deployments.md#get-deployments-for-an-mcp-proxy)
- [Get deployment by ID](mcp-proxy-deployments.md#get-deployment-by-id)
- [Delete deployment](mcp-proxy-deployments.md#delete-deployment)
- [Undeploy deployment from gateway](mcp-proxy-deployments.md#undeploy-deployment-from-gateway)
- [Restore a previous deployment](mcp-proxy-deployments.md#restore-a-previous-deployment)

### [SubscriptionPlans](subscriptionplans.md)

- [Create subscription plan](subscriptionplans.md#create-subscription-plan)
- [List subscription plans](subscriptionplans.md#list-subscription-plans)
- [Get subscription plan by ID](subscriptionplans.md#get-subscription-plan-by-id)
- [Update subscription plan](subscriptionplans.md#update-subscription-plan)
- [Delete subscription plan](subscriptionplans.md#delete-subscription-plan)

### [Subscriptions](subscriptions.md)

- [Create subscription](subscriptions.md#create-subscription)
- [List subscriptions](subscriptions.md#list-subscriptions)
- [Get subscription by ID](subscriptions.md#get-subscription-by-id)
- [Update subscription](subscriptions.md#update-subscription)
- [Delete subscription](subscriptions.md#delete-subscription)

### [Secrets](secrets.md)

- [Create a secret](secrets.md#create-a-secret)
- [List secrets](secrets.md#list-secrets)
- [Get a secret by handle](secrets.md#get-a-secret-by-handle)
- [Rotate a secret value](secrets.md#rotate-a-secret-value)
- [Delete a secret](secrets.md#delete-a-secret)

### [Schemas](schemas.md)

113 changes: 113 additions & 0 deletions docs/rest-apis/platform-api/api-keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<h1 id="wso2-api-platform-platform-api-api-keys">API Keys</h1>

API key management operations for REST APIs and LLM Providers

## List API keys for the current user

<a id="opIdlistUserAPIKeys"></a>

`GET /me/api-keys`

> Code samples

```shell

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.
Optionally filter by one or more artifact types using a comma-separated `type` query parameter.
The plain key value is never returned.

### Authentication

<aside class="warning">
This operation requires a <strong>Bearer JWT</strong> access token in the <code>Authorization</code> header.

Required scopes (the token must carry at least one of): `ap:api_key:read`

</aside>

<h3 id="list-api-keys-for-the-current-user-parameters">Parameters</h3>

|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

```json
{
"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

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

> 500 Response

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

<h3 id="list-api-keys-for-the-current-user-responses">Responses</h3>

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|List of API keys retrieved successfully|[UserAPIKeyListResponse](schemas.md#schemauserapikeylistresponse)|
|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Unauthorized. Authentication credentials are missing or invalid.|[Error](schemas.md#schemaerror)|
|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Internal Server Error.|[Error](schemas.md#schemaerror)|
Loading
Loading