From 91ec070a3d4c82c69033f209770e0041eed9406f Mon Sep 17 00:00:00 2001 From: Thenujan Date: Tue, 21 Oct 2025 15:52:51 +0530 Subject: [PATCH 1/2] Add ai api and mcp server sample test data --- .../AnthropicAPI/Definitions/swagger.yaml | 5173 +++++++++++++++++ .../testdata/AnthropicAPI/api.yaml | 568 ++ .../testdata/SampleMCP/backends.yaml | 8 + .../testdata/SampleMCP/mcp_server.yaml | 148 + 4 files changed, 5897 insertions(+) create mode 100644 import-export-cli/integration/testdata/AnthropicAPI/Definitions/swagger.yaml create mode 100644 import-export-cli/integration/testdata/AnthropicAPI/api.yaml create mode 100644 import-export-cli/integration/testdata/SampleMCP/backends.yaml create mode 100644 import-export-cli/integration/testdata/SampleMCP/mcp_server.yaml diff --git a/import-export-cli/integration/testdata/AnthropicAPI/Definitions/swagger.yaml b/import-export-cli/integration/testdata/AnthropicAPI/Definitions/swagger.yaml new file mode 100644 index 00000000..011ff22f --- /dev/null +++ b/import-export-cli/integration/testdata/AnthropicAPI/Definitions/swagger.yaml @@ -0,0 +1,5173 @@ +openapi: 3.0.0 +info: + title: AnthropicAPIs + version: "1" +servers: + - + url: https://api.anthropic.com +security: + - + default: [] +paths: + /v1/messages: + post: + tags: + - Messages + summary: Create a chat completion + description: Creates a chat completion with the specified model and parameters. The response is generated based on the provided messages and system prompt. + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicBetaHeader" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MessageRequestBody" + required: true + responses: + "200": + description: Successful response + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + anthropic-ratelimit-requests-limit: + $ref: "#/components/headers/AnthropicRateLimitRequestsLimit" + anthropic-ratelimit-requests-remaining: + $ref: "#/components/headers/AnthropicRateLimitRequestsRemaining" + anthropic-ratelimit-requests-reset: + $ref: "#/components/headers/AnthropicRateLimitRequestsReset" + anthropic-ratelimit-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitTokensLimit" + anthropic-ratelimit-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitTokensRemaining" + anthropic-ratelimit-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitTokensReset" + anthropic-ratelimit-input-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitInputTokensLimit" + anthropic-ratelimit-input-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitInputTokensRemaining" + anthropic-ratelimit-input-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitInputTokensReset" + anthropic-ratelimit-output-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensLimit" + anthropic-ratelimit-output-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensRemaining" + anthropic-ratelimit-output-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensReset" + anthropic-priority-input-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityInputTokensLimit" + anthropic-priority-input-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityInputTokensRemaining" + anthropic-priority-input-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityInputTokensReset" + anthropic-priority-output-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityOutputTokensLimit" + anthropic-priority-output-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityOutputTokensRemaining" + anthropic-priority-output-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityOutputTokensReset" + content: + application/json: + schema: + $ref: "#/components/schemas/MessageResponse" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/messages/count_tokens: + post: + tags: + - Messages + summary: Count tokens for a chat completion + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicBetaHeader" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + application/json: + schema: + required: + - messages + - model + type: object + properties: + messages: + $ref: "#/components/schemas/MessageRequest" + model: + $ref: "#/components/schemas/ModelRequest" + mcp_servers: + $ref: "#/components/schemas/MCPServers" + system: + $ref: "#/components/schemas/SystemRequest" + thinking: + $ref: "#/components/schemas/ThinkingRequest" + tool_choice: + $ref: "#/components/schemas/ToolChoiceRequest" + tools: + $ref: "#/components/schemas/ToolsRequest" + required: true + responses: + "200": + description: Successful response + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - input_tokens + type: object + properties: + input_tokens: + type: integer + description: "The total number of tokens across the provided list of messages, system prompt, and tools." + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/models: + get: + tags: + - Models + summary: List Models + description: List available models. The Models API response can be used to determine which models are available for use in the API. More recently released models are listed first. + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BeforeId" + - + $ref: "#/components/parameters/AfterId" + - + $ref: "#/components/parameters/Limit" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Successfully retrieved models + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - data + - first_id + - has_more + - last_id + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ModelResponseData" + first_id: + $ref: "#/components/schemas/FirstId" + has_more: + $ref: "#/components/schemas/HasMore" + last_id: + $ref: "#/components/schemas/LastId" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/models/{model_id}: + get: + tags: + - Models + summary: Get a Model + description: Get a specific model. The Models API response can be used to determine information about a specific model or resolve a model alias to a model ID. + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + - + name: model_id + in: path + description: Model identifier or alias. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Successfully retrieved model + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/ModelResponseData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/messages/batches: + get: + tags: + - Message Batches + summary: List Message Batches + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BeforeId" + - + $ref: "#/components/parameters/AfterId" + - + $ref: "#/components/parameters/Limit" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Successfully retrieved message batches + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - data + - first_id + - has_more + - last_id + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/MessageBatchResponse" + has_more: + type: boolean + description: Indicates if there are more results in the requested page direction. + first_id: + type: string + description: First ID in the data list. Can be used as the before_id for the previous page. + nullable: true + last_id: + type: string + description: Last ID in the data list. Can be used as the after_id for the next page. + nullable: true + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Message Batches + summary: Create multiple chat completions in a batch + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicBetaHeader" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + application/json: + schema: + required: + - requests + type: object + properties: + requests: + type: array + items: + required: + - custom_id + - params + type: object + properties: + custom_id: + maxLength: 64 + minLength: 1 + type: string + params: + $ref: "#/components/schemas/MessageRequestBody" + required: true + responses: + "200": + description: Successfully created message batch + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + anthropic-ratelimit-requests-limit: + $ref: "#/components/headers/AnthropicRateLimitRequestsLimit" + anthropic-ratelimit-requests-remaining: + $ref: "#/components/headers/AnthropicRateLimitRequestsRemaining" + anthropic-ratelimit-requests-reset: + $ref: "#/components/headers/AnthropicRateLimitRequestsReset" + anthropic-ratelimit-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitTokensLimit" + anthropic-ratelimit-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitTokensRemaining" + anthropic-ratelimit-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitTokensReset" + anthropic-ratelimit-input-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitInputTokensLimit" + anthropic-ratelimit-input-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitInputTokensRemaining" + anthropic-ratelimit-input-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitInputTokensReset" + anthropic-ratelimit-output-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensLimit" + anthropic-ratelimit-output-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensRemaining" + anthropic-ratelimit-output-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensReset" + anthropic-priority-input-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityInputTokensLimit" + anthropic-priority-input-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityInputTokensRemaining" + anthropic-priority-input-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityInputTokensReset" + anthropic-priority-output-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityOutputTokensLimit" + anthropic-priority-output-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityOutputTokensRemaining" + anthropic-priority-output-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityOutputTokensReset" + content: + application/json: + schema: + $ref: "#/components/schemas/MessageBatchResponse" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/messages/batches/{message_batch_id}: + get: + tags: + - Message Batches + summary: Retrieve a Message Batch + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BatchId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Successfully retrieved message batch + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/MessageBatchResponse" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + delete: + tags: + - Message Batches + summary: Delete a Message Batch + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BatchId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Successfully deleted message batch + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - id + - type + type: object + properties: + id: + type: string + type: + type: string + enum: + - message_batch_deleted + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/messages/batches/{message_batch_id}/results: + get: + tags: + - Message Batches + summary: Retrieve Message Batch Results. The path for retrieving Message Batch results should be pulled from the batch's results_url. This path should not be assumed and may change. + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BatchId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Successfully retrieved batch results + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/x-jsonl: + schema: + required: + - custom_id + - result + properties: + custom_id: + type: string + description: "Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order. Must be unique for each request within the Message Batch." + result: + type: object + oneOf: + - + $ref: "#/components/schemas/MessageBatchSucceededResult" + - + $ref: "#/components/schemas/MessageBatchErroredResult" + - + $ref: "#/components/schemas/MessageBatchCanceledResult" + - + $ref: "#/components/schemas/MessageBatchExpiredResult" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/messages/batches/{message_batch_id}/cancel: + post: + tags: + - Message Batches + summary: Cancel a Message Batch + description: Cancels an in-progress message batch. Non-interruptible requests may complete before cancellation is finalized. + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BatchId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Successfully initiated batch cancellation + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/MessageBatchResponse" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/files: + get: + tags: + - Files + summary: List Files + description: Retrieves a list of all files + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicBetaHeader" + - + $ref: "#/components/parameters/BeforeId" + - + $ref: "#/components/parameters/AfterId" + - + $ref: "#/components/parameters/Limit" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Files retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - data + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/FileData" + first_id: + $ref: "#/components/schemas/FirstId" + has_more: + $ref: "#/components/schemas/HasMore" + last_id: + $ref: "#/components/schemas/LastId" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Files + summary: Upload a File + description: The Files API allows you to upload and manage files to use with the Anthropic API without having to re-upload content with each request. + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicBetaHeader" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + multipart/form-data: + schema: + required: + - file + type: object + properties: + file: + type: string + description: The file to upload + format: binary + required: true + responses: + "200": + description: Users retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/FileData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/files/{file_id}: + get: + tags: + - Files + summary: Get a File + description: Retrieves a file by its ID + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicBetaHeader" + - + $ref: "#/components/parameters/FileId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: File retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/FileData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + delete: + tags: + - Files + summary: Delete a File + description: Deletes a file by its ID + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicBetaHeader" + - + $ref: "#/components/parameters/FileId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: File deleted successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - id + type: object + properties: + id: + type: string + description: ID of the deleted File. + type: + type: string + enum: + - file_deleted + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/files/{file_id}/content: + get: + tags: + - Files + summary: Get a File Content + description: Retrieves a file content by its ID + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/AnthropicBetaHeader" + - + $ref: "#/components/parameters/FileId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: File content retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/octet-stream: + schema: + type: string + format: binary + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/users: + get: + tags: + - Admin - Organization Member Management + summary: List Users + description: Retrieves a list of all users + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BeforeId" + - + $ref: "#/components/parameters/AfterId" + - + $ref: "#/components/parameters/Limit" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + - + name: email + in: query + description: Filter by user email. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Users retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - data + - first_id + - has_more + - last_id + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/AdminMemberManagementUserData" + first_id: + $ref: "#/components/schemas/FirstId" + has_more: + $ref: "#/components/schemas/HasMore" + last_id: + $ref: "#/components/schemas/LastId" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/users/{user_id}: + get: + tags: + - Admin - Organization Member Management + summary: Get User + description: Retrieves details for a specific user + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/UserId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: User details retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminMemberManagementUserData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Admin - Organization Member Management + summary: Update User + description: Updates details for a specific user + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/UserId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + application/json: + schema: + required: + - role + type: object + properties: + role: + type: string + description: New role for the User. Cannot be "admin". + enum: + - user + - developer + - billing + required: true + responses: + "200": + description: User updated successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminMemberManagementUserData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + delete: + tags: + - Admin - Organization Member Management + summary: Remove User + description: Removes a user from the organization + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/UserId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: User successfully removed + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - id + - type + type: object + properties: + id: + type: string + description: ID of the deleted User. + type: + type: string + description: "Object type. For deleted Users, this is always \"user_deleted\"." + default: user_deleted + enum: + - user_deleted + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/invites: + get: + tags: + - Admin - Organization Invites + summary: List Invites + description: Retrieves a list of all organization invites + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BeforeId" + - + $ref: "#/components/parameters/AfterId" + - + $ref: "#/components/parameters/Limit" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Invites retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - data + - first_id + - has_more + - last_id + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/AdminInviteData" + first_id: + $ref: "#/components/schemas/FirstId" + has_more: + $ref: "#/components/schemas/HasMore" + last_id: + $ref: "#/components/schemas/LastId" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Admin - Organization Invites + summary: Create Invite + description: Creates a new organization invite + requestBody: + content: + application/json: + schema: + required: + - email + - role + type: object + properties: + email: + type: string + description: Email of the User. + role: + type: string + description: Role for the invited User. Cannot be "admin". + enum: + - user + - developer + - billing + required: true + responses: + "200": + description: Invite created successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminInviteData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/invites/{invite_id}: + get: + tags: + - Admin - Organization Invites + summary: Get Invite + description: Retrieves details for a specific invite + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/InviteId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Invite details retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminInviteData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + delete: + tags: + - Admin - Organization Invites + summary: Delete Invite + description: Deletes an existing organization invite + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/InviteId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Invite deleted successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - id + - type + type: object + properties: + id: + type: string + description: ID of the deleted Invite. + type: + type: string + description: "Deleted object type. For Invites, this is always \"invite_deleted\"." + default: invite_deleted + enum: + - invite_deleted + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/workspaces: + get: + tags: + - Admin - Workspace Management + summary: List Workspaces + description: Retrieves a list of all workspaces + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + name: include_archived + in: query + description: Whether to include Workspaces that have been archived in the response + required: false + style: form + explode: true + schema: + type: boolean + default: false + - + $ref: "#/components/parameters/BeforeId" + - + $ref: "#/components/parameters/AfterId" + - + $ref: "#/components/parameters/Limit" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Workspaces retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - data + - first_id + - has_more + - last_id + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/AdminWorkspaceData" + first_id: + $ref: "#/components/schemas/FirstId" + has_more: + $ref: "#/components/schemas/HasMore" + last_id: + $ref: "#/components/schemas/LastId" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Admin - Workspace Management + summary: Create Workspace + description: Creates a new workspace + requestBody: + content: + application/json: + schema: + required: + - name + type: object + properties: + name: + maxLength: 40 + minLength: 1 + type: string + description: Name of the Workspace. + required: true + responses: + "200": + description: Workspace created successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminWorkspaceData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/workspaces/{workspace_id}: + get: + tags: + - Admin - Workspace Management + summary: Get Workspace + description: Retrieves details for a specific workspace + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/WorkspaceId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Workspace details retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminWorkspaceData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Admin - Workspace Management + summary: Update Workspace + description: Updates details for a specific workspace + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/WorkspaceId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + application/json: + schema: + required: + - name + type: object + properties: + name: + maxLength: 40 + minLength: 1 + type: string + description: Name of the Workspace. + required: true + responses: + "200": + description: Workspace updated successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminWorkspaceData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/workspaces/{workspace_id}/archive: + post: + tags: + - Admin - Workspace Management + summary: Archive Workspace + description: Archives a specific workspace + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/WorkspaceId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Workspace archived successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminWorkspaceData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/workspaces/{workspace_id}/members: + get: + tags: + - Admin - Workspace Member Management + summary: List Workspace Members + description: Retrieves a list of all members in a workspace + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/WorkspaceId" + - + $ref: "#/components/parameters/BeforeId" + - + $ref: "#/components/parameters/AfterId" + - + $ref: "#/components/parameters/Limit" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Workspace members retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - data + - first_id + - has_more + - last_id + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/AdminWorkspaceMemberData" + first_id: + $ref: "#/components/schemas/FirstId" + has_more: + $ref: "#/components/schemas/HasMore" + last_id: + $ref: "#/components/schemas/LastId" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Admin - Workspace Member Management + summary: Create Workspace Member + description: Creates a new workspace member + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/WorkspaceId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + application/json: + schema: + required: + - user_id + - workspace_role + type: object + properties: + user_id: + type: string + description: ID of the User. + workspace_role: + type: string + description: Role of the new Workspace Member. Cannot be "workspace_billing". + enum: + - workspace_user + - workspace_developer + - workspace_admin + required: true + responses: + "200": + description: Workspace member created successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminWorkspaceMemberData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/workspaces/{workspace_id}/members/{user_id}: + get: + tags: + - Admin - Workspace Member Management + summary: Get Workspace Member + description: Retrieves details for a specific workspace member + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/WorkspaceId" + - + $ref: "#/components/parameters/UserId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Workspace member details retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminWorkspaceMemberData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Admin - Workspace Member Management + summary: Update Workspace Member + description: Updates details for a specific workspace member + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/WorkspaceId" + - + $ref: "#/components/parameters/UserId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + application/json: + schema: + required: + - workspace_role + type: object + properties: + workspace_role: + type: string + description: New workspace role for the User. + enum: + - workspace_user + - workspace_developer + - workspace_admin + - workspace_billing + required: true + responses: + "200": + description: Workspace member updated successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminWorkspaceMemberData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + delete: + tags: + - Admin - Workspace Member Management + summary: Delete Workspace Member + description: Removes a member from the workspace + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/WorkspaceId" + - + $ref: "#/components/parameters/UserId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: Workspace member successfully removed + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - type + - user_id + - workspace_id + type: object + properties: + type: + type: string + description: "Deleted object type. For Workspace Members, this is always \"workspace_member_deleted\"." + default: workspace_member_deleted + enum: + - workspace_member_deleted + user_id: + type: string + description: ID of the User. + workspace_id: + type: string + description: ID of the Workspace. + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/api_keys: + get: + tags: + - Admin - API Keys + summary: List Api Keys + description: Retrieves a list of all API keys + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/BeforeId" + - + $ref: "#/components/parameters/AfterId" + - + $ref: "#/components/parameters/Limit" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + - + name: status + in: query + description: Filter by API key status. + required: false + style: form + explode: true + schema: + type: string + nullable: true + enum: + - active + - inactive + - archived + - + name: workspace_id + in: query + description: Filter by Workspace ID. + required: false + style: form + explode: true + schema: + type: string + nullable: true + - + name: created_by_user_id + in: query + description: Filter by the ID of the User who created the object. + required: false + style: form + explode: true + schema: + type: string + nullable: true + responses: + "200": + description: API keys retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + required: + - data + - first_id + - has_more + - last_id + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/AdminAPIKeyData" + first_id: + $ref: "#/components/schemas/FirstId" + has_more: + $ref: "#/components/schemas/HasMore" + last_id: + $ref: "#/components/schemas/LastId" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/organizations/api_keys/{api_key_id}: + get: + tags: + - Admin - API Keys + summary: Get Api Key + description: Retrieves details for a specific API key + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/ApiKeyId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + responses: + "200": + description: API key details retrieved successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminAPIKeyData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + post: + tags: + - Admin - API Keys + summary: Update Api Key + description: Updates details for a specific API key + parameters: + - + $ref: "#/components/parameters/AnthropicVersionHeader" + - + $ref: "#/components/parameters/ApiKeyId" + - + $ref: "#/components/parameters/AnthropicDangerousDirectBrowserAccessHeader" + requestBody: + content: + application/json: + schema: + type: object + properties: + name: + maxLength: 500 + minLength: 1 + type: string + description: Name of the API key. + status: + type: string + description: Status of the API key. + nullable: true + enum: + - active + - inactive + - archived + required: true + responses: + "200": + description: API key updated successfully + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/AdminAPIKeyData" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/experimental/generate_prompt: + post: + tags: + - Experimental - Prompt Tools + summary: Generate Prompt + description: Generates a prompt for a given input + parameters: + - + $ref: "#/components/parameters/AnthropicBetaHeader" + requestBody: + content: + application/json: + schema: + required: + - task + type: object + properties: + task: + type: string + description: Description of the prompt's purpose. + target_model: + maxLength: 256 + minLength: 1 + type: string + description: The model this prompt will be used for. + nullable: true + required: true + responses: + "200": + description: Successful response + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + anthropic-ratelimit-requests-limit: + $ref: "#/components/headers/AnthropicRateLimitRequestsLimit" + anthropic-ratelimit-requests-remaining: + $ref: "#/components/headers/AnthropicRateLimitRequestsRemaining" + anthropic-ratelimit-requests-reset: + $ref: "#/components/headers/AnthropicRateLimitRequestsReset" + anthropic-ratelimit-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitTokensLimit" + anthropic-ratelimit-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitTokensRemaining" + anthropic-ratelimit-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitTokensReset" + anthropic-ratelimit-input-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitInputTokensLimit" + anthropic-ratelimit-input-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitInputTokensRemaining" + anthropic-ratelimit-input-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitInputTokensReset" + anthropic-ratelimit-output-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensLimit" + anthropic-ratelimit-output-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensRemaining" + anthropic-ratelimit-output-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensReset" + anthropic-priority-input-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityInputTokensLimit" + anthropic-priority-input-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityInputTokensRemaining" + anthropic-priority-input-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityInputTokensReset" + anthropic-priority-output-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityOutputTokensLimit" + anthropic-priority-output-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityOutputTokensRemaining" + anthropic-priority-output-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityOutputTokensReset" + content: + application/json: + schema: + required: + - message + - system + - usage + type: object + properties: + messages: + type: array + description: "The response contains a list of message objects in the same format used by the Messages API. Typically includes a user message with the complete generated prompt text, and may include an assistant message with a prefill to guide the model's initial response. These messages can be used directly in a Messages API request to start a conversation with the generated prompt." + items: + $ref: "#/components/schemas/Message" + system: + type: string + description: "Currently, the system field is always returned as an empty string (\"\"). In future iterations, this field may contain generated system prompts. Directions similar to what would normally be included in a system prompt are included in messages when generating a prompt." + default: "" + usage: + $ref: "#/components/schemas/Usage" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/experimental/improve_prompt: + post: + tags: + - Experimental - Prompt Tools + summary: Improve Prompt + description: Improves a prompt for a given input + parameters: + - + $ref: "#/components/parameters/AnthropicBetaHeader" + requestBody: + content: + application/json: + schema: + required: + - message + type: object + properties: + messages: + type: array + description: "The response contains a list of message objects in the same format used by the Messages API. Typically includes a user message with the complete generated prompt text, and may include an assistant message with a prefill to guide the model's initial response. These messages can be used directly in a Messages API request to start a conversation with the generated prompt." + items: + $ref: "#/components/schemas/Message" + feedback: + type: string + nullable: true + system: + type: string + nullable: true + target_model: + maxLength: 256 + minLength: 1 + type: string + description: The model this prompt will be used for. + nullable: true + required: true + responses: + "200": + description: Successful response + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + anthropic-ratelimit-requests-limit: + $ref: "#/components/headers/AnthropicRateLimitRequestsLimit" + anthropic-ratelimit-requests-remaining: + $ref: "#/components/headers/AnthropicRateLimitRequestsRemaining" + anthropic-ratelimit-requests-reset: + $ref: "#/components/headers/AnthropicRateLimitRequestsReset" + anthropic-ratelimit-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitTokensLimit" + anthropic-ratelimit-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitTokensRemaining" + anthropic-ratelimit-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitTokensReset" + anthropic-ratelimit-input-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitInputTokensLimit" + anthropic-ratelimit-input-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitInputTokensRemaining" + anthropic-ratelimit-input-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitInputTokensReset" + anthropic-ratelimit-output-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensLimit" + anthropic-ratelimit-output-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensRemaining" + anthropic-ratelimit-output-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensReset" + anthropic-priority-input-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityInputTokensLimit" + anthropic-priority-input-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityInputTokensRemaining" + anthropic-priority-input-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityInputTokensReset" + anthropic-priority-output-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityOutputTokensLimit" + anthropic-priority-output-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityOutputTokensRemaining" + anthropic-priority-output-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityOutputTokensReset" + content: + application/json: + schema: + required: + - message + - system + - usage + type: object + properties: + messages: + type: array + description: "The response contains a list of message objects in the same format used by the Messages API. Typically includes a user message with the complete generated prompt text, and may include an assistant message with a prefill to guide the model's initial response. These messages can be used directly in a Messages API request to start a conversation with the generated prompt." + items: + $ref: "#/components/schemas/Message" + system: + type: string + description: "Currently, the system field is always returned as an empty string (\"\"). In future iterations, this field may contain generated system prompts. Directions similar to what would normally be included in a system prompt are included in messages when generating a prompt." + default: "" + usage: + $ref: "#/components/schemas/Usage" + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false + /v1/experimental/templatize_prompt: + post: + tags: + - Experimental - Prompt Tools + summary: Templatize Prompt + description: Templatizes a prompt for a given input + parameters: + - + $ref: "#/components/parameters/AnthropicBetaHeader" + requestBody: + content: + application/json: + schema: + required: + - message + type: object + properties: + messages: + type: array + description: "The response contains a list of message objects in the same format used by the Messages API. Typically includes a user message with the complete generated prompt text, and may include an assistant message with a prefill to guide the model's initial response. These messages can be used directly in a Messages API request to start a conversation with the generated prompt." + items: + $ref: "#/components/schemas/Message" + system: + type: string + nullable: true + required: true + responses: + "200": + description: Successful response + headers: + request-id: + $ref: "#/components/headers/RequestId" + anthropic-organization-id: + $ref: "#/components/headers/AnthropicOrganizationId" + retry-after: + $ref: "#/components/headers/RetryAfter" + anthropic-ratelimit-requests-limit: + $ref: "#/components/headers/AnthropicRateLimitRequestsLimit" + anthropic-ratelimit-requests-remaining: + $ref: "#/components/headers/AnthropicRateLimitRequestsRemaining" + anthropic-ratelimit-requests-reset: + $ref: "#/components/headers/AnthropicRateLimitRequestsReset" + anthropic-ratelimit-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitTokensLimit" + anthropic-ratelimit-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitTokensRemaining" + anthropic-ratelimit-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitTokensReset" + anthropic-ratelimit-input-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitInputTokensLimit" + anthropic-ratelimit-input-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitInputTokensRemaining" + anthropic-ratelimit-input-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitInputTokensReset" + anthropic-ratelimit-output-tokens-limit: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensLimit" + anthropic-ratelimit-output-tokens-remaining: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensRemaining" + anthropic-ratelimit-output-tokens-reset: + $ref: "#/components/headers/AnthropicRateLimitOutputTokensReset" + anthropic-priority-input-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityInputTokensLimit" + anthropic-priority-input-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityInputTokensRemaining" + anthropic-priority-input-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityInputTokensReset" + anthropic-priority-output-tokens-limit: + $ref: "#/components/headers/AnthropicPriorityOutputTokensLimit" + anthropic-priority-output-tokens-remaining: + $ref: "#/components/headers/AnthropicPriorityOutputTokensRemaining" + anthropic-priority-output-tokens-reset: + $ref: "#/components/headers/AnthropicPriorityOutputTokensReset" + content: + application/json: + schema: + required: + - message + - system + - usage + - variable_values + type: object + properties: + messages: + type: array + description: "The response contains a list of message objects in the same format used by the Messages API. Typically includes a user message with the complete generated prompt text, and may include an assistant message with a prefill to guide the model's initial response. These messages can be used directly in a Messages API request to start a conversation with the generated prompt." + items: + $ref: "#/components/schemas/Message" + system: + type: string + description: "Currently, the system field is always returned as an empty string (\"\"). In future iterations, this field may contain generated system prompts. Directions similar to what would normally be included in a system prompt are included in messages when generating a prompt." + default: "" + usage: + $ref: "#/components/schemas/Usage" + variable_values: + type: object + additionalProperties: + type: string + description: "A mapping of template variable names to their original values, as extracted from the input prompt during templatization. Each key represents a variable name identified in the templatized prompt, and each value contains the corresponding content from the original prompt that was replaced by that variable." + "400": + $ref: "#/components/responses/Error400" + "401": + $ref: "#/components/responses/Error401" + "403": + $ref: "#/components/responses/Error403" + "404": + $ref: "#/components/responses/Error404" + "413": + $ref: "#/components/responses/Error413" + "429": + $ref: "#/components/responses/Error429" + "500": + $ref: "#/components/responses/Error500" + "529": + $ref: "#/components/responses/Error529" + security: + - + ApiKeyAuth: [] + - + default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + x-wso2-application-security: + security-types: + - api_key + optional: false +components: + schemas: + CacheControl: + required: + - type + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + description: Controls caching behavior for this content + nullable: true + CharacterLocation: + required: + - cited_text + - document_index + - document_title + - end_char_index + - start_char_index + - type + type: object + properties: + cited_text: + type: string + description: The text being cited + document_index: + minimum: 1 + type: integer + description: Should be greater than 0 + document_title: + maxLength: 256 + minLength: 1 + type: string + nullable: true + end_char_index: + type: integer + start_char_index: + minimum: 1 + type: integer + description: Should be greater than 0 + type: + type: string + default: char_location + enum: + - char_location + PageLocation: + required: + - cited_text + - document_index + - document_title + - end_page_number + - start_page_number + - type + type: object + properties: + cited_text: + type: string + description: The text being cited + document_index: + minimum: 1 + type: integer + description: Should be greater than 0 + document_title: + maxLength: 256 + minLength: 1 + type: string + nullable: true + end_page_number: + type: integer + start_page_number: + minimum: 1 + type: integer + description: Should be greater than 0 + type: + type: string + default: page_location + enum: + - page_location + ContentBlockLocation: + required: + - cited_text + - document_index + - document_title + - end_block_index + - start_block_index + - type + type: object + properties: + cited_text: + type: string + description: The text being cited + document_index: + minimum: 1 + type: integer + description: Should be greater than 0 + document_title: + maxLength: 256 + minLength: 1 + type: string + nullable: true + end_block_index: + type: integer + start_block_index: + minimum: 1 + type: integer + description: Should be greater than 0 + type: + type: string + enum: + - content_block_location + RequestWebSearchResultLocationCitation: + required: + - cited_text + - encrypted_index + - title + - type + - url + type: object + properties: + cited_text: + type: string + encrypted_index: + type: string + title: + maxLength: 256 + minLength: 1 + type: string + nullable: true + type: + type: string + enum: + - web_search_result_location + url: + maxLength: 2048 + minLength: 1 + type: string + Citations: + type: array + description: Citations supporting the text block. + nullable: true + items: + oneOf: + - + $ref: "#/components/schemas/CharacterLocation" + - + $ref: "#/components/schemas/PageLocation" + - + $ref: "#/components/schemas/ContentBlockLocation" + - + $ref: "#/components/schemas/RequestWebSearchResultLocationCitation" + ServerToolUse: + required: + - id + - input + - name + - type + type: object + properties: + id: + type: string + input: + type: object + name: + type: string + enum: + - web_search + - code_execution + cache_control: + $ref: "#/components/schemas/CacheControl" + WebSearchToolResultObject: + required: + - error_code + - type + type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + type: + type: string + enum: + - web_search_tool_result_error + WebSearchToolResultObjectArray: + type: array + items: + required: + - encrypted_content + - page_age + - title + - type + - url + type: object + properties: + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: + minLength: 1 + type: string + type: + type: string + enum: + - web_search_result + url: + minLength: 1 + type: string + WebSearchToolResult: + required: + - content + - tool_use_id + - type + type: object + properties: + content: + oneOf: + - + $ref: "#/components/schemas/WebSearchToolResultObject" + - + $ref: "#/components/schemas/WebSearchToolResultObjectArray" + tool_use_id: + type: string + type: + type: string + enum: + - web_search_tool_result + cache_control: + $ref: "#/components/schemas/CacheControl" + RequestCodeExecutionToolResultBlockErrorContent: + required: + - error_code + - type + type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - execution_time_exceeded + type: + type: string + enum: + - code_execution_tool_result_error + RequestCodeExecutionToolResultBlockContent: + required: + - content + - return_code + - stderr + - stdout + - type + type: object + properties: + content: + type: array + items: + required: + - file_id + - type + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + return_code: + type: integer + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + RequestCodeExecutionToolResultBlock: + required: + - content + - tool_use_id + - type + type: object + properties: + content: + type: object + oneOf: + - + $ref: "#/components/schemas/RequestCodeExecutionToolResultBlockErrorContent" + - + $ref: "#/components/schemas/RequestCodeExecutionToolResultBlockContent" + tool_use_id: + type: string + type: + type: string + enum: + - code_execution_tool_result + cache_control: + $ref: "#/components/schemas/CacheControl" + RequestMCPToolUseBlock: + required: + - id + - input + - name + - server_name + - type + type: object + properties: + id: + type: string + input: + type: object + name: + type: string + server_name: + type: string + type: + type: string + enum: + - mcp_tool_use + cache_control: + $ref: "#/components/schemas/CacheControl" + RequestMCPToolResultBlockContentObject: + required: + - text + - type + type: object + properties: + text: + minLength: 1 + type: string + type: + type: string + enum: + - text + cache_control: + $ref: "#/components/schemas/CacheControl" + citations: + $ref: "#/components/schemas/Citations" + RequestMCPToolResultBlock: + required: + - tool_use_id + - type + type: object + properties: + tool_use_id: + type: string + type: + type: string + enum: + - mcp_tool_result + cache_control: + $ref: "#/components/schemas/CacheControl" + content: + oneOf: + - + type: string + - + type: array + items: + $ref: "#/components/schemas/RequestMCPToolResultBlockContentObject" + is_error: + type: boolean + Text: + required: + - text + - type + type: object + properties: + text: + minLength: 1 + type: string + type: + type: string + enum: + - text + cache_control: + $ref: "#/components/schemas/CacheControl" + citations: + $ref: "#/components/schemas/Citations" + ImageBase64: + required: + - data + - media_type + - type + type: object + properties: + data: + type: string + media_type: + type: string + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + type: + type: string + enum: + - base64 + URL: + required: + - type + - url + type: object + properties: + type: + type: string + enum: + - url + url: + type: string + File: + required: + - file_id + - type + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - file + Image: + required: + - source + - type + type: object + properties: + source: + oneOf: + - + $ref: "#/components/schemas/ImageBase64" + - + $ref: "#/components/schemas/URL" + - + $ref: "#/components/schemas/File" + type: + type: string + enum: + - image + cache_control: + $ref: "#/components/schemas/CacheControl" + ToolUse: + required: + - id + - input + - name + - type + type: object + properties: + id: + type: string + input: + type: object + name: + maxLength: 200 + minLength: 1 + type: string + type: + type: string + enum: + - tool_use + cache_control: + $ref: "#/components/schemas/CacheControl" + ToolResult: + required: + - tool_use_id + - type + type: object + properties: + tool_use_id: + type: string + type: + type: string + enum: + - tool_result + cache_control: + $ref: "#/components/schemas/CacheControl" + content: + oneOf: + - + type: string + - + type: object + oneOf: + - + $ref: "#/components/schemas/Text" + - + $ref: "#/components/schemas/Image" + is_error: + type: boolean + Base64PDF: + required: + - data + - media_type + - type + type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + PlainTextPDF: + required: + - data + - media_type + - type + type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + ContentBlockPDF: + required: + - content + - type + type: object + properties: + content: + oneOf: + - + type: string + - + type: object + oneOf: + - + $ref: "#/components/schemas/Text" + - + $ref: "#/components/schemas/Image" + type: + type: string + enum: + - content + Document: + required: + - source + - type + type: object + properties: + source: + type: object + oneOf: + - + $ref: "#/components/schemas/Base64PDF" + - + $ref: "#/components/schemas/PlainTextPDF" + - + $ref: "#/components/schemas/ContentBlockPDF" + - + $ref: "#/components/schemas/URL" + - + $ref: "#/components/schemas/File" + type: + type: string + enum: + - document + cache_control: + $ref: "#/components/schemas/CacheControl" + citations: + type: object + properties: + enabled: + type: boolean + context: + minLength: 1 + type: string + nullable: true + title: + maxLength: 500 + minLength: 1 + type: string + nullable: true + Thinking: + required: + - signature + - thinking + - type + type: object + properties: + signature: + type: string + thinking: + type: string + type: + type: string + enum: + - thinking + RedactedThinking: + required: + - data + - type + type: object + properties: + data: + type: string + type: + type: string + enum: + - redacted_thinking + RequestContainerUploadBlock: + required: + - file_id + - type + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - container_upload + cache_control: + $ref: "#/components/schemas/CacheControl" + Message: + required: + - content + - role + type: object + properties: + role: + type: string + enum: + - user + - assistant + content: + oneOf: + - + type: string + - + type: array + items: + required: + - type + type: object + oneOf: + - + $ref: "#/components/schemas/ServerToolUse" + - + $ref: "#/components/schemas/WebSearchToolResult" + - + $ref: "#/components/schemas/RequestCodeExecutionToolResultBlock" + - + $ref: "#/components/schemas/RequestMCPToolUseBlock" + - + $ref: "#/components/schemas/Text" + - + $ref: "#/components/schemas/Image" + - + $ref: "#/components/schemas/ToolUse" + - + $ref: "#/components/schemas/ToolResult" + - + $ref: "#/components/schemas/Document" + - + $ref: "#/components/schemas/Thinking" + - + $ref: "#/components/schemas/RedactedThinking" + - + $ref: "#/components/schemas/RequestContainerUploadBlock" + ToolConfiguration: + type: object + properties: + allowed_tools: + type: array + nullable: true + items: + type: string + enabled: + type: boolean + nullable: true + nullable: true + MCPServers: + required: + - name + - type + type: object + properties: + name: + type: string + type: + type: string + enum: + - url + url: + type: string + authorization_token: + type: string + nullable: true + tool_configuration: + $ref: "#/components/schemas/ToolConfiguration" + ThinkingEnabled: + required: + - type + type: object + properties: + type: + type: string + enum: + - enabled + budget_tokens: + minimum: 1024 + type: integer + description: Tokens allocated for Claude's internal reasoning. Must be at least 1024 and cannot exceed max_tokens value. + ThinkingDisabled: + required: + - type + type: object + properties: + type: + type: string + enum: + - disabled + ToolChoiceAuto: + required: + - type + type: object + properties: + type: + type: string + enum: + - auto + disable_parallel_tool_use: + type: boolean + description: Whether to disable parallel tool use + default: false + description: Automatically choose whether and which tool to use + ToolChoiceAny: + required: + - type + type: object + properties: + type: + type: string + enum: + - any + disable_parallel_tool_use: + type: boolean + description: Whether to disable parallel tool use + default: false + description: Automatically choose whether and which tool to use + ToolChoiceTool: + required: + - name + - type + type: object + properties: + name: + type: string + description: The name of the tool to use + type: + type: string + enum: + - tool + disable_parallel_tool_use: + type: boolean + description: Whether to disable parallel tool use + default: false + description: Automatically choose whether and which tool to use + ToolChoiceNone: + required: + - type + type: object + properties: + type: + type: string + enum: + - none + description: Do not use any tools + ToolInputSchema: + required: + - type + type: object + properties: + type: + type: string + enum: + - object + properties: + type: object + nullable: true + Tool: + required: + - input_schema + - name + type: object + properties: + input_schema: + $ref: "#/components/schemas/ToolInputSchema" + name: + maxLength: 64 + minLength: 1 + type: string + cache_control: + $ref: "#/components/schemas/CacheControl" + description: + type: string + type: + type: string + nullable: true + enum: + - custom + ComputerUseTool20241022: + required: + - display_height_px + - display_width_px + - name + - type + type: object + properties: + display_height_px: + minimum: 2 + type: integer + display_width_px: + minimum: 2 + type: integer + name: + type: string + enum: + - computer + type: + type: string + enum: + - computer_20241022 + cache_control: + $ref: "#/components/schemas/CacheControl" + display_number: + minimum: 1 + type: integer + nullable: true + BashTool20241022: + required: + - name + - type + type: object + properties: + name: + type: string + enum: + - bash + type: + type: string + enum: + - bash_20241022 + cache_control: + $ref: "#/components/schemas/CacheControl" + TextEditorTool20241022: + required: + - name + - type + type: object + properties: + name: + type: string + enum: + - str_replace_editor + type: + type: string + enum: + - text_editor_20241022 + cache_control: + $ref: "#/components/schemas/CacheControl" + ComputerUseTool20250124: + required: + - display_height_px + - display_width_px + - name + - type + type: object + properties: + display_height_px: + minimum: 2 + type: integer + display_width_px: + minimum: 2 + type: integer + name: + type: string + enum: + - computer + type: + type: string + enum: + - computer_20250124 + cache_control: + $ref: "#/components/schemas/CacheControl" + display_number: + minimum: 1 + type: integer + nullable: true + BashTool20250124: + required: + - name + - type + type: object + properties: + name: + type: string + enum: + - bash + type: + type: string + enum: + - bash_20250124 + cache_control: + $ref: "#/components/schemas/CacheControl" + TextEditorTool20250124: + required: + - name + - type + type: object + properties: + name: + type: string + enum: + - str_replace_editor + type: + type: string + enum: + - text_editor_20250124 + cache_control: + $ref: "#/components/schemas/CacheControl" + TextEditor20250429: + required: + - name + - type + type: object + properties: + name: + type: string + enum: + - str_replace_based_edit_tool + type: + type: string + enum: + - text_editor_20250429 + cache_control: + $ref: "#/components/schemas/CacheControl" + UserLocation: + type: object + properties: + type: + type: string + enum: + - approximate + city: + maxLength: 256 + minLength: 1 + type: string + nullable: true + country: + maxLength: 2 + minLength: 2 + type: string + description: ISO Code of the country. + nullable: true + region: + maxLength: 256 + minLength: 1 + type: string + nullable: true + timezone: + maxLength: 256 + minLength: 1 + type: string + description: IANA timezone of the user. + nullable: true + nullable: true + WebSearchTool20250305: + required: + - name + - type + type: object + properties: + name: + type: string + enum: + - web_search + type: + type: string + enum: + - web_search_20250305 + allowed_domains: + type: array + description: "If provided, only these domains will be included in results. Cannot be used alongside blocked_domains." + nullable: true + items: + type: string + blocked_domains: + type: array + description: "If provided, these domains will never appear in results. Cannot be used alongside allowed_domains." + nullable: true + items: + type: string + cache_control: + $ref: "#/components/schemas/CacheControl" + max_uses: + minimum: 1 + type: integer + nullable: true + user_location: + $ref: "#/components/schemas/UserLocation" + CodeExecutionTool20250522: + required: + - name + - type + type: object + properties: + name: + type: string + enum: + - code_execution + type: + type: string + enum: + - code_execution_20250522 + cache_control: + $ref: "#/components/schemas/CacheControl" + Container: + required: + - expires_at + - id + type: object + properties: + expires_at: + type: string + format: date-time + id: + type: string + nullable: true + TextResponse: + required: + - citations + - text + - type + type: object + properties: + citations: + $ref: "#/components/schemas/Citations" + text: + maxLength: 5000000 + type: string + type: + type: string + enum: + - text + ToolUseResponse: + required: + - id + - input + - name + - type + type: object + properties: + id: + type: string + input: + type: object + name: + minLength: 1 + type: string + type: + type: string + enum: + - tool_use + ResponseServerToolUseBlock: + required: + - id + - input + - name + - type + type: object + properties: + id: + type: string + input: + type: object + name: + minLength: 1 + type: string + type: + type: string + enum: + - server_tool_use + ResponseWebSearchToolResultBlock: + required: + - content + - tool_use_id + - type + type: object + properties: + content: + oneOf: + - + $ref: "#/components/schemas/WebSearchToolResultObject" + - + $ref: "#/components/schemas/WebSearchToolResultObjectArray" + tool_use_id: + type: string + type: + type: string + enum: + - web_search_tool_result + ResponseCodeExecutionToolResultBlock: + required: + - content + - tool_use_id + - type + type: object + properties: + content: + type: object + oneOf: + - + $ref: "#/components/schemas/RequestCodeExecutionToolResultBlockErrorContent" + - + $ref: "#/components/schemas/RequestCodeExecutionToolResultBlockContent" + tool_use_id: + type: string + type: + type: string + enum: + - code_execution_tool_result + ResponseMCPToolUseBlock: + required: + - id + - input + - name + - server_name + - type + type: object + properties: + id: + type: string + input: + type: object + name: + type: string + server_name: + type: string + type: + type: string + enum: + - mcp_tool_use + ResponseMCPToolResultBlock: + required: + - content + - is_error + - tool_use_id + - type + type: object + properties: + content: + oneOf: + - + type: string + - + $ref: "#/components/schemas/TextResponse" + is_error: + type: boolean + default: false + tool_use_id: + type: string + type: + type: string + enum: + - mcp_tool_result + ResponseContainerUploadBlock: + required: + - file_id + - type + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - container_upload + CacheCreationUsage: + required: + - ephemeral_1h_input_tokens + - ephemeral_5m_input_tokens + type: object + properties: + ephemeral_1h_input_tokens: + minimum: 1 + type: integer + default: 0 + ephemeral_5m_input_tokens: + minimum: 1 + type: integer + default: 0 + nullable: true + ServerToolUseUsage: + required: + - web_search_requests + type: object + properties: + web_search_requests: + minimum: 1 + type: integer + description: The number of web search tool requests. + default: 0 + nullable: true + Usage: + required: + - cache_creation + - cache_creation_input_tokens + - cache_read_input_tokens + - input_tokens + - output_tokens + - server_tool_use + type: object + properties: + cache_creation: + $ref: "#/components/schemas/CacheCreationUsage" + cache_creation_input_tokens: + minimum: 1 + type: integer + nullable: true + cache_read_input_tokens: + minimum: 1 + type: integer + nullable: true + input_tokens: + minimum: 1 + type: integer + output_tokens: + minimum: 1 + type: integer + server_tool_use: + $ref: "#/components/schemas/ServerToolUseUsage" + service_tier: + type: string + nullable: true + enum: + - standard + - priority + - batch + description: | + Billing and rate-limit usage. + MessageRequest: + maxItems: 100000 + type: array + description: A list of messages comprising the conversation so far. + items: + $ref: "#/components/schemas/Message" + ModelRequest: + maxLength: 256 + minLength: 1 + type: string + description: The model that will complete your prompt. Must be between 1 and 256 characters. + SystemRequest: + description: "A system prompt providing context and instructions to Claude, such as specifying a particular goal or role. Can be provided either as a simple string or as a structured object with cache control options." + oneOf: + - + type: string + - + required: + - text + - type + type: object + properties: + text: + minLength: 1 + type: string + type: + type: string + enum: + - text + cache_control: + $ref: "#/components/schemas/CacheControl" + citations: + $ref: "#/components/schemas/Citations" + ThinkingRequest: + oneOf: + - + $ref: "#/components/schemas/ThinkingEnabled" + - + $ref: "#/components/schemas/ThinkingDisabled" + ToolChoiceRequest: + oneOf: + - + $ref: "#/components/schemas/ToolChoiceAuto" + - + $ref: "#/components/schemas/ToolChoiceAny" + - + $ref: "#/components/schemas/ToolChoiceTool" + - + $ref: "#/components/schemas/ToolChoiceNone" + ToolsRequest: + type: array + description: List of tools that the model may use during the conversation + items: + oneOf: + - + $ref: "#/components/schemas/Tool" + - + $ref: "#/components/schemas/ComputerUseTool20241022" + - + $ref: "#/components/schemas/BashTool20241022" + - + $ref: "#/components/schemas/TextEditorTool20241022" + - + $ref: "#/components/schemas/ComputerUseTool20250124" + - + $ref: "#/components/schemas/BashTool20250124" + - + $ref: "#/components/schemas/TextEditorTool20250124" + - + $ref: "#/components/schemas/TextEditor20250429" + - + $ref: "#/components/schemas/WebSearchTool20250305" + - + $ref: "#/components/schemas/CodeExecutionTool20250522" + MessageRequestBody: + required: + - max_tokens + - messages + - model + type: object + properties: + max_tokens: + minimum: 1 + type: integer + description: The maximum number of tokens to generate before stopping. Models may stop before reaching this maximum. + messages: + $ref: "#/components/schemas/MessageRequest" + model: + $ref: "#/components/schemas/ModelRequest" + container: + type: string + description: Container identifier for reuse across requests. + nullable: true + mcp_servers: + $ref: "#/components/schemas/MCPServers" + metadata: + type: object + properties: + user_id: + maxLength: 256 + type: string + description: A user identifier for tracing the request. + nullable: true + description: An object describing metadata about the request. Can include user_id for tracking purposes. + service_tier: + type: string + description: Determines whether to use priority capacity (if available) or standard capacity for this request. Anthropic offers different levels of service for your API requests. See service-tiers for details. + enum: + - auto + - standard_only + stop_sequences: + type: array + description: Custom text sequences that will cause the model to stop generating. The model will stop when it encounters any of these sequences. + items: + type: string + stream: + type: boolean + description: Whether to incrementally stream the response using server-sent events. + system: + $ref: "#/components/schemas/SystemRequest" + temperature: + maximum: 1 + minimum: 0 + type: number + description: Amount of randomness injected into the response. Defaults to 1.0. Use lower values for analytical tasks and higher values for creative tasks. + thinking: + $ref: "#/components/schemas/ThinkingRequest" + tool_choice: + $ref: "#/components/schemas/ToolChoiceRequest" + tools: + $ref: "#/components/schemas/ToolsRequest" + top_k: + minimum: 0 + type: integer + description: Only sample from the top K options for each subsequent token + top_p: + maximum: 1 + minimum: 0 + type: number + description: Only sample from tokens with cumulative probability less than this value + MessageResponse: + required: + - container + - content + - id + - model + - role + - stop_reason + - stop_sequence + - type + - usage + type: object + properties: + container: + $ref: "#/components/schemas/Container" + content: + type: array + description: "Content generated by the model. This is an array of content blocks, each of which has a type that determines its shape." + items: + oneOf: + - + $ref: "#/components/schemas/TextResponse" + - + $ref: "#/components/schemas/ToolUseResponse" + - + $ref: "#/components/schemas/ResponseServerToolUseBlock" + - + $ref: "#/components/schemas/ResponseWebSearchToolResultBlock" + - + $ref: "#/components/schemas/ResponseCodeExecutionToolResultBlock" + - + $ref: "#/components/schemas/ResponseMCPToolResultBlock" + - + $ref: "#/components/schemas/ResponseContainerUploadBlock" + - + $ref: "#/components/schemas/Thinking" + - + $ref: "#/components/schemas/RedactedThinking" + id: + type: string + description: Unique object identifier. The format and length of IDs may change over time. + model: + maxLength: 256 + minLength: 1 + type: string + description: The model that handled the request. + role: + type: string + description: Conversational role of the generated message. This will always be "assistant". + default: assistant + enum: + - assistant + stop_reason: + type: string + description: | + The reason that we stopped. This may be one of the following values: + - "end_turn": the model reached a natural stopping point + - "max_tokens": we exceeded the requested max_tokens or the model's maximum + - "stop_sequence": one of your provided custom stop_sequences was generated + - "tool_use": the model invoked one or more tools + + In non-streaming mode this value is always non-null. In streaming mode, it is null in the message_start event and non-null otherwise. + nullable: true + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + - pause_turn + - refusal + stop_sequence: + type: string + description: "Which custom stop sequence was generated, if any. This value will be a non-null string if one of your custom stop sequences was generated." + nullable: true + type: + type: string + description: "Object type. For Messages, this is always \"message\"." + default: message + enum: + - message + usage: + $ref: "#/components/schemas/Usage" + ModelResponseData: + required: + - created_at + - display_name + - id + - type + type: object + properties: + created_at: + type: string + description: RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown. + format: date-time + display_name: + type: string + description: A human-readable name for the model. + id: + type: string + description: Unique model identifier. + type: + type: string + description: "Object type. For Models, this is always \"model\"." + default: model + enum: + - model + FirstId: + type: string + description: First ID in the data list. Can be used as the before_id for the previous page. + nullable: true + HasMore: + type: boolean + description: Indicates if there are more results in the requested page direction. + LastId: + type: string + description: Last ID in the data list. Can be used as the after_id for the next page. + nullable: true + RequestsCount: + required: + - canceled + - errored + - expired + - processing + - succeeded + type: object + properties: + canceled: + type: integer + default: 0 + errored: + type: integer + default: 0 + expired: + type: integer + default: 0 + processing: + type: integer + default: 0 + succeeded: + type: integer + default: 0 + MessageBatchResponse: + required: + - archived_at + - cancel_initiated_at + - created_at + - ended_at + - expires_at + - id + - processing_status + - request_counts + - results_url + - type + type: object + properties: + archived_at: + type: string + format: date-time + nullable: true + cancel_initiated_at: + type: string + format: date-time + nullable: true + created_at: + type: string + format: date-time + ended_at: + type: string + format: date-time + nullable: true + expires_at: + type: string + format: date-time + id: + type: string + processing_status: + type: string + enum: + - in_progress + - canceling + - ended + request_counts: + $ref: "#/components/schemas/RequestsCount" + results_url: + type: string + nullable: true + type: + type: string + default: message_batch + enum: + - message_batch + MessageBatchSucceededResult: + required: + - message + - type + type: object + properties: + message: + $ref: "#/components/schemas/MessageResponse" + type: + type: string + enum: + - succeeded + MessageBatchError: + required: + - error + - type + type: object + properties: + type: + type: string + enum: + - error + error: + required: + - message + - type + type: object + properties: + message: + type: string + type: + type: string + enum: + - invalid_request_error + - authentication_error + - billing_error + - permission_error + - not_found_error + - rate_limit_error + - timeout_error + - internal_server_error + - overloaded_error + MessageBatchErroredResult: + required: + - error + - type + type: object + properties: + type: + type: string + enum: + - errored + error: + $ref: "#/components/schemas/MessageBatchError" + MessageBatchCanceledResult: + required: + - type + type: object + properties: + type: + type: string + enum: + - canceled + MessageBatchExpiredResult: + required: + - type + type: object + properties: + type: + type: string + enum: + - expired + FileData: + required: + - created_at + - filename + - id + - mime_type + - size_bytes + - type + type: object + properties: + created_at: + type: string + description: RFC 3339 datetime string representing when the file was created + format: date-time + filename: + maxLength: 500 + minLength: 1 + type: string + description: Original filename of the uploaded file + id: + type: string + description: | + Unique object identifier. + The format and length of IDs may change over time. + mime_type: + maxLength: 255 + minLength: 1 + type: string + description: MIME type of the file + size_bytes: + minimum: 0 + type: integer + description: Size of the file in bytes + type: + type: string + enum: + - file + downloadable: + type: boolean + description: Whether the file can be downloaded + default: false + AdminMemberManagementUserData: + required: + - added_at + - email + - id + - name + - role + - type + type: object + properties: + added_at: + type: string + description: RFC 3339 datetime string indicating when the User joined the Organization. + format: date-time + email: + type: string + description: Email of the User. + id: + type: string + description: ID of the User. + name: + type: string + description: Name of the User. + role: + type: string + description: Organization role of the User. + enum: + - user + - developer + - billing + - admin + type: + type: string + description: "Object type. For Users, this is always \"user\"." + default: user + enum: + - user + AdminInviteData: + required: + - email + - expires_at + - id + - invited_at + - role + - status + - type + type: object + properties: + email: + type: string + description: Email of the User. + expires_at: + type: string + description: RFC 3339 datetime string indicating when the invite expires. + id: + type: string + description: ID of the User. + invited_at: + type: string + description: RFC 3339 datetime string indicating when the invite was created. + role: + type: string + description: Organization role of the User. + enum: + - user + - developer + - billing + - admin + status: + type: string + description: Status of the invite. + enum: + - accepted + - expired + - deleted + - pending + type: + type: string + description: "Object type. For Invites, this is always \"invite\"." + default: invite + enum: + - invite + AdminWorkspaceData: + required: + - archived_at + - created_at + - display_color + - id + - name + - type + type: object + properties: + archived_at: + type: string + description: RFC 3339 datetime string indicating when the Workspace was archived. + nullable: true + created_at: + type: string + display_color: + type: string + description: Hexadecimal color code for the Workspace. + id: + type: string + name: + type: string + type: + type: string + default: workspace + enum: + - workspace + AdminWorkspaceMemberData: + required: + - type + - user_id + - workspace_id + - workspace_role + type: object + properties: + type: + type: string + description: "Object type. For Workspace Members, this is always \"workspace_member\"." + default: workspace_member + enum: + - workspace_member + user_id: + type: string + description: ID of the User. + workspace_id: + type: string + description: ID of the Workspace. + workspace_role: + type: string + description: Role of the Workspace Member. + enum: + - workspace_user + - workspace_developer + - workspace_admin + - workspace_billing + AdminAPIKeyData: + required: + - created_at + - created_by + - id + - name + - partial_key_hint + - status + - type + - workspace_id + type: object + properties: + created_at: + type: string + description: RFC 3339 datetime string indicating when the API Key was created. + created_by: + required: + - id + - type + type: object + properties: + id: + type: string + description: ID of the actor that created the object. + type: + type: string + description: Type of the actor that created the object. + description: The ID and type of the actor that created the API Key. + id: + type: string + description: ID of the API key. + name: + type: string + description: Name of the API key. + partial_key_hint: + type: string + description: Partially redacted hint for the API key. + nullable: true + status: + type: string + description: Status of the API key. + enum: + - active + - inactive + - archived + type: + type: string + description: "Object type. For API Keys, this is always \"api_key\"." + default: api_key + enum: + - api_key + workspace_id: + type: string + description: "ID of the Workspace associated with the API key, or null if the API key belongs to the default Workspace." + nullable: true + Error: + required: + - error + - type + type: object + properties: + type: + type: string + enum: + - error + error: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - invalid_request_error + - authentication_error + - permission_error + - not_found_error + - request_too_large + - rate_limit_error + - api_error + - overloaded_error + message: + type: string + responses: + Error400: + description: Invalid Request Error - There was an issue with the format or content of your request + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + Error401: + description: Authentication Error - There's an issue with your API key + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + Error403: + description: Permission Error - Your API key does not have permission to use the specified resource + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + Error404: + description: Not Found Error - The requested resource was not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + Error413: + description: Request Too Large - Request exceeds the maximum allowed number of bytes + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + Error429: + description: Rate Limit Error - Your account has hit a rate limit + headers: + retry-after: + $ref: "#/components/headers/RetryAfter" + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + Error500: + description: API Error - An unexpected error has occurred internal to Anthropic's systems + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + Error529: + description: Overloaded Error - Anthropic's API is temporarily overloaded + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + parameters: + AnthropicVersionHeader: + name: anthropic-version + in: header + description: The version of the Anthropic API you want to use. Required header for all API requests. Must be set to "2023-06-01". + required: true + style: simple + explode: false + schema: + type: string + enum: + - 2023-06-01 + AnthropicBetaHeader: + name: anthropic-beta + in: header + description: Optional header to specify beta feature(s) you want to use. Multiple betas can be specified using a comma-separated list or by including the header multiple times. + required: false + style: simple + explode: false + schema: + type: array + items: + type: string + enum: + - computer-use-2024-10-22 + - computer-use-2025-01-24 + - output-128k-2025-02-19 + - token-efficient-tools-2025-02-19 + - prompt-tools-2025-04-02 + - interleaved-thinking-2025-05-14 + - files-api-2025-04-14 + AnthropicDangerousDirectBrowserAccessHeader: + name: anthropic-dangerous-direct-browser-access + in: header + description: This header must be set to "true" to enable direct client-side (browser) access to the API. This acknowledges the security risks of exposing your API key and is not recommended for production environments. + required: false + style: simple + explode: false + schema: + type: boolean + BeforeId: + name: before_id + in: query + description: "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object." + required: false + style: form + explode: true + schema: + type: string + AfterId: + name: after_id + in: query + description: "ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object." + required: false + style: form + explode: true + schema: + type: string + Limit: + name: limit + in: query + description: Number of items to return per page. + required: false + style: form + explode: true + schema: + maximum: 1000 + minimum: 1 + type: integer + default: 20 + BatchId: + name: message_batch_id + in: path + required: true + style: simple + explode: false + schema: + type: string + FileId: + name: file_id + in: path + description: ID of the File. + required: true + style: simple + explode: false + schema: + type: string + UserId: + name: user_id + in: path + description: ID of the User. + required: true + style: simple + explode: false + schema: + type: string + InviteId: + name: invite_id + in: path + description: ID of the Invite. + required: true + style: simple + explode: false + schema: + type: string + WorkspaceId: + name: workspace_id + in: path + description: ID of the Workspace. + required: true + style: simple + explode: false + schema: + type: string + ApiKeyId: + name: api_key_id + in: path + description: ID of the API key. + required: true + style: simple + explode: false + schema: + type: string + headers: + RequestId: + description: A unique identifier for the request. + style: simple + explode: false + schema: + type: string + AnthropicOrganizationId: + description: The ID of the organization that the request belongs to. + style: simple + explode: false + schema: + type: string + RetryAfter: + description: The number of seconds until you can retry the request. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitRequestsLimit: + description: The maximum number of requests allowed within any rate limit period. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitRequestsRemaining: + description: The number of requests remaining before being rate limited. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitRequestsReset: + description: "The time when the request rate limit will reset, provided in RFC 3339 format." + style: simple + explode: false + schema: + type: string + format: date-time + AnthropicRateLimitTokensLimit: + description: The maximum number of tokens allowed within any rate limit period. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitTokensRemaining: + description: The number of tokens remaining (rounded to the nearest thousand) before being rate limited. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitTokensReset: + description: "The time when the token rate limit will reset, provided in RFC 3339 format." + style: simple + explode: false + schema: + type: string + format: date-time + AnthropicRateLimitInputTokensLimit: + description: The maximum number of input tokens allowed within any rate limit period. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitInputTokensRemaining: + description: The number of input tokens remaining (rounded to the nearest thousand) before being rate limited. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitInputTokensReset: + description: "The time when the input token rate limit will reset, provided in RFC 3339 format." + style: simple + explode: false + schema: + type: string + format: date-time + AnthropicRateLimitOutputTokensLimit: + description: The maximum number of output tokens allowed within any rate limit period. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitOutputTokensRemaining: + description: The number of output tokens remaining (rounded to the nearest thousand) before being rate limited. + style: simple + explode: false + schema: + type: integer + AnthropicRateLimitOutputTokensReset: + description: "The time when the output token rate limit will reset, provided in RFC 3339 format." + style: simple + explode: false + schema: + type: string + format: date-time + AnthropicPriorityInputTokensLimit: + description: The maximum number of Priority Tier input tokens allowed within any rate limit period. (Priority Tier only) + style: simple + explode: false + schema: + type: integer + AnthropicPriorityInputTokensRemaining: + description: The number of Priority Tier input tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) + style: simple + explode: false + schema: + type: integer + AnthropicPriorityInputTokensReset: + description: "The time when the Priority Tier input token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only)" + style: simple + explode: false + schema: + type: string + format: date-time + AnthropicPriorityOutputTokensLimit: + description: The maximum number of Priority Tier output tokens allowed within any rate limit period. (Priority Tier only) + style: simple + explode: false + schema: + type: integer + AnthropicPriorityOutputTokensRemaining: + description: The number of Priority Tier output tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) + style: simple + explode: false + schema: + type: integer + AnthropicPriorityOutputTokensReset: + description: "The time when the Priority Tier output token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only)" + style: simple + explode: false + schema: + type: string + format: date-time + securitySchemes: + ApiKeyAuth: + type: apiKey + description: Your unique API key for authentication. Required in the header of all API requests to authenticate your account and access Anthropic's services. Get your API key through the Console. Each key is scoped to a Workspace. + name: x-api-key + in: header + default: + type: oauth2 + flows: + implicit: + authorizationUrl: https://test.com + scopes: {} +x-wso2-auth-header: Authorization +x-wso2-api-key-header: ApiKey +x-wso2-cors: + corsConfigurationEnabled: true + accessControlAllowOrigins: + - '*' + accessControlAllowCredentials: false + accessControlAllowHeaders: + - authorization + - Access-Control-Allow-Origin + - Content-Type + - SOAPAction + - apikey + - Internal-Key + - anthropic-version + - anthropic-beta + - anthropic-dangerous-direct-browser-access + accessControlAllowMethods: + - GET + - PUT + - POST + - DELETE + - PATCH + - OPTIONS +x-wso2-production-endpoints: + urls: + - https://api.anthropic.com + type: http +x-wso2-basePath: /anthropicapis/1 +x-wso2-transports: + - http + - https +x-wso2-application-security: + security-types: + - api_key + optional: false +x-wso2-response-cache: + enabled: false + cacheTimeoutInSeconds: 300 diff --git a/import-export-cli/integration/testdata/AnthropicAPI/api.yaml b/import-export-cli/integration/testdata/AnthropicAPI/api.yaml new file mode 100644 index 00000000..5718e615 --- /dev/null +++ b/import-export-cli/integration/testdata/AnthropicAPI/api.yaml @@ -0,0 +1,568 @@ +type: api +version: v4.6.0 +data: + id: 7a205b23-7cba-4481-9560-b40ec888b63f + name: AnthropicAPIs + displayName: AnthropicAPIs + context: /anthropicapis + version: "1" + provider: admin + lifeCycleStatus: CREATED + responseCachingEnabled: false + cacheTimeout: 300 + hasThumbnail: false + isDefaultVersion: false + isRevision: false + revisionId: 0 + enableSchemaValidation: false + enableSubscriberVerification: false + type: HTTP + audiences: + - all + transport: + - http + - https + tags: [] + policies: + - Unlimited + organizationPolicies: [] + authorizationHeader: Authorization + apiKeyHeader: ApiKey + securityScheme: + - api_key + - oauth_basic_auth_api_key_mandatory + visibility: PUBLIC + visibleRoles: [] + visibleTenants: [] + visibleOrganizations: + - none + mediationPolicies: [] + subscriptionAvailability: CURRENT_TENANT + subscriptionAvailableTenants: [] + additionalProperties: [] + additionalPropertiesMap: {} + accessControl: NONE + accessControlRoles: [] + businessInformation: {} + corsConfiguration: + corsConfigurationEnabled: true + accessControlAllowOrigins: + - '*' + accessControlAllowCredentials: false + accessControlAllowHeaders: + - authorization + - Access-Control-Allow-Origin + - Content-Type + - SOAPAction + - apikey + - Internal-Key + - anthropic-version + - anthropic-beta + - anthropic-dangerous-direct-browser-access + accessControlAllowMethods: + - GET + - PUT + - POST + - DELETE + - PATCH + - OPTIONS + websubSubscriptionConfiguration: + enable: false + secret: "" + signingAlgorithm: SHA1 + signatureHeader: x-hub-signature + createdTime: "1761036934640" + lastUpdatedTimestamp: "1761036934664" + lastUpdatedTime: 2025-10-21 14:25:34.664 + endpointConfig: + endpoint_type: http + production_endpoints: + url: https://api.anthropic.com + primaryProductionEndpointId: default_production_endpoint + endpointImplementationType: ENDPOINT + subtypeConfiguration: + subtype: AIAPI + _configuration: "{\"llmProviderId\":\"5aaa2f49-db8b-448e-a719-37929fcd2493\",\"llmProviderName\":\"Anthropic\",\"llmProviderApiVersion\":\"1.0.0\"}" + scopes: [] + operations: + - + id: "" + target: /v1/messages + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/messages/count_tokens + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/models + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/models/{model_id}" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/messages/batches + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/messages/batches + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/messages/batches/{message_batch_id}" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/messages/batches/{message_batch_id}" + verb: DELETE + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/messages/batches/{message_batch_id}/results" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/messages/batches/{message_batch_id}/cancel" + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/files + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/files + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/files/{file_id}" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/files/{file_id}" + verb: DELETE + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/files/{file_id}/content" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/organizations/users + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/users/{user_id}" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/users/{user_id}" + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/users/{user_id}" + verb: DELETE + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/organizations/invites + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/organizations/invites + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/invites/{invite_id}" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/invites/{invite_id}" + verb: DELETE + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/organizations/workspaces + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/organizations/workspaces + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/workspaces/{workspace_id}" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/workspaces/{workspace_id}" + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/workspaces/{workspace_id}/archive" + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/workspaces/{workspace_id}/members" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/workspaces/{workspace_id}/members" + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/workspaces/{workspace_id}/members/{user_id}" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/workspaces/{workspace_id}/members/{user_id}" + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/workspaces/{workspace_id}/members/{user_id}" + verb: DELETE + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/organizations/api_keys + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/api_keys/{api_key_id}" + verb: GET + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: "/v1/organizations/api_keys/{api_key_id}" + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/experimental/generate_prompt + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/experimental/improve_prompt + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + - + id: "" + target: /v1/experimental/templatize_prompt + verb: POST + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + usedProductIds: [] + operationPolicies: + request: [] + response: [] + fault: [] + categories: [] + keyManagers: + - all + advertiseInfo: + advertised: false + apiOwner: admin + vendor: WSO2 + gatewayVendor: wso2 + gatewayType: wso2/synapse + initiatedFromGateway: false + asyncTransportProtocols: [] + egress: true + organizationId: carbon.super diff --git a/import-export-cli/integration/testdata/SampleMCP/backends.yaml b/import-export-cli/integration/testdata/SampleMCP/backends.yaml new file mode 100644 index 00000000..0ac32522 --- /dev/null +++ b/import-export-cli/integration/testdata/SampleMCP/backends.yaml @@ -0,0 +1,8 @@ +type: backends +version: v4.6.0 +data: + - + id: 44d5229c-75ee-4eb5-88f4-b39f58e376f7 + name: Default Backend + endpointConfig: "{\"endpoint_type\":\"http\",\"sandbox_endpoints\":{\"url\":\"https:\\/\\/db720294-98fd-40f4-85a1-cc6a3b65bc9a-prod.e1-us-east-azure.choreoapis.dev\\/godzilla\\/mcp-everything-server\\/v1.0\"},\"production_endpoints\":{\"url\":\"https:\\/\\/db720294-98fd-40f4-85a1-cc6a3b65bc9a-prod.e1-us-east-azure.choreoapis.dev\\/godzilla\\/mcp-everything-server\\/v1.0\"}}" + definition: "{\"tools\":[{\"inputSchema\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"additionalProperties\":false,\"type\":\"object\",\"properties\":{\"message\":{\"description\":\"Message to echo\",\"type\":\"string\"}},\"required\":[\"message\"]},\"name\":\"echo\",\"description\":\"Echoes back the input\"},{\"inputSchema\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"additionalProperties\":false,\"type\":\"object\",\"properties\":{\"a\":{\"description\":\"First number\",\"type\":\"number\"},\"b\":{\"description\":\"Second number\",\"type\":\"number\"}},\"required\":[\"a\",\"b\"]},\"name\":\"add\",\"description\":\"Adds two numbers\"},{\"inputSchema\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"additionalProperties\":false,\"type\":\"object\",\"properties\":{}},\"name\":\"viewPizzaMenu\",\"description\":\"View the pizza menu. This tool provides a list of available pizzas.\"},{\"inputSchema\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"additionalProperties\":false,\"type\":\"object\",\"properties\":{\"pizzaType\":{\"description\":\"Type of pizza to order\",\"type\":\"string\"},\"quantity\":{\"description\":\"Number of pizzas to order\",\"type\":\"integer\",\"minimum\":1},\"deliveryAddress\":{\"description\":\"Delivery address for the order\",\"type\":\"string\"},\"creditCardNumber\":{\"description\":\"Credit card number for payment\",\"type\":\"string\"},\"customerName\":{\"description\":\"Name of the customer\",\"type\":\"string\"}},\"required\":[\"pizzaType\",\"quantity\",\"customerName\",\"deliveryAddress\",\"creditCardNumber\"]},\"name\":\"orderPizza\",\"description\":\"Order a pizza from the menu. This tool allows you to place an order for a pizza.\"}]}" diff --git a/import-export-cli/integration/testdata/SampleMCP/mcp_server.yaml b/import-export-cli/integration/testdata/SampleMCP/mcp_server.yaml new file mode 100644 index 00000000..bc7ffca6 --- /dev/null +++ b/import-export-cli/integration/testdata/SampleMCP/mcp_server.yaml @@ -0,0 +1,148 @@ +type: mcp_server +version: v4.6.0 +data: + id: 46267ecd-908c-4e3e-984e-a7ddfcfb7d1d + name: SampleMCP + displayName: SampleMCP + context: /samplemcp + version: 1.0.0 + provider: admin + lifeCycleStatus: PUBLISHED + hasThumbnail: false + isDefaultVersion: false + isRevision: false + revisionId: 0 + enableSchemaValidation: false + audiences: + - all + transport: + - http + - https + tags: [] + policies: + - Unlimited + organizationPolicies: [] + authorizationHeader: Authorization + apiKeyHeader: ApiKey + securityScheme: + - oauth_basic_auth_api_key_mandatory + - oauth2 + visibility: PUBLIC + visibleRoles: [] + visibleTenants: [] + visibleOrganizations: + - none + subscriptionAvailability: CURRENT_TENANT + subscriptionAvailableTenants: [] + additionalPropertiesMap: {} + accessControl: NONE + accessControlRoles: [] + businessInformation: {} + corsConfiguration: + corsConfigurationEnabled: true + accessControlAllowOrigins: + - '*' + accessControlAllowCredentials: false + accessControlAllowHeaders: + - authorization + - Access-Control-Allow-Origin + - Content-Type + - SOAPAction + - apikey + - Internal-Key + - MCP-Protocol-Version + - Mcp-Session-Id + accessControlAllowMethods: + - GET + - PUT + - POST + - DELETE + - PATCH + - OPTIONS + protocolVersion: 2025-06-18 + createdTime: "1761041176230" + lastUpdatedTimestamp: "1761041182913" + lastUpdatedTime: 2025-10-21 15:36:22.913 + subtypeConfiguration: + subtype: SERVER_PROXY + scopes: [] + operations: + - + id: "" + target: add + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: "{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"additionalProperties\":false,\"type\":\"object\",\"properties\":{\"a\":{\"description\":\"First number\",\"type\":\"number\"},\"b\":{\"description\":\"Second number\",\"type\":\"number\"}},\"required\":[\"a\",\"b\"]}" + description: Adds two numbers + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 44d5229c-75ee-4eb5-88f4-b39f58e376f7 + backendOperation: + target: add + verb: TOOL + - + id: "" + target: echo + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: "{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"additionalProperties\":false,\"type\":\"object\",\"properties\":{\"message\":{\"description\":\"Message to echo\",\"type\":\"string\"}},\"required\":[\"message\"]}" + description: Echoes back the input + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 44d5229c-75ee-4eb5-88f4-b39f58e376f7 + backendOperation: + target: echo + verb: TOOL + - + id: "" + target: orderPizza + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: "{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"additionalProperties\":false,\"type\":\"object\",\"properties\":{\"pizzaType\":{\"description\":\"Type of pizza to order\",\"type\":\"string\"},\"quantity\":{\"description\":\"Number of pizzas to order\",\"type\":\"integer\",\"minimum\":1},\"deliveryAddress\":{\"description\":\"Delivery address for the order\",\"type\":\"string\"},\"creditCardNumber\":{\"description\":\"Credit card number for payment\",\"type\":\"string\"},\"customerName\":{\"description\":\"Name of the customer\",\"type\":\"string\"}},\"required\":[\"pizzaType\",\"quantity\",\"customerName\",\"deliveryAddress\",\"creditCardNumber\"]}" + description: Order a pizza from the menu. This tool allows you to place an order for a pizza. + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 44d5229c-75ee-4eb5-88f4-b39f58e376f7 + backendOperation: + target: orderPizza + verb: TOOL + - + id: "" + target: viewPizzaMenu + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: "{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"additionalProperties\":false,\"type\":\"object\",\"properties\":{}}" + description: View the pizza menu. This tool provides a list of available pizzas. + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 44d5229c-75ee-4eb5-88f4-b39f58e376f7 + backendOperation: + target: viewPizzaMenu + verb: TOOL + categories: [] + keyManagers: + - all + gatewayVendor: wso2 + gatewayType: wso2/synapse + initiatedFromGateway: false + organizationId: carbon.super From 6c7dcdb60ace13fa576b868b7c60eb42f8d0a717 Mon Sep 17 00:00:00 2001 From: Thenujan Date: Tue, 21 Oct 2025 18:56:41 +0530 Subject: [PATCH 2/2] Add both mcp from openapi and proxy mcp examples --- .../testdata/MCPFromOpenAPI/backends.yaml | 8 + .../testdata/MCPFromOpenAPI/mcp_server.yaml | 245 ++++++++++++++++++ .../backends.yaml | 0 .../mcp_server.yaml | 0 4 files changed, 253 insertions(+) create mode 100644 import-export-cli/integration/testdata/MCPFromOpenAPI/backends.yaml create mode 100644 import-export-cli/integration/testdata/MCPFromOpenAPI/mcp_server.yaml rename import-export-cli/integration/testdata/{SampleMCP => ProxyExistingMCP}/backends.yaml (100%) rename import-export-cli/integration/testdata/{SampleMCP => ProxyExistingMCP}/mcp_server.yaml (100%) diff --git a/import-export-cli/integration/testdata/MCPFromOpenAPI/backends.yaml b/import-export-cli/integration/testdata/MCPFromOpenAPI/backends.yaml new file mode 100644 index 00000000..83b823c1 --- /dev/null +++ b/import-export-cli/integration/testdata/MCPFromOpenAPI/backends.yaml @@ -0,0 +1,8 @@ +type: backends +version: v4.6.0 +data: + - + id: 663735aa-5fc0-40ae-9912-5cc237ec769d + name: Default Backend + endpointConfig: "{\"endpoint_type\":\"http\",\"sandbox_endpoints\":{\"url\":\"https:\\/\\/apis.bijira.dev\\/samples\\/reading-list-api-service\\/v1.0\"},\"production_endpoints\":{\"url\":\"https:\\/\\/apis.bijira.dev\\/samples\\/reading-list-api-service\\/v1.0\"}}" + definition: "{\"openapi\":\"3.0.1\",\"info\":{\"title\":\"ReadingListAPI\",\"description\":\"This is a sample proxy that manages a list of reading items.\",\"contact\":{},\"version\":\"1.0\"},\"servers\":[{\"url\":\"https://apis.bijira.dev/samples/reading-list-api-service/v1.0\"}],\"security\":[{\"default\":[]}],\"paths\":{\"/books\":{\"get\":{\"tags\":[\"books\"],\"summary\":\"List all the reading list books\",\"description\":\"Returns a list of all books currently in the reading list. Each book includes the title, author, status (to_read, reading, read), and its unique identifier.\",\"operationId\":\"listBooks\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"books\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/models.Book\"}}}}}}}},\"security\":[{\"default\":[]}],\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"x-wso2-application-security\":{\"security-types\":[\"oauth2\"],\"optional\":false}},\"post\":{\"tags\":[\"books\"],\"summary\":\"Add a new book to the reading list\",\"description\":\"Adds a new book to the reading list. Requires the title, author, and initial reading status. The system automatically assigns an ID to the book.\",\"operationId\":\"createBook\",\"requestBody\":{\"description\":\"New book details (without ID)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/models.BookCreate\"}}},\"required\":true},\"responses\":{\"201\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"allOf\":[{\"$ref\":\"#/components/schemas/models.Book\"},{\"type\":\"object\",\"properties\":{\"note\":{\"type\":\"string\",\"example\":\"Please note that changes are not persisted.\"}}}]}}}},\"400\":{\"description\":\"invalid book details\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/utils.ErrorResponse\"}}}},\"409\":{\"description\":\"book already exists\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/utils.ErrorResponse\"}}}}},\"security\":[{\"default\":[]}],\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"x-wso2-application-security\":{\"security-types\":[\"oauth2\"],\"optional\":false}}},\"/books/{id}\":{\"get\":{\"tags\":[\"books\"],\"summary\":\"Get reading list book by id\",\"description\":\"Fetches the details of a specific book in the reading list by its unique ID. If the book is not found, a 404 response is returned.\",\"operationId\":\"getBookById\",\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"description\":\"Book ID\",\"required\":true,\"style\":\"simple\",\"explode\":false,\"schema\":{\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/models.Book\"}}}},\"404\":{\"description\":\"book not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/utils.ErrorResponse\"}}}}},\"security\":[{\"default\":[]}],\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"x-wso2-application-security\":{\"security-types\":[\"oauth2\"],\"optional\":false}},\"put\":{\"tags\":[\"books\"],\"summary\":\"Update a reading list book by id\",\"description\":\"Updates the reading status of an existing book identified by its ID. Only the status field (to_read, reading, read) can be updated. Returns the updated book object.\",\"operationId\":\"updateBookById\",\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"description\":\"Book ID\",\"required\":true,\"style\":\"simple\",\"explode\":false,\"schema\":{\"type\":\"string\"}}],\"requestBody\":{\"description\":\"Updated book details (only status)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/models.BookUpdate\"}}},\"required\":true},\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"allOf\":[{\"$ref\":\"#/components/schemas/models.Book\"},{\"type\":\"object\",\"properties\":{\"note\":{\"type\":\"string\",\"example\":\"Please note that changes are not persisted.\"}}}]}}}},\"400\":{\"description\":\"invalid book details\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/utils.ErrorResponse\"}}}},\"404\":{\"description\":\"book not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/utils.ErrorResponse\"}}}}},\"security\":[{\"default\":[]}],\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"x-wso2-application-security\":{\"security-types\":[\"oauth2\"],\"optional\":false}},\"delete\":{\"tags\":[\"books\"],\"summary\":\"Delete a reading list book by id\",\"description\":\"Deletes the book with the given ID from the reading list. Returns the ID of the deleted book if the operation was successful. If the book is not found, a 404 response is returned.\",\"operationId\":\"deleteBookById\",\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"description\":\"Book ID\",\"required\":true,\"style\":\"simple\",\"explode\":false,\"schema\":{\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"example\":\"fe2594d0-ccea-42a2-97ac-0487458b5642\"},\"note\":{\"type\":\"string\",\"example\":\"Please note that changes are not persisted.\"}}}}}},\"404\":{\"description\":\"book not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/utils.ErrorResponse\"}}}}},\"security\":[{\"default\":[]}],\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"x-wso2-application-security\":{\"security-types\":[\"oauth2\"],\"optional\":false}}}},\"components\":{\"schemas\":{\"models.Book\":{\"type\":\"object\",\"properties\":{\"author\":{\"type\":\"string\",\"example\":\"J. R. R. Tolkien\"},\"id\":{\"type\":\"string\",\"example\":\"fe2594d0-ccea-42a2-97ac-0487458b5642\"},\"status\":{\"type\":\"string\",\"example\":\"to_read\",\"enum\":[\"read\",\"to_read\",\"reading\"]},\"title\":{\"type\":\"string\",\"example\":\"The Lord of the Rings\"}}},\"models.BookCreate\":{\"type\":\"object\",\"properties\":{\"author\":{\"type\":\"string\",\"example\":\"J. R. R. Tolkien\"},\"status\":{\"type\":\"string\",\"example\":\"to_read\",\"enum\":[\"read\",\"to_read\",\"reading\"]},\"title\":{\"type\":\"string\",\"example\":\"The Lord of the Rings\"}}},\"models.BookUpdate\":{\"type\":\"object\",\"properties\":{\"status\":{\"type\":\"string\",\"example\":\"reading\",\"enum\":[\"read\",\"to_read\",\"reading\"]}}},\"utils.ErrorResponse\":{\"type\":\"object\",\"properties\":{\"message\":{\"type\":\"string\",\"example\":\"error message\"}}}},\"securitySchemes\":{\"default\":{\"type\":\"oauth2\",\"flows\":{\"implicit\":{\"authorizationUrl\":\"https://test.com\",\"scopes\":{}}}}}},\"x-wso2-auth-header\":\"Authorization\",\"x-wso2-api-key-header\":\"ApiKey\",\"x-wso2-cors\":{\"corsConfigurationEnabled\":false,\"accessControlAllowOrigins\":[\"*\"],\"accessControlAllowCredentials\":false,\"accessControlAllowHeaders\":[\"authorization\",\"Access-Control-Allow-Origin\",\"Content-Type\",\"SOAPAction\",\"apikey\",\"Internal-Key\"],\"accessControlAllowMethods\":[\"GET\",\"PUT\",\"POST\",\"DELETE\",\"PATCH\",\"OPTIONS\"]},\"x-wso2-production-endpoints\":{\"urls\":[\"https://apis.bijira.dev/samples/reading-list-api-service/v1.0\"],\"type\":\"http\"},\"x-wso2-sandbox-endpoints\":{\"urls\":[\"https://apis.bijira.dev/samples/reading-list-api-service/v1.0\"],\"type\":\"http\"},\"x-wso2-basePath\":\"/readinglistapi/1.0\",\"x-wso2-transports\":[\"http\",\"https\"],\"x-wso2-application-security\":{\"security-types\":[\"oauth2\"],\"optional\":false},\"x-wso2-response-cache\":{\"enabled\":false,\"cacheTimeoutInSeconds\":300}}" diff --git a/import-export-cli/integration/testdata/MCPFromOpenAPI/mcp_server.yaml b/import-export-cli/integration/testdata/MCPFromOpenAPI/mcp_server.yaml new file mode 100644 index 00000000..a7b068f0 --- /dev/null +++ b/import-export-cli/integration/testdata/MCPFromOpenAPI/mcp_server.yaml @@ -0,0 +1,245 @@ +type: mcp_server +version: v4.6.0 +data: + id: 2e7b2ecc-74ea-40f8-a0b6-219194044ce4 + name: ReadingListMCPServer + displayName: ReadingListMCPServer + description: This is a sample proxy that manages a list of reading items. + context: /readinglistmcp + version: "1.0" + provider: admin + lifeCycleStatus: PUBLISHED + hasThumbnail: false + isDefaultVersion: false + isRevision: false + revisionId: 0 + enableSchemaValidation: false + audiences: + - all + transport: + - http + - https + tags: [] + policies: + - Unlimited + organizationPolicies: [] + authorizationHeader: Authorization + apiKeyHeader: ApiKey + securityScheme: + - oauth_basic_auth_api_key_mandatory + - oauth2 + visibility: PUBLIC + visibleRoles: [] + visibleTenants: [] + visibleOrganizations: + - none + subscriptionAvailability: CURRENT_TENANT + subscriptionAvailableTenants: [] + additionalPropertiesMap: {} + accessControl: NONE + accessControlRoles: [] + businessInformation: {} + corsConfiguration: + corsConfigurationEnabled: true + accessControlAllowOrigins: + - '*' + accessControlAllowCredentials: false + accessControlAllowHeaders: + - authorization + - Access-Control-Allow-Origin + - Content-Type + - SOAPAction + - apikey + - Internal-Key + - MCP-Protocol-Version + - Mcp-Session-Id + accessControlAllowMethods: + - GET + - PUT + - POST + - DELETE + - PATCH + - OPTIONS + protocolVersion: 2025-06-18 + createdTime: "1761036763860" + lastUpdatedTimestamp: "1761036806564" + lastUpdatedTime: 2025-10-21 14:23:26.564 + subtypeConfiguration: + subtype: DIRECT_BACKEND + scopes: [] + operations: + - + id: "" + target: createBook + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: |- + { + "type" : "object", + "properties" : { + "requestBody" : { + "type" : "object", + "contentType" : "application/json", + "properties" : { + "author" : { + "type" : "string", + "example" : "J. R. R. Tolkien", + "exampleSetFlag" : true, + "types" : [ "string" ] + }, + "status" : { + "type" : "string", + "example" : "to_read", + "exampleSetFlag" : true, + "types" : [ "string" ], + "enum" : [ "read", "to_read", "reading" ] + }, + "title" : { + "type" : "string", + "example" : "The Lord of the Rings", + "exampleSetFlag" : true, + "types" : [ "string" ] + } + } + } + }, + "required" : [ "requestBody" ] + } + description: "Adds a new book to the reading list. Requires the title, author, and initial reading status. The system automatically assigns an ID to the book." + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 663735aa-5fc0-40ae-9912-5cc237ec769d + backendOperation: + target: /books + verb: POST + - + id: "" + target: deleteBookById + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: |- + { + "type" : "object", + "properties" : { + "path_id" : { + "type" : "string", + "description" : "Book ID" + } + }, + "required" : [ "path_id" ] + } + description: "Deletes the book with the given ID from the reading list. Returns the ID of the deleted book if the operation was successful. If the book is not found, a 404 response is returned." + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 663735aa-5fc0-40ae-9912-5cc237ec769d + backendOperation: + target: "/books/{id}" + verb: DELETE + - + id: "" + target: getBookById + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: |- + { + "type" : "object", + "properties" : { + "path_id" : { + "type" : "string", + "description" : "Book ID" + } + }, + "required" : [ "path_id" ] + } + description: "Fetches the details of a specific book in the reading list by its unique ID. If the book is not found, a 404 response is returned." + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 663735aa-5fc0-40ae-9912-5cc237ec769d + backendOperation: + target: "/books/{id}" + verb: GET + - + id: "" + target: listBooks + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: |- + { + "type" : "object", + "properties" : { } + } + description: "Returns a list of all books currently in the reading list. Each book includes the title, author, status (to_read, reading, read), and its unique identifier." + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 663735aa-5fc0-40ae-9912-5cc237ec769d + backendOperation: + target: /books + verb: GET + - + id: "" + target: updateBookById + feature: TOOL + authType: Application & Application User + throttlingPolicy: Unlimited + scopes: [] + schemaDefinition: |- + { + "type" : "object", + "properties" : { + "path_id" : { + "type" : "string", + "description" : "Book ID" + }, + "requestBody" : { + "type" : "object", + "contentType" : "application/json", + "properties" : { + "status" : { + "type" : "string", + "example" : "reading", + "exampleSetFlag" : true, + "types" : [ "string" ], + "enum" : [ "read", "to_read", "reading" ] + } + } + } + }, + "required" : [ "path_id", "requestBody" ] + } + description: "Updates the reading status of an existing book identified by its ID. Only the status field (to_read, reading, read) can be updated. Returns the updated book object." + operationPolicies: + request: [] + response: [] + fault: [] + backendOperationMapping: + backendId: 663735aa-5fc0-40ae-9912-5cc237ec769d + backendOperation: + target: "/books/{id}" + verb: PUT + categories: [] + keyManagers: + - all + gatewayVendor: wso2 + gatewayType: wso2/synapse + initiatedFromGateway: false + organizationId: carbon.super diff --git a/import-export-cli/integration/testdata/SampleMCP/backends.yaml b/import-export-cli/integration/testdata/ProxyExistingMCP/backends.yaml similarity index 100% rename from import-export-cli/integration/testdata/SampleMCP/backends.yaml rename to import-export-cli/integration/testdata/ProxyExistingMCP/backends.yaml diff --git a/import-export-cli/integration/testdata/SampleMCP/mcp_server.yaml b/import-export-cli/integration/testdata/ProxyExistingMCP/mcp_server.yaml similarity index 100% rename from import-export-cli/integration/testdata/SampleMCP/mcp_server.yaml rename to import-export-cli/integration/testdata/ProxyExistingMCP/mcp_server.yaml