diff --git a/en/docs/api-gateway/next/gateway-controller-management-api/certificate-management.md b/en/docs/api-gateway/next/gateway-controller-management-api/certificate-management.md index dbb426242..832b2c63d 100644 --- a/en/docs/api-gateway/next/gateway-controller-management-api/certificate-management.md +++ b/en/docs/api-gateway/next/gateway-controller-management-api/certificate-management.md @@ -27,7 +27,7 @@ Manage custom TLS certificates for HTTPS upstream verification ```shell -curl -X GET http://localhost:9090/api/management/v0.9/certificates \ +curl -X GET http://localhost:9090/api/management/v1/certificates \ -u {username}:{password} \ -H 'Accept: application/json' @@ -86,7 +86,7 @@ Required roles: `admin`, `developer` ```shell -curl -X POST http://localhost:9090/api/management/v0.9/certificates \ +curl -X POST http://localhost:9090/api/management/v1/certificates \ -u {username}:{password} \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ @@ -155,7 +155,7 @@ Required roles: `admin`, `developer` ```shell -curl -X DELETE http://localhost:9090/api/management/v0.9/certificates/{id} \ +curl -X DELETE http://localhost:9090/api/management/v1/certificates/{id} \ -u {username}:{password} \ -H 'Accept: application/json' @@ -218,7 +218,7 @@ Status Code **200** ```shell -curl -X POST http://localhost:9090/api/management/v0.9/certificates/reload \ +curl -X POST http://localhost:9090/api/management/v1/certificates/reload \ -u {username}:{password} \ -H 'Accept: application/json' diff --git a/en/docs/api-gateway/next/gateway-controller-management-api/llm-provider-management.md b/en/docs/api-gateway/next/gateway-controller-management-api/llm-provider-management.md index 7ff55a6ad..c5739b61b 100644 --- a/en/docs/api-gateway/next/gateway-controller-management-api/llm-provider-management.md +++ b/en/docs/api-gateway/next/gateway-controller-management-api/llm-provider-management.md @@ -26,7 +26,7 @@ CRUD operations for LLM Provider configurations ```shell -curl -X POST http://localhost:9090/api/management/v0.9/llm-providers \ +curl -X POST http://localhost:9090/api/management/v1/llm-providers \ -u {username}:{password} \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ @@ -40,7 +40,7 @@ Add a new LLM provider to the Gateway. A provider defines how to interact with a ```json { - "apiVersion": "gateway.api-platform.wso2.com/v1alpha1", + "apiVersion": "gateway.api-platform.wso2.com/v1", "kind": "LlmProvider", "metadata": { "name": "wso2-openai-provider" @@ -106,7 +106,7 @@ Required roles: `admin` ```json { - "apiVersion": "gateway.api-platform.wso2.com/v1alpha1", + "apiVersion": "gateway.api-platform.wso2.com/v1", "kind": "LlmProvider", "metadata": { "name": "wso2-openai-provider" @@ -177,7 +177,7 @@ Required roles: `admin` ```shell -curl -X GET http://localhost:9090/api/management/v0.9/llm-providers \ +curl -X GET http://localhost:9090/api/management/v1/llm-providers \ -u {username}:{password} \ -H 'Accept: application/json' @@ -221,7 +221,7 @@ Required roles: `admin`, `developer` "count": 2, "providers": [ { - "apiVersion": "gateway.api-platform.wso2.com/v1alpha1", + "apiVersion": "gateway.api-platform.wso2.com/v1", "kind": "LlmProvider", "metadata": { "name": "wso2-openai-provider" @@ -378,7 +378,7 @@ Status Code **200** |Property|Value| |---|---| -|apiVersion|gateway.api-platform.wso2.com/v1alpha1| +|apiVersion|gateway.api-platform.wso2.com/v1| |kind|LlmProvider| |hostRewrite|auto| |hostRewrite|manual| @@ -400,7 +400,7 @@ Status Code **200** ```shell -curl -X GET http://localhost:9090/api/management/v0.9/llm-providers/{id} \ +curl -X GET http://localhost:9090/api/management/v1/llm-providers/{id} \ -u {username}:{password} \ -H 'Accept: application/json' @@ -429,7 +429,7 @@ Required roles: `admin`, `developer` ```json { - "apiVersion": "gateway.api-platform.wso2.com/v1alpha1", + "apiVersion": "gateway.api-platform.wso2.com/v1", "kind": "LlmProvider", "metadata": { "name": "wso2-openai-provider" @@ -499,7 +499,7 @@ Required roles: `admin`, `developer` ```shell -curl -X PUT http://localhost:9090/api/management/v0.9/llm-providers/{id} \ +curl -X PUT http://localhost:9090/api/management/v1/llm-providers/{id} \ -u {username}:{password} \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ @@ -513,7 +513,7 @@ Update an existing LLM provider in the Gateway. ```json { - "apiVersion": "gateway.api-platform.wso2.com/v1alpha1", + "apiVersion": "gateway.api-platform.wso2.com/v1", "kind": "LlmProvider", "metadata": { "name": "wso2-openai-provider" @@ -580,7 +580,7 @@ Required roles: `admin` ```json { - "apiVersion": "gateway.api-platform.wso2.com/v1alpha1", + "apiVersion": "gateway.api-platform.wso2.com/v1", "kind": "LlmProvider", "metadata": { "name": "wso2-openai-provider" @@ -651,7 +651,7 @@ Required roles: `admin` ```shell -curl -X DELETE http://localhost:9090/api/management/v0.9/llm-providers/{id} \ +curl -X DELETE http://localhost:9090/api/management/v1/llm-providers/{id} \ -u {username}:{password} \ -H 'Accept: application/json' @@ -714,7 +714,7 @@ Status Code **200** ```shell -curl -X POST http://localhost:9090/api/management/v0.9/llm-providers/{id}/api-keys \ +curl -X POST http://localhost:9090/api/management/v1/llm-providers/{id}/api-keys \ -u {username}:{password} \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ @@ -791,7 +791,7 @@ Required roles: `admin`, `consumer` ```shell -curl -X GET http://localhost:9090/api/management/v0.9/llm-providers/{id}/api-keys \ +curl -X GET http://localhost:9090/api/management/v1/llm-providers/{id}/api-keys \ -u {username}:{password} \ -H 'Accept: application/json' @@ -856,7 +856,7 @@ Required roles: `admin`, `consumer` ```shell -curl -X POST http://localhost:9090/api/management/v0.9/llm-providers/{id}/api-keys/{apiKeyName}/regenerate \ +curl -X POST http://localhost:9090/api/management/v1/llm-providers/{id}/api-keys/{apiKeyName}/regenerate \ -u {username}:{password} \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ @@ -931,7 +931,7 @@ Required roles: `admin`, `consumer` ```shell -curl -X PUT http://localhost:9090/api/management/v0.9/llm-providers/{id}/api-keys/{apiKeyName} \ +curl -X PUT http://localhost:9090/api/management/v1/llm-providers/{id}/api-keys/{apiKeyName} \ -u {username}:{password} \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ @@ -1009,7 +1009,7 @@ Required roles: `admin`, `consumer` ```shell -curl -X DELETE http://localhost:9090/api/management/v0.9/llm-providers/{id}/api-keys/{apiKeyName} \ +curl -X DELETE http://localhost:9090/api/management/v1/llm-providers/{id}/api-keys/{apiKeyName} \ -u {username}:{password} \ -H 'Accept: application/json' diff --git a/en/docs/api-gateway/next/gateway-controller-management-api/llm-provider-template-management.md b/en/docs/api-gateway/next/gateway-controller-management-api/llm-provider-template-management.md index d1e885703..0042a2793 100644 --- a/en/docs/api-gateway/next/gateway-controller-management-api/llm-provider-template-management.md +++ b/en/docs/api-gateway/next/gateway-controller-management-api/llm-provider-template-management.md @@ -26,7 +26,7 @@ CRUD operations for LLM Provider Template configurations ```shell -curl -X POST http://localhost:9090/api/management/v0.9/llm-provider-templates \ +curl -X POST http://localhost:9090/api/management/v1/llm-provider-templates \ -u {username}:{password} \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ @@ -40,7 +40,7 @@ Add a new LLM provider template to the Gateway. A template defines token trackin ```json { - "apiVersion": "gateway.api-platform.wso2.com/v1alpha1", + "apiVersion": "gateway.api-platform.wso2.com/v1", "kind": "LlmProviderTemplate", "metadata": { "name": "openai-template" @@ -75,6 +75,20 @@ Add a new LLM provider template to the Gateway. A template defines token trackin } ``` +!!! note "Using a YAML downloaded from AI Workspace" + If you downloaded the template YAML from AI Workspace, you have two options to use it with this endpoint: + + - **Convert to JSON:** Convert the YAML file to JSON before passing it as the request body with `-H 'Content-Type: application/json'`. + - **Send as YAML:** Pass the YAML file directly and change the content type header to `application/yaml`: + + ```shell + curl -X POST http://localhost:9090/api/management/v1/llm-provider-templates \ + -u {username}:{password} \ + -H 'Content-Type: application/yaml' \ + -H 'Accept: application/json' \ + --data-binary @template.yaml + ``` + ### Authentication