{ "openapi": "3.1.0", "info": { "title": "STOA Control-Plane API", "description": "\n## STOA Platform API\n\n**The European Agent Gateway** — AI-Native API Gateway for modern enterprises.\n\n### Key Features\n\n- **MCP Server Subscriptions** — Subscribe to AI tools and manage API keys\n- **Tools Catalog** — Browse and discover MCP tools with role-based visibility\n- **Usage Tracking** — Monitor your API consumption in real-time\n- **Multi-tenant Management** — Create and manage isolated API tenants\n- **GitOps Integration** — Automatic sync with GitLab repositories\n- **Event-Driven Architecture** — Kafka/Redpanda message bus for async operations\n- **Pipeline Monitoring** — End-to-end tracing of deployments\n- **RBAC** — Role-based access control via Keycloak\n\n### Quick Start\n\n1. **Get a token** from Keycloak (`POST /realms/stoa/protocol/openid-connect/token`)\n2. **Browse MCP servers** (`GET /v1/mcp/servers`)\n3. **Subscribe to a server** (`POST /v1/mcp/subscriptions`)\n4. **Use your API key** with MCP Gateway (`https://mcp.gostoa.dev`)\n\n### Authentication\n\nAll endpoints require a valid JWT token from Keycloak (realm: `stoa`).\nInclude the token in the `Authorization: Bearer ` header.\n\n```\nAuthorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\n```\n\n### Environments\n\n| Environment | Base URL |\n|-------------|----------|\n| Production | `https://api.gostoa.dev` |\n| Via Gateway | `https://apis.gostoa.dev/gateway/Control-Plane-API/2.0` |\n\n### Changelog\n\n#### v2.1.0 (Current)\n- Added MCP Server Subscriptions with admin approval workflow\n- Added API key rotation with grace period support\n- Added Dashboard home page stats (`/v1/dashboard`)\n- Added Service Accounts for M2M authentication\n\n#### v2.0.0\n- Added Pipeline Tracing (`/v1/traces`) for end-to-end monitoring\n- Added GitLab Webhook integration (`/webhooks/gitlab`)\n- Added Kafka integration for event-driven deployments\n- Added AWX integration for automated Gateway deployments\n\n#### v1.0.0\n- Initial release with tenant, API, and application management\n", "contact": { "name": "CAB Ingénierie", "url": "https://gostoa.dev/", "email": "support@gostoa.dev" }, "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0" }, "version": "2.0.0" }, "paths": { "/v1/snapshots": { "get": { "tags": [ "Error Snapshots" ], "summary": "List Snapshots", "description": "List error snapshots for the user's tenant.\n\nSupports filtering by:\n- Date range (start_date, end_date)\n- HTTP status code\n- Trigger type (4xx, 5xx, timeout, manual)\n- Path substring\n\nResults are paginated and sorted by timestamp (newest first).", "operationId": "list_snapshots_v1_snapshots_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Items per page", "default": 20, "title": "Page Size" }, "description": "Items per page" }, { "name": "start_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Filter: start date", "title": "Start Date" }, "description": "Filter: start date" }, { "name": "end_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Filter: end date", "title": "End Date" }, "description": "Filter: end date" }, { "name": "status_code", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Filter: HTTP status code", "title": "Status Code" }, "description": "Filter: HTTP status code" }, { "name": "trigger", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/SnapshotTrigger" }, { "type": "null" } ], "description": "Filter: trigger type", "title": "Trigger" }, "description": "Filter: trigger type" }, { "name": "path_contains", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter: path contains string", "title": "Path Contains" }, "description": "Filter: path contains string" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SnapshotListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/snapshots/{snapshot_id}": { "get": { "tags": [ "Error Snapshots" ], "summary": "Get Snapshot", "description": "Get detailed error snapshot by ID.\n\nReturns the complete snapshot including:\n- Request/response data (with PII masked)\n- Routing and policy information\n- Backend state\n- Captured logs\n- Environment information\n\nAccess is restricted to the user's tenant.", "operationId": "get_snapshot_v1_snapshots__snapshot_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "snapshot_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Snapshot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorSnapshot" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Error Snapshots" ], "summary": "Delete Snapshot", "description": "Delete an error snapshot.\n\nPermanently removes the snapshot from storage.\nAccess is restricted to the user's tenant.", "operationId": "delete_snapshot_v1_snapshots__snapshot_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "snapshot_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Snapshot Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/snapshots/{snapshot_id}/replay": { "post": { "tags": [ "Error Snapshots" ], "summary": "Generate Replay", "description": "Generate cURL command to replay the captured request.\n\nReturns a cURL command that can be used to replay the original\nrequest. Note that sensitive data (Authorization headers, etc.)\nwill show as [REDACTED] in the generated command.\n\nAccess is restricted to the user's tenant.", "operationId": "generate_replay_v1_snapshots__snapshot_id__replay_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "snapshot_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Snapshot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReplayResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/snapshots/stats/summary": { "get": { "tags": [ "Error Snapshots" ], "summary": "Get Snapshot Stats", "description": "Get snapshot statistics summary.\n\nReturns counts by trigger type and status code.", "operationId": "get_snapshot_stats_v1_snapshots_stats_summary_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Start date for stats", "title": "Start Date" }, "description": "Start date for stats" }, { "name": "end_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "End date for stats", "title": "End Date" }, "description": "End date for stats" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get Snapshot Stats V1 Snapshots Stats Summary Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants": { "get": { "tags": [ "Tenants" ], "summary": "List Tenants", "description": "List tenants.\n\n- CPI Admin: See all tenants\n- Others: See only their own tenant", "operationId": "list_tenants_v1_tenants_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/TenantResponse" }, "type": "array", "title": "Response List Tenants V1 Tenants Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "Tenants" ], "summary": "Create Tenant", "description": "Create a new tenant (CPI Admin only).\n\nThis will:\n1. Create tenant structure in GitLab\n2. Create Keycloak group for the tenant\n3. Emit tenant-created event", "operationId": "create_tenant_v1_tenants_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TenantCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TenantResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/tenants/{tenant_id}": { "get": { "tags": [ "Tenants" ], "summary": "Get Tenant", "description": "Get tenant by ID", "operationId": "get_tenant_v1_tenants__tenant_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TenantResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Tenants" ], "summary": "Update Tenant", "description": "Update tenant", "operationId": "update_tenant_v1_tenants__tenant_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TenantUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TenantResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Tenants" ], "summary": "Delete Tenant", "description": "Delete tenant (CPI Admin only).\n\nWARNING: This will delete all tenant data including APIs and applications.", "operationId": "delete_tenant_v1_tenants__tenant_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/apis": { "get": { "tags": [ "APIs" ], "summary": "List Apis", "description": "List all APIs for a tenant from GitLab", "operationId": "list_apis_v1_tenants__tenant_id__apis_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/APIResponse" }, "title": "Response List Apis V1 Tenants Tenant Id Apis Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "APIs" ], "summary": "Create Api", "description": "Create a new API in GitLab and emit event.\n\nThis creates the API definition in the GitOps repository:\n- tenants/{tenant_id}/apis/{api_name}/api.yaml\n- tenants/{tenant_id}/apis/{api_name}/openapi.yaml (if provided)", "operationId": "create_api_v1_tenants__tenant_id__apis_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APICreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/apis/{api_id}": { "get": { "tags": [ "APIs" ], "summary": "Get Api", "description": "Get API by ID from GitLab", "operationId": "get_api_v1_tenants__tenant_id__apis__api_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "APIs" ], "summary": "Update Api", "description": "Update API in GitLab", "operationId": "update_api_v1_tenants__tenant_id__apis__api_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "APIs" ], "summary": "Delete Api", "description": "Delete API from GitLab", "operationId": "delete_api_v1_tenants__tenant_id__apis__api_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/applications": { "get": { "tags": [ "Applications" ], "summary": "List Applications", "description": "List all applications for a tenant", "operationId": "list_applications_v1_tenants__tenant_id__applications_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationResponse" }, "title": "Response List Applications V1 Tenants Tenant Id Applications Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Applications" ], "summary": "Create Application", "description": "Create a new application (Keycloak client)", "operationId": "create_application_v1_tenants__tenant_id__applications_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/applications/{app_id}": { "get": { "tags": [ "Applications" ], "summary": "Get Application", "description": "Get application by ID", "operationId": "get_application_v1_tenants__tenant_id__applications__app_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "app_id", "in": "path", "required": true, "schema": { "type": "string", "title": "App Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Applications" ], "summary": "Update Application", "description": "Update application", "operationId": "update_application_v1_tenants__tenant_id__applications__app_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "app_id", "in": "path", "required": true, "schema": { "type": "string", "title": "App Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Applications" ], "summary": "Delete Application", "description": "Delete application", "operationId": "delete_application_v1_tenants__tenant_id__applications__app_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "app_id", "in": "path", "required": true, "schema": { "type": "string", "title": "App Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/applications/{app_id}/regenerate-secret": { "post": { "tags": [ "Applications" ], "summary": "Regenerate Secret", "description": "Regenerate application client secret", "operationId": "regenerate_secret_v1_tenants__tenant_id__applications__app_id__regenerate_secret_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "app_id", "in": "path", "required": true, "schema": { "type": "string", "title": "App Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationCredentials" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/applications/{app_id}/subscribe/{api_id}": { "post": { "tags": [ "Applications" ], "summary": "Subscribe To Api", "description": "Subscribe application to an API", "operationId": "subscribe_to_api_v1_tenants__tenant_id__applications__app_id__subscribe__api_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "app_id", "in": "path", "required": true, "schema": { "type": "string", "title": "App Id" } }, { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Applications" ], "summary": "Unsubscribe From Api", "description": "Unsubscribe application from an API", "operationId": "unsubscribe_from_api_v1_tenants__tenant_id__applications__app_id__subscribe__api_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "app_id", "in": "path", "required": true, "schema": { "type": "string", "title": "App Id" } }, { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/deployments": { "get": { "tags": [ "Deployments" ], "summary": "List Deployments", "description": "List deployment history", "operationId": "list_deployments_v1_tenants__tenant_id__deployments_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "api_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Id" } }, { "name": "environment", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/Environment" }, { "type": "null" } ], "title": "Environment" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DeploymentResponse" }, "title": "Response List Deployments V1 Tenants Tenant Id Deployments Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Deployments" ], "summary": "Create Deployment", "description": "Deploy an API to an environment.\n\nThis will:\n1. Validate the API exists and is deployable\n2. Create a deploy-request event in Kafka\n3. AWX will pick up the event and execute the deployment\n4. Status updates will be streamed via SSE", "operationId": "create_deployment_v1_tenants__tenant_id__deployments_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/deployments/{deployment_id}": { "get": { "tags": [ "Deployments" ], "summary": "Get Deployment", "description": "Get deployment details", "operationId": "get_deployment_v1_tenants__tenant_id__deployments__deployment_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "deployment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Deployment Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/deployments/{deployment_id}/rollback": { "post": { "tags": [ "Deployments" ], "summary": "Rollback Deployment", "description": "Rollback a deployment to a previous version", "operationId": "rollback_deployment_v1_tenants__tenant_id__deployments__deployment_id__rollback_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "deployment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Deployment Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RollbackRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/deployments/{deployment_id}/logs": { "get": { "tags": [ "Deployments" ], "summary": "Get Deployment Logs", "description": "Get deployment logs from AWX", "operationId": "get_deployment_logs_v1_tenants__tenant_id__deployments__deployment_id__logs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "deployment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Deployment Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/deployments/environments/{environment}/status": { "get": { "tags": [ "Deployments" ], "summary": "Get Environment Status", "description": "Get status of all APIs deployed in an environment", "operationId": "get_environment_status_v1_tenants__tenant_id__deployments_environments__environment__status_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "environment", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/Environment" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/git/commits": { "get": { "tags": [ "Git" ], "summary": "List Commits", "description": "List recent commits for tenant repository", "operationId": "list_commits_v1_tenants__tenant_id__git_commits_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "path", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 20, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CommitInfo" }, "title": "Response List Commits V1 Tenants Tenant Id Git Commits Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/git/files/{file_path}": { "get": { "tags": [ "Git" ], "summary": "Get File", "description": "Get file content from GitLab", "operationId": "get_file_v1_tenants__tenant_id__git_files__file_path__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "file_path", "in": "path", "required": true, "schema": { "type": "string", "title": "File Path" } }, { "name": "ref", "in": "query", "required": false, "schema": { "type": "string", "default": "main", "title": "Ref" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Git" ], "summary": "Create Or Update File", "description": "Create or update a file in GitLab", "operationId": "create_or_update_file_v1_tenants__tenant_id__git_files__file_path__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "file_path", "in": "path", "required": true, "schema": { "type": "string", "title": "File Path" } }, { "name": "branch", "in": "query", "required": false, "schema": { "type": "string", "default": "main", "title": "Branch" } }, { "name": "commit_message", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Commit Message" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileContent" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Git" ], "summary": "Delete File", "description": "Delete a file from GitLab", "operationId": "delete_file_v1_tenants__tenant_id__git_files__file_path__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "file_path", "in": "path", "required": true, "schema": { "type": "string", "title": "File Path" } }, { "name": "branch", "in": "query", "required": false, "schema": { "type": "string", "default": "main", "title": "Branch" } }, { "name": "commit_message", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Commit Message" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/git/tree": { "get": { "tags": [ "Git" ], "summary": "Get Tree", "description": "Get directory tree from GitLab", "operationId": "get_tree_v1_tenants__tenant_id__git_tree_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "path", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Path" } }, { "name": "ref", "in": "query", "required": false, "schema": { "type": "string", "default": "main", "title": "Ref" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/git/merge-requests": { "get": { "tags": [ "Git" ], "summary": "List Merge Requests", "description": "List merge requests", "operationId": "list_merge_requests_v1_tenants__tenant_id__git_merge_requests_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "default": "opened", "title": "State" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MergeRequestResponse" }, "title": "Response List Merge Requests V1 Tenants Tenant Id Git Merge Requests Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Git" ], "summary": "Create Merge Request", "description": "Create a merge request", "operationId": "create_merge_request_v1_tenants__tenant_id__git_merge_requests_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MergeRequestCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MergeRequestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/git/merge-requests/{mr_iid}/merge": { "post": { "tags": [ "Git" ], "summary": "Merge Request", "description": "Merge a merge request", "operationId": "merge_request_v1_tenants__tenant_id__git_merge_requests__mr_iid__merge_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "mr_iid", "in": "path", "required": true, "schema": { "type": "integer", "title": "Mr Iid" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tenants/{tenant_id}/git/branches": { "get": { "tags": [ "Git" ], "summary": "List Branches", "description": "List branches", "operationId": "list_branches_v1_tenants__tenant_id__git_branches_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Git" ], "summary": "Create Branch", "description": "Create a new branch", "operationId": "create_branch_v1_tenants__tenant_id__git_branches_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "branch_name", "in": "query", "required": true, "schema": { "type": "string", "title": "Branch Name" } }, { "name": "ref", "in": "query", "required": false, "schema": { "type": "string", "default": "main", "title": "Ref" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/events/stream/{tenant_id}": { "get": { "tags": [ "Events" ], "summary": "Stream Events", "description": "Stream real-time events for a tenant via Server-Sent Events.\n\nConnect to this endpoint to receive real-time updates about:\n- API lifecycle events (created, updated, deleted)\n- Deployment status changes\n- Application events\n\nQuery params:\n- event_types: Comma-separated list of event types to filter (optional)\n\nExample:\n```\nconst eventSource = new EventSource('/v1/events/stream/tenant-123?event_types=deploy-progress,deploy-success');\neventSource.onmessage = (event) => {\n console.log(event.data);\n};\n```", "operationId": "stream_events_v1_events_stream__tenant_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "event_types", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Types" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/events/stream/global": { "get": { "tags": [ "Events" ], "summary": "Stream Global Events", "description": "Stream all events (for cpi-admin users only).\n\nThis endpoint streams events from all tenants.\nOnly users with cpi-admin role can access this.", "operationId": "stream_global_events_v1_events_stream_global_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "event_types", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Types" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/events/history/{tenant_id}": { "get": { "tags": [ "Events" ], "summary": "Get Event History", "description": "Get historical events from database/Kafka", "operationId": "get_event_history_v1_events_history__tenant_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/events/deployment-result": { "post": { "tags": [ "Events" ], "summary": "Receive Deployment Result", "description": "Receive deployment result notification from AWX playbooks.\n\nThis endpoint is called by Ansible playbooks after completing\ndeployment, rollback, or other gateway operations.\n\nThe result is published to Kafka for:\n- Real-time UI updates via SSE\n- Audit logging\n- Metrics collection", "operationId": "receive_deployment_result_v1_events_deployment_result_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentResult" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/webhooks/gitlab": { "post": { "tags": [ "Webhooks" ], "summary": "Gitlab Webhook", "description": "Handle GitLab webhooks for GitOps with full pipeline tracing.\n\nCaptures the git author (who pushed) from the GitLab payload and stores\ntraces in PostgreSQL for persistent monitoring.", "operationId": "gitlab_webhook_webhooks_gitlab_post", "parameters": [ { "name": "X-Gitlab-Token", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Gitlab-Token" } }, { "name": "X-Gitlab-Event", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Gitlab-Event" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/webhooks/gitlab/health": { "get": { "tags": [ "Webhooks" ], "summary": "Webhook Health", "description": "Health check for GitLab webhook endpoint with trace stats from PostgreSQL.", "operationId": "webhook_health_webhooks_gitlab_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/v1/traces": { "get": { "tags": [ "Traces" ], "summary": "List Traces", "description": "List recent pipeline traces with optional filtering.\n\nReturns summaries for efficient list display.", "operationId": "list_traces_v1_traces_get", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "tenant_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/traces/stats": { "get": { "tags": [ "Traces" ], "summary": "Get Trace Stats", "description": "Get pipeline trace statistics.\n\nReturns aggregated metrics about pipeline executions.", "operationId": "get_trace_stats_v1_traces_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/v1/traces/live": { "get": { "tags": [ "Traces" ], "summary": "Get Live Traces", "description": "Get currently running traces (in_progress status).\n\nUseful for real-time monitoring dashboards.", "operationId": "get_live_traces_v1_traces_live_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/v1/traces/{trace_id}": { "get": { "tags": [ "Traces" ], "summary": "Get Trace", "description": "Get detailed information about a specific trace.\n\nIncludes all steps with timing and error details.", "operationId": "get_trace_v1_traces__trace_id__get", "parameters": [ { "name": "trace_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Trace Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/traces/{trace_id}/timeline": { "get": { "tags": [ "Traces" ], "summary": "Get Trace Timeline", "description": "Get a timeline view of a trace suitable for visualization.\n\nReturns steps in a format optimized for timeline rendering.", "operationId": "get_trace_timeline_v1_traces__trace_id__timeline_get", "parameters": [ { "name": "trace_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Trace Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/traces/demo": { "post": { "tags": [ "Traces" ], "summary": "Create Demo Trace", "description": "Create a demo trace for testing the monitoring UI.", "operationId": "create_demo_trace_v1_traces_demo_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/v1/traces/demo/batch": { "post": { "tags": [ "Traces" ], "summary": "Create Demo Traces Batch", "description": "Create multiple demo traces for a realistic monitoring view.", "operationId": "create_demo_traces_batch_v1_traces_demo_batch_post", "parameters": [ { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Count" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/gateway/apis": { "get": { "tags": [ "Gateway" ], "summary": "List Gateway Apis", "description": "List all APIs registered in the Gateway.\n\nRequires: cpi-admin or devops role", "operationId": "list_gateway_apis_v1_gateway_apis_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/GatewayAPIResponse" }, "type": "array", "title": "Response List Gateway Apis V1 Gateway Apis Get" } } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ] }, "post": { "tags": [ "Gateway" ], "summary": "Import Gateway Api", "description": "Import an API from OpenAPI specification into the Gateway.\n\nRequires: cpi-admin or devops role with create permission\n\nArgs:\n apiName: Name for the API\n apiVersion: Version of the API\n url: URL to fetch OpenAPI spec from\n apiDefinition: OpenAPI spec content as string (alternative to url)\n type: API type (openapi, swagger, raml, wsdl)", "operationId": "import_gateway_api_v1_gateway_apis_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportAPIRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportAPIResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ] } }, "/v1/gateway/apis/{api_id}": { "get": { "tags": [ "Gateway" ], "summary": "Get Gateway Api", "description": "Get API details from Gateway.\n\nRequires: cpi-admin or devops role", "operationId": "get_gateway_api_v1_gateway_apis__api_id__get", "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ], "parameters": [ { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Gateway" ], "summary": "Delete Gateway Api", "description": "Delete an API from the Gateway.\n\nRequires: cpi-admin role", "operationId": "delete_gateway_api_v1_gateway_apis__api_id__delete", "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ], "parameters": [ { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/gateway/apis/{api_id}/activate": { "put": { "tags": [ "Gateway" ], "summary": "Activate Gateway Api", "description": "Activate an API in the Gateway.\n\nRequires: cpi-admin or devops role with promote permission", "operationId": "activate_gateway_api_v1_gateway_apis__api_id__activate_put", "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ], "parameters": [ { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/gateway/apis/{api_id}/deactivate": { "put": { "tags": [ "Gateway" ], "summary": "Deactivate Gateway Api", "description": "Deactivate an API in the Gateway.\n\nRequires: cpi-admin or devops role with promote permission", "operationId": "deactivate_gateway_api_v1_gateway_apis__api_id__deactivate_put", "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ], "parameters": [ { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/gateway/applications": { "get": { "tags": [ "Gateway" ], "summary": "List Gateway Applications", "description": "List all applications registered in the Gateway.\n\nRequires: cpi-admin or tenant-admin role", "operationId": "list_gateway_applications_v1_gateway_applications_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/GatewayApplicationResponse" }, "type": "array", "title": "Response List Gateway Applications V1 Gateway Applications Get" } } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ] } }, "/v1/gateway/scopes": { "get": { "tags": [ "Gateway" ], "summary": "List Gateway Scopes", "description": "List all OAuth scopes configured in the Gateway.\n\nRequires: cpi-admin role", "operationId": "list_gateway_scopes_v1_gateway_scopes_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/GatewayScopeResponse" }, "type": "array", "title": "Response List Gateway Scopes V1 Gateway Scopes Get" } } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ] } }, "/v1/gateway/configure-oidc": { "post": { "tags": [ "Gateway" ], "summary": "Configure Api Oidc", "description": "Configure OIDC authentication for an API in the Gateway.\n\nThis high-level operation:\n1. Creates an OAuth strategy for the API\n2. Creates an application for the tenant\n3. Creates scope mappings with standardized naming\n\nNaming pattern: {AuthServer}:{TenantId}:{ApiName}:{Version}:{Scope}\n\nRequires: cpi-admin role", "operationId": "configure_api_oidc_v1_gateway_configure_oidc_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OIDCConfigRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OIDCConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ] } }, "/v1/gateway/health": { "get": { "tags": [ "Gateway" ], "summary": "Gateway Health", "description": "Check Gateway health status via OIDC proxy.\n\nThis validates that:\n1. The Gateway-Admin-API proxy is accessible\n2. The user's JWT token is valid for Gateway operations", "operationId": "gateway_health_v1_gateway_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBearer": [] } ] } }, "/v1/subscriptions": { "post": { "tags": [ "Subscriptions" ], "summary": "Create Subscription", "description": "Create a new subscription request.\n\nThis endpoint is called by the Developer Portal when a user subscribes\nto an API. The subscription starts in PENDING status and must be\napproved by an API admin.\n\nReturns the API key (shown only once!).", "operationId": "create_subscription_v1_subscriptions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIKeyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/subscriptions/my": { "get": { "tags": [ "Subscriptions" ], "summary": "List My Subscriptions", "description": "List current user's subscriptions.\n\nUsed by the Developer Portal to show user's subscribed APIs.", "operationId": "list_my_subscriptions_v1_subscriptions_my_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/SubscriptionStatusEnum" }, { "type": "null" } ], "title": "Status" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/{subscription_id}": { "get": { "tags": [ "Subscriptions" ], "summary": "Get Subscription", "description": "Get subscription details by ID", "operationId": "get_subscription_v1_subscriptions__subscription_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Subscriptions" ], "summary": "Cancel Subscription", "description": "Cancel a subscription (subscriber action).\n\nSubscribers can cancel their own subscriptions.", "operationId": "cancel_subscription_v1_subscriptions__subscription_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/{subscription_id}/rotate-key": { "post": { "tags": [ "Subscriptions" ], "summary": "Rotate Api Key", "description": "Rotate the API key for a subscription with grace period.\n\nThe old key remains valid for the specified grace period (default 24 hours).\nDuring the grace period, both old and new keys are accepted.\nAfter the grace period expires, only the new key is valid.\n\nReturns the new API key (shown only once!) and grace period information.\nAn email notification is sent to the subscriber with the new key.", "operationId": "rotate_api_key_v1_subscriptions__subscription_id__rotate_key_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/KeyRotationRequest" } ], "default": { "grace_period_hours": 24 }, "title": "Request" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeyRotationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/{subscription_id}/rotation-info": { "get": { "tags": [ "Subscriptions" ], "summary": "Get Subscription Rotation Info", "description": "Get subscription details with key rotation information.\n\nIncludes grace period status if a key rotation is in progress.", "operationId": "get_subscription_rotation_info_v1_subscriptions__subscription_id__rotation_info_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionWithRotationInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/tenant/{tenant_id}": { "get": { "tags": [ "Subscriptions" ], "summary": "List Tenant Subscriptions", "description": "List all subscriptions for a tenant.\n\nUsed by tenant admins to view and manage subscriptions.", "operationId": "list_tenant_subscriptions_v1_subscriptions_tenant__tenant_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/SubscriptionStatusEnum" }, { "type": "null" } ], "title": "Status" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/tenant/{tenant_id}/pending": { "get": { "tags": [ "Subscriptions" ], "summary": "List Pending Subscriptions", "description": "List pending subscriptions awaiting approval.\n\nUsed by tenant admins to see subscription requests.", "operationId": "list_pending_subscriptions_v1_subscriptions_tenant__tenant_id__pending_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/{subscription_id}/approve": { "post": { "tags": [ "Subscriptions" ], "summary": "Approve Subscription", "description": "Approve a pending subscription.\n\nTenant admins approve subscription requests.", "operationId": "approve_subscription_v1_subscriptions__subscription_id__approve_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionApprove" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/{subscription_id}/revoke": { "post": { "tags": [ "Subscriptions" ], "summary": "Revoke Subscription", "description": "Revoke an active subscription.\n\nTenant admins can revoke subscriptions for policy violations.", "operationId": "revoke_subscription_v1_subscriptions__subscription_id__revoke_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionRevoke" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/{subscription_id}/suspend": { "post": { "tags": [ "Subscriptions" ], "summary": "Suspend Subscription", "description": "Temporarily suspend a subscription.\n\nCan be reactivated later.", "operationId": "suspend_subscription_v1_subscriptions__subscription_id__suspend_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/{subscription_id}/reactivate": { "post": { "tags": [ "Subscriptions" ], "summary": "Reactivate Subscription", "description": "Reactivate a suspended subscription.", "operationId": "reactivate_subscription_v1_subscriptions__subscription_id__reactivate_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscriptions/validate-key": { "post": { "tags": [ "Subscriptions" ], "summary": "Validate Api Key", "description": "Validate an API key (used by the Gateway).\n\nThis is an internal endpoint for the API Gateway to validate\nincoming API keys and get subscription details.\n\nSupports grace period: during key rotation, both old and new keys are valid.", "operationId": "validate_api_key_v1_subscriptions_validate_key_post", "parameters": [ { "name": "api_key", "in": "query", "required": true, "schema": { "type": "string", "title": "Api Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tenants/{tenant_id}/webhooks/events": { "get": { "tags": [ "Tenant Webhooks" ], "summary": "List Event Types", "description": "List all available webhook event types with descriptions and payload examples.", "operationId": "list_event_types_tenants__tenant_id__webhooks_events_get", "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventTypesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tenants/{tenant_id}/webhooks": { "post": { "tags": [ "Tenant Webhooks" ], "summary": "Create Webhook", "description": "Create a new webhook configuration for a tenant.\n\nRequires tenant-admin or cpi-admin role.", "operationId": "create_webhook_tenants__tenant_id__webhooks_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Tenant Webhooks" ], "summary": "List Webhooks", "description": "List all webhooks for a tenant.", "operationId": "list_webhooks_tenants__tenant_id__webhooks_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "enabled_only", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Only return enabled webhooks", "default": false, "title": "Enabled Only" }, "description": "Only return enabled webhooks" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tenants/{tenant_id}/webhooks/{webhook_id}": { "get": { "tags": [ "Tenant Webhooks" ], "summary": "Get Webhook", "description": "Get a specific webhook configuration.", "operationId": "get_webhook_tenants__tenant_id__webhooks__webhook_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "Tenant Webhooks" ], "summary": "Update Webhook", "description": "Update a webhook configuration.", "operationId": "update_webhook_tenants__tenant_id__webhooks__webhook_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Tenant Webhooks" ], "summary": "Delete Webhook", "description": "Delete a webhook configuration.", "operationId": "delete_webhook_tenants__tenant_id__webhooks__webhook_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tenants/{tenant_id}/webhooks/{webhook_id}/deliveries": { "get": { "tags": [ "Tenant Webhooks" ], "summary": "List Deliveries", "description": "Get delivery history for a webhook.", "operationId": "list_deliveries_tenants__tenant_id__webhooks__webhook_id__deliveries_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "description": "Max number of deliveries to return", "default": 50, "title": "Limit" }, "description": "Max number of deliveries to return" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookDeliveryListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tenants/{tenant_id}/webhooks/{webhook_id}/deliveries/{delivery_id}/retry": { "post": { "tags": [ "Tenant Webhooks" ], "summary": "Retry Delivery", "description": "Manually retry a failed webhook delivery.", "operationId": "retry_delivery_tenants__tenant_id__webhooks__webhook_id__deliveries__delivery_id__retry_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "delivery_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Delivery Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookDeliveryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tenants/{tenant_id}/webhooks/{webhook_id}/test": { "post": { "tags": [ "Tenant Webhooks" ], "summary": "Test Webhook", "description": "Send a test event to a webhook to verify it's working.", "operationId": "test_webhook_tenants__tenant_id__webhooks__webhook_id__test_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookTestRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookTestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/certificates/validate": { "post": { "tags": [ "certificates" ], "summary": "Validate a PEM certificate", "description": "Parse and validate a PEM-encoded X.509 certificate. Returns certificate details and validation status.", "operationId": "validate_certificate_v1_certificates_validate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CertificateValidationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CertificateValidationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/certificates/upload": { "post": { "tags": [ "certificates" ], "summary": "Upload and validate a certificate file", "description": "Upload a .pem or .crt file for validation.", "operationId": "upload_certificate_v1_certificates_upload_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_certificate_v1_certificates_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CertificateValidationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/certificates/health": { "get": { "tags": [ "certificates" ], "summary": "Check certificate validation service health", "description": "Check if certificate validation is available.", "operationId": "health_check_v1_certificates_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Health Check V1 Certificates Health Get" } } } } } } }, "/v1/search/search/tools": { "get": { "tags": [ "Search", "search" ], "summary": "Search Tools", "description": "Search tools catalog with full-text search.\n\nSupports:\n- Full-text search across name, description, and tags\n- Fuzzy matching for typo tolerance\n- Faceted filtering by category, tags, and visibility\n- Relevance scoring with boosted fields\n- Pagination and sorting", "operationId": "search_tools_v1_search_search_tools_get", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "description": "Search query", "default": "", "title": "Q" }, "description": "Search query" }, { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by category", "title": "Category" }, "description": "Filter by category" }, { "name": "tags", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by tags (comma-separated)", "title": "Tags" }, "description": "Filter by tags (comma-separated)" }, { "name": "visibility", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by visibility", "title": "Visibility" }, "description": "Filter by visibility" }, { "name": "sort", "in": "query", "required": false, "schema": { "allOf": [ { "$ref": "#/components/schemas/SortOrder" } ], "description": "Sort order", "default": "relevance", "title": "Sort" }, "description": "Sort order" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Results per page", "default": 20, "title": "Page Size" }, "description": "Results per page" }, { "name": "facets", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include facets in response", "default": true, "title": "Facets" }, "description": "Include facets in response" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/search/search/tools/suggest": { "get": { "tags": [ "Search", "search" ], "summary": "Suggest Tools", "description": "Get auto-complete suggestions for tool names.\n\nReturns matching tool names as the user types,\nwith fuzzy matching for typo tolerance.", "operationId": "suggest_tools_v1_search_search_tools_suggest_get", "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "description": "Query prefix", "title": "Q" }, "description": "Query prefix" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "description": "Max suggestions", "default": 10, "title": "Limit" }, "description": "Max suggestions" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuggestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/search/search/tools/facets": { "get": { "tags": [ "Search", "search" ], "summary": "Get Tool Facets", "description": "Get all available facets for filtering tools.\n\nReturns counts for each category, tag, and visibility level.", "operationId": "get_tool_facets_v1_search_search_tools_facets_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetsResponse" } } } } } } }, "/v1/search/search/analytics": { "get": { "tags": [ "Search", "search" ], "summary": "Get Search Analytics", "description": "Get search analytics (admin only).\n\nReturns:\n- Top search queries\n- Popular tools\n- Search volume over time", "operationId": "get_search_analytics_v1_search_search_analytics_get", "parameters": [ { "name": "period", "in": "query", "required": false, "schema": { "type": "string", "description": "Time period (1d, 7d, 30d)", "default": "7d", "title": "Period" }, "description": "Time period (1d, 7d, 30d)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/usage/me": { "get": { "tags": [ "Usage" ], "summary": "Get My Usage Summary", "description": "Retourne le résumé d'usage pour l'utilisateur connecté.\n\nInclut:\n- Stats aujourd'hui / cette semaine / ce mois\n- Top 5 des tools les plus utilisés\n- Evolution des appels sur 7 jours", "operationId": "get_my_usage_summary_v1_usage_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageSummary" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/usage/me/calls": { "get": { "tags": [ "Usage" ], "summary": "Get My Calls", "description": "Retourne la liste paginée des derniers appels MCP de l'utilisateur.\n\nFiltres disponibles:\n- status: success, error, timeout\n- tool_id: filtrer par tool\n- from_date / to_date: période", "operationId": "get_my_calls_v1_usage_me_calls_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Number of calls to return", "default": 20, "title": "Limit" }, "description": "Number of calls to return" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Offset for pagination", "default": 0, "title": "Offset" }, "description": "Offset for pagination" }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/CallStatus" }, { "type": "null" } ], "description": "Filter by call status", "title": "Status" }, "description": "Filter by call status" }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by tool ID", "title": "Tool Id" }, "description": "Filter by tool ID" }, { "name": "from_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Start date filter", "title": "From Date" }, "description": "Start date filter" }, { "name": "to_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "End date filter", "title": "To Date" }, "description": "End date filter" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageCallsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/usage/me/subscriptions": { "get": { "tags": [ "Usage" ], "summary": "Get My Active Subscriptions", "description": "Retourne la liste des subscriptions actives de l'utilisateur.", "operationId": "get_my_active_subscriptions_v1_usage_me_subscriptions_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ActiveSubscription" }, "type": "array", "title": "Response Get My Active Subscriptions V1 Usage Me Subscriptions Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/dashboard/stats": { "get": { "tags": [ "Dashboard" ], "summary": "Get Dashboard Stats", "description": "Retourne les statistiques agrégées pour la home page du Portal.\n\nInclut:\n- Nombre de tools disponibles\n- Nombre de subscriptions actives\n- Nombre d'appels API cette semaine\n- Tendances (% change)", "operationId": "get_dashboard_stats_v1_dashboard_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DashboardStats" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/dashboard/activity": { "get": { "tags": [ "Dashboard" ], "summary": "Get Dashboard Activity", "description": "Retourne l'activité récente pour la home page du Portal.", "operationId": "get_dashboard_activity_v1_dashboard_activity_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 20, "minimum": 1, "description": "Number of activities to return", "default": 5, "title": "Limit" }, "description": "Number of activities to return" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DashboardActivityResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/service-accounts": { "get": { "tags": [ "Service Accounts" ], "summary": "List my service accounts", "description": "List all service accounts owned by the current user.", "operationId": "list_service_accounts_v1_service_accounts_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ServiceAccountResponse" }, "type": "array", "title": "Response List Service Accounts V1 Service Accounts Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "Service Accounts" ], "summary": "Create a service account", "description": "Create a new OAuth2 service account for MCP access. The account inherits your roles.", "operationId": "create_service_account_v1_service_accounts_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceAccountCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceAccountCreated" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/service-accounts/{account_id}": { "delete": { "tags": [ "Service Accounts" ], "summary": "Delete a service account", "description": "Delete a service account. Only the owner can delete their accounts.", "operationId": "delete_service_account_v1_service_accounts__account_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "account_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/service-accounts/{account_id}/regenerate-secret": { "post": { "tags": [ "Service Accounts" ], "summary": "Regenerate service account secret", "description": "Generate a new client secret. The old secret will be invalidated immediately.", "operationId": "regenerate_secret_v1_service_accounts__account_id__regenerate_secret_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "account_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceAccountSecretRegenerated" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health/live": { "get": { "tags": [ "Health" ], "summary": "Liveness", "description": "Liveness probe - process is alive.\n\nK8s will restart the pod if this fails.\nShould be a simple check that the process is running.", "operationId": "liveness_health_live_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthCheck" } } } } } } }, "/health/ready": { "get": { "tags": [ "Health" ], "summary": "Readiness", "description": "Readiness probe - ready to accept traffic.\n\nK8s will remove pod from service if this fails.\nChecks critical dependencies (Kafka, Keycloak).\nNon-critical: GitLab, Gateway, AWX.", "operationId": "readiness_health_ready_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthCheck" } } } } } } }, "/health/startup": { "get": { "tags": [ "Health" ], "summary": "Startup", "description": "Startup probe - initial boot complete.\n\nK8s uses this during pod startup to know when\nto start running liveness/readiness probes.", "operationId": "startup_health_startup_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthCheck" } } } } } } }, "/v1/contracts": { "post": { "tags": [ "Contracts" ], "summary": "Create Contract", "description": "Create a new Universal API Contract.\n\nCreates the contract and initializes all protocol bindings as disabled.", "operationId": "create_contract_v1_contracts_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Contracts" ], "summary": "List Contracts", "description": "List contracts for the user's tenant.", "operationId": "list_contracts_v1_contracts_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status", "title": "Status" }, "description": "Filter by status" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/contracts/{contract_id}": { "get": { "tags": [ "Contracts" ], "summary": "Get Contract", "description": "Get a specific contract by ID.", "operationId": "get_contract_v1_contracts__contract_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "contract_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Contract Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "Contracts" ], "summary": "Update Contract", "description": "Update a contract.", "operationId": "update_contract_v1_contracts__contract_id__patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "contract_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Contract Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Contracts" ], "summary": "Delete Contract", "description": "Delete a contract and all its bindings.", "operationId": "delete_contract_v1_contracts__contract_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "contract_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Contract Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/contracts/{contract_id}/bindings": { "get": { "tags": [ "Contracts" ], "summary": "List Bindings", "description": "List all protocol bindings for a contract.\n\nReturns all 5 protocols (REST, MCP, GraphQL, gRPC, Kafka) with their status.\nUsed by the Protocol Switcher UI component.", "operationId": "list_bindings_v1_contracts__contract_id__bindings_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "contract_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Contract Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BindingsListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Contracts" ], "summary": "Enable Binding", "description": "Enable a protocol binding for a contract.\n\nThis triggers the UAC engine to generate the binding (endpoint, tool, etc.).", "operationId": "enable_binding_v1_contracts__contract_id__bindings_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "contract_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Contract Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnableBindingRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnableBindingResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/contracts/{contract_id}/bindings/{protocol}": { "delete": { "tags": [ "Contracts" ], "summary": "Disable Binding", "description": "Disable a protocol binding for a contract.\n\nThe binding is soft-disabled (keeps history). The endpoint becomes inactive.", "operationId": "disable_binding_v1_contracts__contract_id__bindings__protocol__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "contract_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Contract Id" } }, { "name": "protocol", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/ProtocolType" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DisableBindingResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/servers": { "get": { "tags": [ "MCP Servers" ], "summary": "List MCP servers", "description": "List available MCP servers visible to the current user based on roles and tenant.", "operationId": "list_servers_v1_mcp_servers_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/MCPServerCategoryEnum" }, { "type": "null" } ], "description": "Filter by server category", "title": "Category" }, "description": "Filter by server category" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Items per page", "default": 20, "title": "Page Size" }, "description": "Items per page" } ], "responses": { "200": { "description": "List of MCP servers with pagination", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerListResponse" } } } }, "401": { "description": "Not authenticated" }, "429": { "description": "Rate limit exceeded" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/servers/{server_id}": { "get": { "tags": [ "MCP Servers" ], "summary": "Get MCP server", "description": "Get detailed information about a specific MCP server including its tools.", "operationId": "get_server_v1_mcp_servers__server_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Server Id" } } ], "responses": { "200": { "description": "Server details with tools list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerResponse" } } } }, "401": { "description": "Not authenticated" }, "404": { "description": "Server not found" }, "429": { "description": "Rate limit exceeded" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/subscriptions": { "post": { "tags": [ "MCP Subscriptions" ], "summary": "Subscribe to a server", "description": "Create a subscription to an MCP server. Returns an API key (shown only once!).", "operationId": "create_subscription_v1_mcp_subscriptions_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionCreate" } } } }, "responses": { "201": { "description": "Subscription created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionWithKeyResponse" } } } }, "400": { "description": "Server not available for subscriptions" }, "401": { "description": "Not authenticated" }, "404": { "description": "Server not found" }, "409": { "description": "Already subscribed to this server" }, "429": { "description": "Rate limit exceeded" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "MCP Subscriptions" ], "summary": "List my subscriptions", "description": "List all MCP server subscriptions for the current user.", "operationId": "list_my_subscriptions_v1_mcp_subscriptions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/MCPSubscriptionStatusEnum" }, { "type": "null" } ], "description": "Filter by subscription status", "title": "Status" }, "description": "Filter by subscription status" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Items per page", "default": 20, "title": "Page Size" }, "description": "Items per page" } ], "responses": { "200": { "description": "List of subscriptions with pagination", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionListResponse" } } } }, "401": { "description": "Not authenticated" }, "429": { "description": "Rate limit exceeded" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/subscriptions/{subscription_id}": { "get": { "tags": [ "MCP Subscriptions" ], "summary": "Get subscription details", "description": "Get detailed information about a specific subscription including tool access.", "operationId": "get_subscription_v1_mcp_subscriptions__subscription_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "200": { "description": "Subscription details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionResponse" } } } }, "401": { "description": "Not authenticated" }, "403": { "description": "Access denied (not owner)" }, "404": { "description": "Subscription not found" }, "429": { "description": "Rate limit exceeded" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "MCP Subscriptions" ], "summary": "Cancel subscription", "description": "Cancel a pending or active subscription. This is a subscriber action.", "operationId": "cancel_subscription_v1_mcp_subscriptions__subscription_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "204": { "description": "Subscription cancelled successfully" }, "400": { "description": "Cannot cancel subscription in current status" }, "401": { "description": "Not authenticated" }, "403": { "description": "Access denied (not owner)" }, "404": { "description": "Subscription not found" }, "429": { "description": "Rate limit exceeded" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/subscriptions/{subscription_id}/rotate-key": { "post": { "tags": [ "MCP Subscriptions" ], "summary": "Rotate API key", "description": "Rotate the API key for a subscription. The old key remains valid during a grace period.", "operationId": "rotate_api_key_v1_mcp_subscriptions__subscription_id__rotate_key_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/MCPKeyRotationRequest" } ], "default": { "grace_period_hours": 24 }, "title": "Body" } } } }, "responses": { "200": { "description": "New API key generated with grace period", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPKeyRotationResponse" } } } }, "400": { "description": "Cannot rotate key (wrong status or rotation already in progress)" }, "401": { "description": "Not authenticated" }, "403": { "description": "Access denied (not owner)" }, "404": { "description": "Subscription not found" }, "429": { "description": "Rate limit exceeded" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/subscriptions/pending": { "get": { "tags": [ "MCP Admin - Subscriptions" ], "summary": "List Pending Approvals", "description": "List pending MCP subscription requests awaiting approval.\n\nCPI admins see all pending requests.\nTenant admins see only their tenant's requests.", "operationId": "list_pending_approvals_v1_admin_mcp_subscriptions_pending_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Id" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPPendingApprovalsListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/subscriptions/tenant/{tenant_id}": { "get": { "tags": [ "MCP Admin - Subscriptions" ], "summary": "List Tenant Subscriptions", "description": "List all MCP subscriptions for a tenant.\n\nUsed by tenant admins to view and manage their tenant's subscriptions.", "operationId": "list_tenant_subscriptions_v1_admin_mcp_subscriptions_tenant__tenant_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/MCPSubscriptionStatusEnum" }, { "type": "null" } ], "title": "Status" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/subscriptions/{subscription_id}/approve": { "post": { "tags": [ "MCP Admin - Subscriptions" ], "summary": "Approve Subscription", "description": "Approve a pending MCP subscription.\n\nGenerates an API key and activates the subscription.\nReturns the API key (shown only once!).", "operationId": "approve_subscription_v1_admin_mcp_subscriptions__subscription_id__approve_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/MCPSubscriptionApprove" } ], "default": {}, "title": "Request" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionWithKeyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/subscriptions/{subscription_id}/revoke": { "post": { "tags": [ "MCP Admin - Subscriptions" ], "summary": "Revoke Subscription", "description": "Revoke an MCP subscription.\n\nPermanently revokes a subscription. The API key will no longer work.", "operationId": "revoke_subscription_v1_admin_mcp_subscriptions__subscription_id__revoke_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionRevoke" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/subscriptions/{subscription_id}/suspend": { "post": { "tags": [ "MCP Admin - Subscriptions" ], "summary": "Suspend Subscription", "description": "Temporarily suspend an MCP subscription.\n\nCan be reactivated later.", "operationId": "suspend_subscription_v1_admin_mcp_subscriptions__subscription_id__suspend_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/subscriptions/{subscription_id}/reactivate": { "post": { "tags": [ "MCP Admin - Subscriptions" ], "summary": "Reactivate Subscription", "description": "Reactivate a suspended MCP subscription.", "operationId": "reactivate_subscription_v1_admin_mcp_subscriptions__subscription_id__reactivate_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Subscription Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/subscriptions/stats": { "get": { "tags": [ "MCP Admin - Subscriptions" ], "summary": "Get Subscription Stats", "description": "Get MCP subscription statistics.", "operationId": "get_subscription_stats_v1_admin_mcp_subscriptions_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPSubscriptionStatsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/servers": { "get": { "tags": [ "MCP Admin - Servers" ], "summary": "List All Servers", "description": "List all MCP servers (admin view).\n\nShows all servers regardless of visibility configuration.", "operationId": "list_all_servers_v1_admin_mcp_servers_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/MCPServerCategoryEnum" }, { "type": "null" } ], "title": "Category" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/MCPServerStatusEnum" }, { "type": "null" } ], "title": "Status" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "MCP Admin - Servers" ], "summary": "Create Server", "description": "Create a new MCP server.\n\nCPI admins can create servers of any category.\nTenant admins can only create tenant-specific servers.", "operationId": "create_server_v1_admin_mcp_servers_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/servers/{server_id}/tools": { "post": { "tags": [ "MCP Admin - Servers" ], "summary": "Add Tool To Server", "description": "Add a tool to an MCP server.", "operationId": "add_tool_to_server_v1_admin_mcp_servers__server_id__tools_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Server Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerToolCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerToolResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/servers/{server_id}/status": { "patch": { "tags": [ "MCP Admin - Servers" ], "summary": "Update Server Status", "description": "Update MCP server status.", "operationId": "update_server_status_v1_admin_mcp_servers__server_id__status_patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Server Id" } }, { "name": "status", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/MCPServerStatusEnum" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/mcp/servers/{server_id}": { "delete": { "tags": [ "MCP Admin - Servers" ], "summary": "Delete Server", "description": "Delete an MCP server.\n\nThis will also delete all associated subscriptions.", "operationId": "delete_server_v1_admin_mcp_servers__server_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Server Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/portal/apis": { "get": { "tags": [ "Portal" ], "summary": "List Portal Apis", "description": "List all promoted APIs available in the Portal catalog.\n\nSource: GitLab (source of truth for API definitions)\n\nBy default, only returns APIs with the 'portal:published' or 'promoted:portal' tag.\nSet include_unpromoted=true to see all APIs (for admin/debugging).\n\nReturns APIs from all tenants the user has access to.", "operationId": "list_portal_apis_v1_portal_apis_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "include_unpromoted", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include APIs not promoted to Portal", "default": false, "title": "Include Unpromoted" }, "description": "Include APIs not promoted to Portal" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalAPIsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/portal/apis/{api_id}": { "get": { "tags": [ "Portal" ], "summary": "Get Portal Api", "description": "Get a single API by ID.\n\nNote: api_id format is \"{tenant_id}/{api_name}\" or just \"{api_name}\"", "operationId": "get_portal_api_v1_portal_apis__api_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "api_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalAPIResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/portal/mcp-servers": { "get": { "tags": [ "Portal" ], "summary": "List Portal Mcp Servers", "description": "List all MCP servers available in the Portal catalog.\n\nSource: PostgreSQL (synced from GitLab via GitOps)\n\nReturns only active servers that the user can see based on visibility rules.", "operationId": "list_portal_mcp_servers_v1_portal_mcp_servers_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalMCPServersResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/portal/api-categories": { "get": { "tags": [ "Portal" ], "summary": "Get Api Categories", "description": "Get list of available API categories.", "operationId": "get_api_categories_v1_portal_api_categories_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response Get Api Categories V1 Portal Api Categories Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/portal/api-tags": { "get": { "tags": [ "Portal" ], "summary": "Get Api Tags", "description": "Get list of available API tags.", "operationId": "get_api_tags_v1_portal_api_tags_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response Get Api Tags V1 Portal Api Tags Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/portal/mcp-categories": { "get": { "tags": [ "Portal" ], "summary": "Get Mcp Categories", "description": "Get list of MCP server categories.", "operationId": "get_mcp_categories_v1_portal_mcp_categories_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response Get Mcp Categories V1 Portal Mcp Categories Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/gitops/sync": { "post": { "tags": [ "MCP GitOps" ], "summary": "Trigger Full Sync", "description": "Trigger a full sync of all MCP servers from GitLab.\n\nThis will:\n1. Read all MCP server definitions from GitLab\n2. Create/update servers in the database\n3. Mark servers not in GitLab as orphans\n\nRequires: cpi-admin role", "operationId": "trigger_full_sync_v1_mcp_gitops_sync_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/gitops/sync/tenant/{tenant_id}": { "post": { "tags": [ "MCP GitOps" ], "summary": "Trigger Tenant Sync", "description": "Trigger sync of all MCP servers for a specific tenant.\n\nUse tenant_id=\"_platform\" for platform-level servers.\n\nRequires: cpi-admin role", "operationId": "trigger_tenant_sync_v1_mcp_gitops_sync_tenant__tenant_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/gitops/sync/server/{tenant_id}/{server_name}": { "post": { "tags": [ "MCP GitOps" ], "summary": "Trigger Server Sync", "description": "Trigger sync of a specific MCP server.\n\nRequires: cpi-admin role", "operationId": "trigger_server_sync_v1_mcp_gitops_sync_server__tenant_id___server_name__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Tenant Id" } }, { "name": "server_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Server Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/gitops/status": { "get": { "tags": [ "MCP GitOps" ], "summary": "Get Sync Status", "description": "Get current GitOps sync status.\n\nShows:\n- Total servers in database\n- Count by sync status (synced, pending, error, orphan)\n- Last sync timestamp\n- Any sync errors\n\nRequires: cpi-admin role", "operationId": "get_sync_status_v1_mcp_gitops_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncStatusResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/gitops/gitlab/health": { "get": { "tags": [ "MCP GitOps" ], "summary": "Get Gitlab Health", "description": "Check GitLab connection health.\n\nRequires: cpi-admin role", "operationId": "get_gitlab_health_v1_mcp_gitops_gitlab_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/gitops/gitlab/servers": { "get": { "tags": [ "MCP GitOps" ], "summary": "List Gitlab Servers", "description": "List all MCP servers defined in GitLab (before sync to DB).\n\nUseful for debugging and verifying GitLab content.\n\nRequires: cpi-admin role", "operationId": "list_gitlab_servers_v1_mcp_gitops_gitlab_servers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/tools": { "get": { "tags": [ "MCP Tools" ], "summary": "List Tools", "description": "List all available MCP tools.\n\nProxies to MCP Gateway with user context for role-based filtering.", "operationId": "list_tools_v1_mcp_tools_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tag", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by tag", "title": "Tag" }, "description": "Filter by tag" }, { "name": "tags", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by tags (comma-separated)", "title": "Tags" }, "description": "Filter by tags (comma-separated)" }, { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by category", "title": "Category" }, "description": "Filter by category" }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search in name and description", "title": "Search" }, "description": "Search in name and description" }, { "name": "tenant_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by tenant", "title": "Tenant Id" }, "description": "Filter by tenant" }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Pagination cursor", "title": "Cursor" }, "description": "Pagination cursor" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Items per page", "default": 20, "title": "Limit" }, "description": "Items per page" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListToolsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/tools/tags": { "get": { "tags": [ "MCP Tools" ], "summary": "Get Tool Tags", "description": "Get all available tool tags with counts.\n\nProxies to MCP Gateway.", "operationId": "get_tool_tags_v1_mcp_tools_tags_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListTagsResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/tools/categories": { "get": { "tags": [ "MCP Tools" ], "summary": "Get Tool Categories", "description": "Get all available tool categories with counts.\n\nProxies to MCP Gateway.", "operationId": "get_tool_categories_v1_mcp_tools_categories_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCategoriesResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/tools/{tool_name}": { "get": { "tags": [ "MCP Tools" ], "summary": "Get Tool", "description": "Get details of a specific tool.\n\nProxies to MCP Gateway.", "operationId": "get_tool_v1_mcp_tools__tool_name__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPToolResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/tools/{tool_name}/schema": { "get": { "tags": [ "MCP Tools" ], "summary": "Get Tool Schema", "description": "Get the input schema for a tool.\n\nProxies to MCP Gateway.", "operationId": "get_tool_schema_v1_mcp_tools__tool_name__schema_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/tools/{tool_name}/invoke": { "post": { "tags": [ "MCP Tools" ], "summary": "Invoke Tool", "description": "Invoke a tool with the provided arguments.\n\nProxies to MCP Gateway with user context.", "operationId": "invoke_tool_v1_mcp_tools__tool_name__invoke_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInvokeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInvokeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/monitoring/transactions": { "get": { "tags": [ "Monitoring" ], "summary": "List Transactions", "description": "List recent API transactions.\n\nReturns transaction summaries for efficient list display.", "operationId": "list_transactions_v1_monitoring_transactions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "tenant_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Id" } }, { "name": "api_name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Name" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/monitoring/transactions/stats": { "get": { "tags": [ "Monitoring" ], "summary": "Get Transaction Stats", "description": "Get API transaction statistics.\n\nReturns aggregated metrics about API calls.", "operationId": "get_transaction_stats_v1_monitoring_transactions_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/monitoring/transactions/{transaction_id}": { "get": { "tags": [ "Monitoring" ], "summary": "Get Transaction", "description": "Get detailed information about a specific transaction.\n\nIncludes all spans with timing and metadata.", "operationId": "get_transaction_v1_monitoring_transactions__transaction_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "transaction_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Transaction Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/platform/status": { "get": { "tags": [ "Platform" ], "summary": "Get Platform Status", "description": "Get current platform status including GitOps sync state and recent events.\n\nReturns:\n - GitOps sync status for all platform components\n - Recent deployment events\n\nRequired Role: Any authenticated user (cpi-admin sees all details)", "operationId": "get_platform_status_v1_platform_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformStatusResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/platform/components": { "get": { "tags": [ "Platform" ], "summary": "List Platform Components", "description": "List all platform components and their status.\n\nReturns a list of all monitored Argo CD applications.", "operationId": "list_platform_components_v1_platform_components_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ComponentStatus" }, "type": "array", "title": "Response List Platform Components V1 Platform Components Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/platform/components/{name}": { "get": { "tags": [ "Platform" ], "summary": "Get Component Status", "description": "Get detailed status for a specific platform component.\n\nArgs:\n name: Component/application name", "operationId": "get_component_status_v1_platform_components__name__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComponentStatus" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/platform/components/{name}/sync": { "post": { "tags": [ "Platform" ], "summary": "Sync Component", "description": "Trigger a sync for a platform component.\n\nRequires cpi-admin or devops role.\n\nArgs:\n name: Component/application name", "operationId": "sync_component_v1_platform_components__name__sync_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/platform/events": { "get": { "tags": [ "Platform" ], "summary": "List Platform Events", "description": "List recent platform events.\n\nArgs:\n component: Optional filter by component name\n limit: Maximum number of events to return", "operationId": "list_platform_events_v1_platform_events_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "component", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by component name", "title": "Component" }, "description": "Filter by component name" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum events to return", "default": 20, "title": "Limit" }, "description": "Maximum events to return" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformEvent" }, "title": "Response List Platform Events V1 Platform Events Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/platform/components/{name}/diff": { "get": { "tags": [ "Platform" ], "summary": "Get Component Diff", "description": "Get diff for an OutOfSync component.\n\nReturns the differences between the desired state (Git) and\nthe live state (Kubernetes cluster).\n\nArgs:\n name: Component/application name", "operationId": "get_component_diff_v1_platform_components__name__diff_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationDiffResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/": { "get": { "summary": "Root", "operationId": "root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "APICreate": { "properties": { "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "version": { "type": "string", "title": "Version", "default": "1.0.0" }, "description": { "type": "string", "title": "Description", "default": "" }, "backend_url": { "type": "string", "title": "Backend Url" }, "openapi_spec": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Openapi Spec" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "default": [] } }, "type": "object", "required": [ "name", "display_name", "backend_url" ], "title": "APICreate" }, "APIKeyResponse": { "properties": { "subscription_id": { "type": "string", "format": "uuid", "title": "Subscription Id" }, "api_key": { "type": "string", "title": "Api Key", "description": "Full API key - shown only once!" }, "api_key_prefix": { "type": "string", "title": "Api Key Prefix", "description": "Key prefix for reference" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" } }, "type": "object", "required": [ "subscription_id", "api_key", "api_key_prefix", "expires_at" ], "title": "APIKeyResponse", "description": "Schema for API key response (only shown once at creation)", "example": { "api_key": "stoa_sk_abcd1234efgh5678ijkl9012mnop3456", "api_key_prefix": "stoa_sk_", "expires_at": "2025-12-31T23:59:59Z", "subscription_id": "550e8400-e29b-41d4-a716-446655440000" } }, "APIResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "version": { "type": "string", "title": "Version" }, "description": { "type": "string", "title": "Description" }, "backend_url": { "type": "string", "title": "Backend Url" }, "status": { "type": "string", "title": "Status", "default": "draft" }, "deployed_dev": { "type": "boolean", "title": "Deployed Dev", "default": false }, "deployed_staging": { "type": "boolean", "title": "Deployed Staging", "default": false }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "default": [] }, "portal_promoted": { "type": "boolean", "title": "Portal Promoted", "default": false } }, "type": "object", "required": [ "id", "tenant_id", "name", "display_name", "version", "description", "backend_url" ], "title": "APIResponse" }, "APIUpdate": { "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "backend_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Backend Url" }, "openapi_spec": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Openapi Spec" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "title": "APIUpdate" }, "ActiveSubscription": { "properties": { "id": { "type": "string", "title": "Id", "description": "Subscription identifier" }, "tool_id": { "type": "string", "title": "Tool Id", "description": "Tool identifier" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "Tool display name" }, "tool_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Description", "description": "Tool description" }, "status": { "type": "string", "title": "Status", "description": "Subscription status (active, suspended, expired)" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "When subscription was created" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At", "description": "When tool was last used" }, "call_count_total": { "type": "integer", "minimum": 0.0, "title": "Call Count Total", "description": "Total calls made via this subscription", "default": 0 } }, "type": "object", "required": [ "id", "tool_id", "tool_name", "status", "created_at" ], "title": "ActiveSubscription", "description": "An active tool subscription", "example": { "call_count_total": 1250, "created_at": "2025-12-12T10:00:00Z", "id": "sub-001", "last_used_at": "2026-01-12T10:15:00Z", "status": "active", "tool_description": "Search and retrieve customer information from CRM", "tool_id": "crm-search", "tool_name": "CRM Customer Search" } }, "ActivityType": { "type": "string", "enum": [ "subscription.created", "subscription.approved", "subscription.revoked", "api.call", "key.rotated" ], "title": "ActivityType", "description": "Type of activity for the dashboard" }, "ApplicationCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description", "default": "" }, "redirect_uris": { "items": { "type": "string" }, "type": "array", "title": "Redirect Uris", "default": [] }, "api_subscriptions": { "items": { "type": "string" }, "type": "array", "title": "Api Subscriptions", "default": [] } }, "type": "object", "required": [ "name", "display_name" ], "title": "ApplicationCreate" }, "ApplicationCredentials": { "properties": { "client_id": { "type": "string", "title": "Client Id" }, "client_secret": { "type": "string", "title": "Client Secret" } }, "type": "object", "required": [ "client_id", "client_secret" ], "title": "ApplicationCredentials" }, "ApplicationDiffResponse": { "properties": { "application": { "type": "string", "title": "Application" }, "total_resources": { "type": "integer", "title": "Total Resources" }, "diff_count": { "type": "integer", "title": "Diff Count" }, "resources": { "items": { "$ref": "#/components/schemas/DiffResource" }, "type": "array", "title": "Resources" } }, "type": "object", "required": [ "application", "total_resources", "diff_count", "resources" ], "title": "ApplicationDiffResponse", "description": "Diff response for an application." }, "ApplicationResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description" }, "client_id": { "type": "string", "title": "Client Id" }, "status": { "type": "string", "title": "Status", "default": "pending" }, "api_subscriptions": { "items": { "type": "string" }, "type": "array", "title": "Api Subscriptions", "default": [] }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" } }, "type": "object", "required": [ "id", "tenant_id", "name", "display_name", "description", "client_id", "created_at", "updated_at" ], "title": "ApplicationResponse" }, "BackendState": { "properties": { "health": { "type": "string", "title": "Health", "default": "unknown" }, "last_success": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Success" }, "error_rate_1m": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Error Rate 1M" }, "p99_latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "P99 Latency Ms" } }, "type": "object", "title": "BackendState", "description": "Backend service state at time of error." }, "BindingsListResponse": { "properties": { "contract_id": { "type": "string", "format": "uuid", "title": "Contract Id" }, "contract_name": { "type": "string", "title": "Contract Name" }, "bindings": { "items": { "$ref": "#/components/schemas/ProtocolBindingResponse" }, "type": "array", "title": "Bindings" } }, "type": "object", "required": [ "contract_id", "contract_name", "bindings" ], "title": "BindingsListResponse", "description": "List of protocol bindings for a contract.", "example": { "bindings": [ { "enabled": true, "endpoint": "/api/v1/payments", "protocol": "rest" }, { "enabled": true, "protocol": "mcp", "tool_name": "create_payment" }, { "enabled": false, "protocol": "graphql" }, { "enabled": false, "protocol": "grpc" }, { "enabled": false, "protocol": "kafka" } ], "contract_id": "550e8400-e29b-41d4-a716-446655440000", "contract_name": "payment-service" } }, "Body_upload_certificate_v1_certificates_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_certificate_v1_certificates_upload_post" }, "CallStatus": { "type": "string", "enum": [ "success", "error", "timeout" ], "title": "CallStatus", "description": "Status of an MCP tool call" }, "CertificateInfo": { "properties": { "subject": { "type": "string", "title": "Subject", "description": "Certificate subject (CN, O, etc.)" }, "issuer": { "type": "string", "title": "Issuer", "description": "Certificate issuer" }, "valid_from": { "type": "string", "format": "date-time", "title": "Valid From", "description": "Certificate validity start date" }, "valid_to": { "type": "string", "format": "date-time", "title": "Valid To", "description": "Certificate validity end date" }, "days_until_expiry": { "type": "integer", "title": "Days Until Expiry", "description": "Days until certificate expires" }, "is_valid": { "type": "boolean", "title": "Is Valid", "description": "Whether the certificate is currently valid" }, "is_expired": { "type": "boolean", "title": "Is Expired", "description": "Whether the certificate has expired" }, "expires_soon": { "type": "boolean", "title": "Expires Soon", "description": "Warning: expires within 30 days" }, "serial_number": { "type": "string", "title": "Serial Number", "description": "Certificate serial number" }, "fingerprint_sha256": { "type": "string", "title": "Fingerprint Sha256", "description": "SHA-256 fingerprint" }, "key_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Key Size", "description": "Public key size in bits" }, "signature_algorithm": { "type": "string", "title": "Signature Algorithm", "description": "Signature algorithm" }, "san": { "items": { "type": "string" }, "type": "array", "title": "San", "description": "Subject Alternative Names" } }, "type": "object", "required": [ "subject", "issuer", "valid_from", "valid_to", "days_until_expiry", "is_valid", "is_expired", "expires_soon", "serial_number", "fingerprint_sha256", "signature_algorithm" ], "title": "CertificateInfo", "description": "Certificate information response model." }, "CertificateValidationRequest": { "properties": { "pem_data": { "type": "string", "title": "Pem Data", "description": "PEM-encoded certificate data" } }, "type": "object", "required": [ "pem_data" ], "title": "CertificateValidationRequest", "description": "Request model for certificate validation." }, "CertificateValidationResponse": { "properties": { "valid": { "type": "boolean", "title": "Valid", "description": "Whether the certificate is valid for use" }, "certificate": { "anyOf": [ { "$ref": "#/components/schemas/CertificateInfo" }, { "type": "null" } ], "description": "Certificate details if parsed" }, "errors": { "items": { "type": "string" }, "type": "array", "title": "Errors", "description": "Validation errors" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "description": "Validation warnings" } }, "type": "object", "required": [ "valid" ], "title": "CertificateValidationResponse", "description": "Response model for certificate validation." }, "CommitInfo": { "properties": { "sha": { "type": "string", "title": "Sha" }, "message": { "type": "string", "title": "Message" }, "author": { "type": "string", "title": "Author" }, "date": { "type": "string", "title": "Date" } }, "type": "object", "required": [ "sha", "message", "author", "date" ], "title": "CommitInfo" }, "ComponentStatus": { "properties": { "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "sync_status": { "type": "string", "title": "Sync Status" }, "health_status": { "type": "string", "title": "Health Status" }, "revision": { "type": "string", "title": "Revision" }, "last_sync": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Sync" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" } }, "type": "object", "required": [ "name", "display_name", "sync_status", "health_status", "revision" ], "title": "ComponentStatus", "description": "Status of a single platform component." }, "ContractCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name", "description": "Unique contract name" }, "display_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Display Name", "description": "Human-friendly name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "Contract description" }, "version": { "type": "string", "maxLength": 50, "title": "Version", "description": "Contract version", "default": "1.0.0" }, "openapi_spec_url": { "anyOf": [ { "type": "string", "maxLength": 512 }, { "type": "null" } ], "title": "Openapi Spec Url", "description": "URL to OpenAPI spec" } }, "type": "object", "required": [ "name" ], "title": "ContractCreate", "description": "Request to create a new contract.", "example": { "description": "API for processing payments", "display_name": "Payment Service API", "name": "payment-service", "openapi_spec_url": "https://specs.example.com/payment-service/openapi.yaml", "version": "2.0.0" } }, "ContractListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ContractResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "ContractListResponse", "description": "Paginated list of contracts." }, "ContractResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "version": { "type": "string", "title": "Version" }, "status": { "type": "string", "title": "Status" }, "openapi_spec_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Openapi Spec Url" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "bindings": { "items": { "$ref": "#/components/schemas/ProtocolBindingResponse" }, "type": "array", "title": "Bindings", "default": [] } }, "type": "object", "required": [ "id", "tenant_id", "name", "version", "status", "created_at", "updated_at" ], "title": "ContractResponse", "description": "Contract information response.", "example": { "bindings": [], "created_at": "2024-01-10T08:00:00Z", "description": "API for processing payments", "display_name": "Payment Service API", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "payment-service", "status": "published", "tenant_id": "acme-corp", "updated_at": "2024-01-15T10:30:00Z", "version": "2.0.0" } }, "ContractStatus": { "type": "string", "enum": [ "draft", "published", "deprecated" ], "title": "ContractStatus", "description": "Contract lifecycle status." }, "ContractUpdate": { "properties": { "display_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Display Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "version": { "anyOf": [ { "type": "string", "maxLength": 50 }, { "type": "null" } ], "title": "Version" }, "status": { "anyOf": [ { "$ref": "#/components/schemas/ContractStatus" }, { "type": "null" } ] }, "openapi_spec_url": { "anyOf": [ { "type": "string", "maxLength": 512 }, { "type": "null" } ], "title": "Openapi Spec Url" } }, "type": "object", "title": "ContractUpdate", "description": "Request to update a contract." }, "DailyCallStat": { "properties": { "date": { "type": "string", "title": "Date", "description": "Date in YYYY-MM-DD format" }, "calls": { "type": "integer", "minimum": 0.0, "title": "Calls", "description": "Number of calls on this date" } }, "type": "object", "required": [ "date", "calls" ], "title": "DailyCallStat", "description": "Daily call count for charts" }, "DashboardActivityResponse": { "properties": { "activity": { "items": { "$ref": "#/components/schemas/RecentActivityItem" }, "type": "array", "title": "Activity", "description": "List of recent activities" } }, "type": "object", "required": [ "activity" ], "title": "DashboardActivityResponse", "description": "Response for dashboard activity endpoint" }, "DashboardStats": { "properties": { "tools_available": { "type": "integer", "minimum": 0.0, "title": "Tools Available", "description": "Number of tools available" }, "active_subscriptions": { "type": "integer", "minimum": 0.0, "title": "Active Subscriptions", "description": "Number of active subscriptions" }, "api_calls_this_week": { "type": "integer", "minimum": 0.0, "title": "Api Calls This Week", "description": "API calls this week" }, "tools_trend": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Tools Trend", "description": "Tools trend percentage" }, "subscriptions_trend": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Subscriptions Trend", "description": "Subscriptions trend percentage" }, "calls_trend": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Calls Trend", "description": "Calls trend percentage" } }, "type": "object", "required": [ "tools_available", "active_subscriptions", "api_calls_this_week" ], "title": "DashboardStats", "description": "Dashboard statistics for home page", "example": { "active_subscriptions": 4, "api_calls_this_week": 842, "calls_trend": 12.3, "subscriptions_trend": 25.0, "tools_available": 12, "tools_trend": 8.5 } }, "DeploymentRequest": { "properties": { "api_id": { "type": "string", "title": "Api Id" }, "environment": { "$ref": "#/components/schemas/Environment" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version" } }, "type": "object", "required": [ "api_id", "environment" ], "title": "DeploymentRequest" }, "DeploymentResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "api_id": { "type": "string", "title": "Api Id" }, "api_name": { "type": "string", "title": "Api Name" }, "environment": { "$ref": "#/components/schemas/Environment" }, "version": { "type": "string", "title": "Version" }, "status": { "$ref": "#/components/schemas/DeploymentStatus" }, "started_at": { "type": "string", "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Completed At" }, "deployed_by": { "type": "string", "title": "Deployed By" }, "awx_job_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Awx Job Id" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" } }, "type": "object", "required": [ "id", "tenant_id", "api_id", "api_name", "environment", "version", "status", "started_at", "deployed_by" ], "title": "DeploymentResponse" }, "DeploymentResult": { "properties": { "api_name": { "type": "string", "title": "Api Name" }, "api_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Version", "default": "1.0" }, "api_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Id" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "status": { "type": "string", "title": "Status" }, "action": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Action" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "api_name", "tenant_id", "status" ], "title": "DeploymentResult", "description": "Deployment result from AWX playbook" }, "DeploymentStatus": { "type": "string", "enum": [ "pending", "in_progress", "success", "failed", "rolled_back" ], "title": "DeploymentStatus" }, "DiffResource": { "properties": { "name": { "type": "string", "title": "Name" }, "namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Namespace" }, "kind": { "type": "string", "title": "Kind" }, "group": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Group" }, "status": { "type": "string", "title": "Status" }, "health": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Health" }, "diff": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Diff" } }, "type": "object", "required": [ "name", "kind", "status" ], "title": "DiffResource", "description": "Resource diff for OutOfSync applications." }, "DisableBindingResponse": { "properties": { "protocol": { "$ref": "#/components/schemas/ProtocolType" }, "status": { "type": "string", "title": "Status", "default": "disabled" }, "disabled_at": { "type": "string", "format": "date-time", "title": "Disabled At" } }, "type": "object", "required": [ "protocol", "disabled_at" ], "title": "DisableBindingResponse", "description": "Response after disabling a protocol binding." }, "EnableBindingRequest": { "properties": { "protocol": { "allOf": [ { "$ref": "#/components/schemas/ProtocolType" } ], "description": "Protocol to enable" } }, "type": "object", "required": [ "protocol" ], "title": "EnableBindingRequest", "description": "Request to enable a protocol binding.", "example": { "protocol": "graphql" } }, "EnableBindingResponse": { "properties": { "protocol": { "$ref": "#/components/schemas/ProtocolType" }, "endpoint": { "type": "string", "title": "Endpoint" }, "playground_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Playground Url" }, "tool_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Name" }, "status": { "type": "string", "title": "Status", "default": "active" }, "generated_at": { "type": "string", "format": "date-time", "title": "Generated At" } }, "type": "object", "required": [ "protocol", "endpoint", "generated_at" ], "title": "EnableBindingResponse", "description": "Response after enabling a protocol binding.", "example": { "endpoint": "https://api.stoa.example.com/graphql", "generated_at": "2024-01-15T10:30:00Z", "playground_url": "https://api.stoa.example.com/graphql/playground", "protocol": "graphql", "status": "active" } }, "Environment": { "type": "string", "enum": [ "dev", "staging" ], "title": "Environment" }, "EnvironmentInfo": { "properties": { "pod": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pod" }, "node": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node" }, "namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Namespace" }, "memory_percent": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Memory Percent" }, "cpu_percent": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Cpu Percent" } }, "type": "object", "title": "EnvironmentInfo", "description": "Kubernetes/runtime environment info." }, "ErrorSnapshot": { "properties": { "id": { "type": "string", "title": "Id" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "trigger": { "allOf": [ { "$ref": "#/components/schemas/SnapshotTrigger" } ], "default": "5xx" }, "request": { "$ref": "#/components/schemas/RequestSnapshot" }, "response": { "$ref": "#/components/schemas/ResponseSnapshot" }, "routing": { "$ref": "#/components/schemas/RoutingInfo" }, "policies_applied": { "items": { "$ref": "#/components/schemas/PolicyResult" }, "type": "array", "title": "Policies Applied" }, "backend_state": { "$ref": "#/components/schemas/BackendState" }, "logs": { "items": { "$ref": "#/components/schemas/LogEntry" }, "type": "array", "title": "Logs" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "span_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Span Id" }, "environment": { "$ref": "#/components/schemas/EnvironmentInfo" }, "masked_fields": { "items": { "type": "string" }, "type": "array", "title": "Masked Fields" }, "source": { "type": "string", "title": "Source", "default": "control-plane" } }, "type": "object", "required": [ "tenant_id", "request", "response" ], "title": "ErrorSnapshot", "description": "Complete error snapshot for time-travel debugging.\n\nCaptures the full context of an error including:\n- Request/response data (with PII masked)\n- Routing and policy information\n- Backend state and health\n- Related log entries\n- Environment information", "example": { "id": "SNP-20260115-094512-a1b2c3d4", "request": { "body": { "amount": 100 }, "client_ip": "192.168.1.100", "headers": { "Content-Type": "application/json" }, "method": "POST", "path": "/api/v1/payments" }, "response": { "body": { "error": "upstream_timeout" }, "duration_ms": 30042, "status": 502 }, "tenant_id": "tenant-acme", "timestamp": "2026-01-15T09:45:12.345Z", "trigger": "5xx" } }, "EventTypeInfo": { "properties": { "event": { "type": "string", "title": "Event" }, "description": { "type": "string", "title": "Description" }, "payload_example": { "type": "object", "title": "Payload Example" } }, "type": "object", "required": [ "event", "description", "payload_example" ], "title": "EventTypeInfo", "description": "Information about a webhook event type" }, "EventTypesResponse": { "properties": { "events": { "items": { "$ref": "#/components/schemas/EventTypeInfo" }, "type": "array", "title": "Events" } }, "type": "object", "required": [ "events" ], "title": "EventTypesResponse", "description": "Schema for listing available event types" }, "ExternalLinks": { "properties": { "argocd": { "type": "string", "title": "Argocd" }, "grafana": { "type": "string", "title": "Grafana" }, "prometheus": { "type": "string", "title": "Prometheus" }, "logs": { "type": "string", "title": "Logs" } }, "type": "object", "required": [ "argocd", "grafana", "prometheus", "logs" ], "title": "ExternalLinks", "description": "External tool URLs for quick access." }, "FacetsResponse": { "properties": { "categories": { "items": { "type": "object" }, "type": "array", "title": "Categories" }, "tags": { "items": { "type": "object" }, "type": "array", "title": "Tags" }, "visibility": { "items": { "type": "object" }, "type": "array", "title": "Visibility" } }, "type": "object", "required": [ "categories", "tags", "visibility" ], "title": "FacetsResponse", "description": "Facets response model." }, "FileContent": { "properties": { "path": { "type": "string", "title": "Path" }, "content": { "type": "string", "title": "Content" }, "encoding": { "type": "string", "title": "Encoding", "default": "text" } }, "type": "object", "required": [ "path", "content" ], "title": "FileContent" }, "GatewayAPIResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "apiName": { "type": "string", "title": "Apiname" }, "apiVersion": { "type": "string", "title": "Apiversion" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type" }, "isActive": { "type": "boolean", "title": "Isactive", "default": false }, "systemVersion": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Systemversion" } }, "type": "object", "required": [ "id", "apiName", "apiVersion" ], "title": "GatewayAPIResponse" }, "GatewayApplicationResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "contactEmails": { "items": { "type": "string" }, "type": "array", "title": "Contactemails", "default": [] } }, "type": "object", "required": [ "id", "name" ], "title": "GatewayApplicationResponse" }, "GatewayScopeResponse": { "properties": { "scopeName": { "type": "string", "title": "Scopename" }, "scopeDescription": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scopedescription" }, "audience": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audience" } }, "type": "object", "required": [ "scopeName" ], "title": "GatewayScopeResponse" }, "GitOpsStatus": { "properties": { "status": { "type": "string", "title": "Status" }, "components": { "items": { "$ref": "#/components/schemas/ComponentStatus" }, "type": "array", "title": "Components" }, "checked_at": { "type": "string", "title": "Checked At" } }, "type": "object", "required": [ "status", "components", "checked_at" ], "title": "GitOpsStatus", "description": "Overall GitOps sync status." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HealthCheck": { "properties": { "status": { "type": "string", "title": "Status" }, "version": { "type": "string", "title": "Version" }, "timestamp": { "type": "string", "title": "Timestamp" }, "checks": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Checks" } }, "type": "object", "required": [ "status", "version", "timestamp" ], "title": "HealthCheck", "description": "Health check response model." }, "ImportAPIRequest": { "properties": { "apiName": { "type": "string", "title": "Apiname" }, "apiVersion": { "type": "string", "title": "Apiversion" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url" }, "apiDefinition": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Apidefinition" }, "type": { "type": "string", "title": "Type", "default": "openapi" } }, "type": "object", "required": [ "apiName", "apiVersion" ], "title": "ImportAPIRequest", "description": "Request model for importing an API from OpenAPI spec.\n\nUses Gateway-native field names for compatibility with existing playbooks." }, "ImportAPIResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "api_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Id" }, "api_name": { "type": "string", "title": "Api Name" }, "api_version": { "type": "string", "title": "Api Version" }, "message": { "type": "string", "title": "Message", "default": "" } }, "type": "object", "required": [ "success", "api_name", "api_version" ], "title": "ImportAPIResponse", "description": "Response model for imported API." }, "KeyRotationRequest": { "properties": { "grace_period_hours": { "type": "integer", "maximum": 168.0, "minimum": 1.0, "title": "Grace Period Hours", "description": "Number of hours the old key remains valid (1-168)", "default": 24 } }, "type": "object", "title": "KeyRotationRequest", "description": "Schema for requesting API key rotation", "example": { "grace_period_hours": 24 } }, "KeyRotationResponse": { "properties": { "subscription_id": { "type": "string", "format": "uuid", "title": "Subscription Id" }, "new_api_key": { "type": "string", "title": "New Api Key", "description": "New API key - shown only once!" }, "new_api_key_prefix": { "type": "string", "title": "New Api Key Prefix", "description": "New key prefix for reference" }, "old_key_expires_at": { "type": "string", "format": "date-time", "title": "Old Key Expires At", "description": "When the old key becomes invalid" }, "grace_period_hours": { "type": "integer", "title": "Grace Period Hours", "description": "Grace period duration in hours" }, "rotation_count": { "type": "integer", "title": "Rotation Count", "description": "Total number of rotations for this subscription" } }, "type": "object", "required": [ "subscription_id", "new_api_key", "new_api_key_prefix", "old_key_expires_at", "grace_period_hours", "rotation_count" ], "title": "KeyRotationResponse", "description": "Schema for key rotation response", "example": { "grace_period_hours": 24, "new_api_key": "stoa_sk_newkey1234efgh5678ijkl9012mnop3456", "new_api_key_prefix": "stoa_sk_", "old_key_expires_at": "2026-01-10T16:00:00Z", "rotation_count": 1, "subscription_id": "550e8400-e29b-41d4-a716-446655440000" } }, "ListCategoriesResponse": { "properties": { "categories": { "items": { "type": "object" }, "type": "array", "title": "Categories" } }, "type": "object", "required": [ "categories" ], "title": "ListCategoriesResponse", "description": "List categories response." }, "ListTagsResponse": { "properties": { "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "tagCounts": { "anyOf": [ { "additionalProperties": { "type": "integer" }, "type": "object" }, { "type": "null" } ], "title": "Tagcounts" } }, "type": "object", "required": [ "tags" ], "title": "ListTagsResponse", "description": "List tags response." }, "ListToolsResponse": { "properties": { "tools": { "items": { "$ref": "#/components/schemas/MCPToolResponse" }, "type": "array", "title": "Tools" }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" }, "totalCount": { "type": "integer", "title": "Totalcount", "default": 0 } }, "type": "object", "required": [ "tools" ], "title": "ListToolsResponse", "description": "List tools response." }, "LogEntry": { "properties": { "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "level": { "type": "string", "title": "Level" }, "message": { "type": "string", "title": "Message" }, "extra": { "type": "object", "title": "Extra" } }, "type": "object", "required": [ "timestamp", "level", "message" ], "title": "LogEntry", "description": "Log entry captured around the error time." }, "MCPKeyRotationRequest": { "properties": { "grace_period_hours": { "type": "integer", "maximum": 168.0, "minimum": 1.0, "title": "Grace Period Hours", "description": "Number of hours the old key remains valid (1-168)", "default": 24 } }, "type": "object", "title": "MCPKeyRotationRequest", "description": "Schema for requesting API key rotation." }, "MCPKeyRotationResponse": { "properties": { "subscription_id": { "type": "string", "format": "uuid", "title": "Subscription Id" }, "new_api_key": { "type": "string", "title": "New Api Key", "description": "New API key - shown only once!" }, "new_api_key_prefix": { "type": "string", "title": "New Api Key Prefix" }, "old_key_expires_at": { "type": "string", "format": "date-time", "title": "Old Key Expires At" }, "grace_period_hours": { "type": "integer", "title": "Grace Period Hours" }, "rotation_count": { "type": "integer", "title": "Rotation Count" } }, "type": "object", "required": [ "subscription_id", "new_api_key", "new_api_key_prefix", "old_key_expires_at", "grace_period_hours", "rotation_count" ], "title": "MCPKeyRotationResponse", "description": "Schema for key rotation response." }, "MCPPendingApprovalResponse": { "properties": { "subscription": { "$ref": "#/components/schemas/MCPSubscriptionResponse" }, "server_name": { "type": "string", "title": "Server Name" }, "server_display_name": { "type": "string", "title": "Server Display Name" }, "requested_at": { "type": "string", "format": "date-time", "title": "Requested At" }, "subscriber_email": { "type": "string", "title": "Subscriber Email" } }, "type": "object", "required": [ "subscription", "server_name", "server_display_name", "requested_at", "subscriber_email" ], "title": "MCPPendingApprovalResponse", "description": "Response for pending approvals (admin view)." }, "MCPPendingApprovalsListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MCPPendingApprovalResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "MCPPendingApprovalsListResponse", "description": "Response for listing pending approvals." }, "MCPServerCategoryEnum": { "type": "string", "enum": [ "platform", "tenant", "public" ], "title": "MCPServerCategoryEnum", "description": "MCP Server category for API responses." }, "MCPServerCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "display_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Display Name" }, "description": { "type": "string", "minLength": 1, "title": "Description" }, "icon": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Icon" }, "category": { "allOf": [ { "$ref": "#/components/schemas/MCPServerCategoryEnum" } ], "default": "public" }, "tenant_id": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Tenant Id" }, "visibility": { "allOf": [ { "$ref": "#/components/schemas/MCPServerVisibility" } ], "default": { "public": true } }, "requires_approval": { "type": "boolean", "title": "Requires Approval", "default": false }, "auto_approve_roles": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Auto Approve Roles" }, "version": { "anyOf": [ { "type": "string", "maxLength": 50 }, { "type": "null" } ], "title": "Version" }, "documentation_url": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Documentation Url" } }, "type": "object", "required": [ "name", "display_name", "description" ], "title": "MCPServerCreate", "description": "Schema for creating a new MCP Server (admin only).", "example": { "category": "public", "description": "Get weather data from various sources", "display_name": "Weather API", "name": "weather-api", "requires_approval": false, "visibility": { "public": true } } }, "MCPServerListResponse": { "properties": { "servers": { "items": { "$ref": "#/components/schemas/MCPServerResponse" }, "type": "array", "title": "Servers" }, "total_count": { "type": "integer", "title": "Total Count" } }, "type": "object", "required": [ "servers", "total_count" ], "title": "MCPServerListResponse", "description": "Response for listing MCP servers." }, "MCPServerResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon" }, "category": { "$ref": "#/components/schemas/MCPServerCategoryEnum" }, "tenant_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Id" }, "visibility": { "$ref": "#/components/schemas/MCPServerVisibility" }, "requires_approval": { "type": "boolean", "title": "Requires Approval", "default": false }, "status": { "$ref": "#/components/schemas/MCPServerStatusEnum" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version" }, "documentation_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Documentation Url" }, "tools": { "items": { "$ref": "#/components/schemas/MCPServerToolResponse" }, "type": "array", "title": "Tools", "default": [] }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "name", "display_name", "description", "category", "visibility", "status", "created_at", "updated_at" ], "title": "MCPServerResponse", "description": "MCP Server response." }, "MCPServerStatusEnum": { "type": "string", "enum": [ "active", "maintenance", "deprecated" ], "title": "MCPServerStatusEnum", "description": "MCP Server status for API responses." }, "MCPServerToolCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "display_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Display Name" }, "description": { "type": "string", "minLength": 1, "title": "Description" }, "input_schema": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Input Schema" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "requires_approval": { "type": "boolean", "title": "Requires Approval", "default": false } }, "type": "object", "required": [ "name", "display_name", "description" ], "title": "MCPServerToolCreate", "description": "Schema for creating a tool within a server." }, "MCPServerToolResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description" }, "input_schema": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Input Schema" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "requires_approval": { "type": "boolean", "title": "Requires Approval", "default": false } }, "type": "object", "required": [ "id", "name", "display_name", "description" ], "title": "MCPServerToolResponse", "description": "Tool within an MCP Server." }, "MCPServerVisibility": { "properties": { "roles": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Roles", "description": "Required roles to see this server" }, "exclude_roles": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Exclude Roles", "description": "Roles that cannot see this server" }, "public": { "type": "boolean", "title": "Public", "description": "If true, visible to all authenticated users", "default": true } }, "type": "object", "title": "MCPServerVisibility", "description": "Visibility configuration for MCP Servers." }, "MCPSubscriptionApprove": { "properties": { "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At", "description": "Optional expiration date for the subscription" }, "approved_tools": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Approved Tools", "description": "Tool IDs to approve (None = approve all requested)" } }, "type": "object", "title": "MCPSubscriptionApprove", "description": "Schema for approving a subscription.", "example": { "expires_at": "2026-12-31T23:59:59Z" } }, "MCPSubscriptionCreate": { "properties": { "server_id": { "type": "string", "format": "uuid", "title": "Server Id" }, "plan": { "type": "string", "maxLength": 100, "title": "Plan", "default": "free" }, "requested_tools": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Requested Tools", "description": "Tool IDs to request access to (empty = all enabled tools)" } }, "type": "object", "required": [ "server_id" ], "title": "MCPSubscriptionCreate", "description": "Schema for creating a new MCP subscription.", "example": { "plan": "free", "requested_tools": [], "server_id": "550e8400-e29b-41d4-a716-446655440000" } }, "MCPSubscriptionListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MCPSubscriptionResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "total_pages": { "type": "integer", "title": "Total Pages" } }, "type": "object", "required": [ "items", "total", "page", "page_size", "total_pages" ], "title": "MCPSubscriptionListResponse", "description": "Response for listing subscriptions." }, "MCPSubscriptionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "server_id": { "type": "string", "format": "uuid", "title": "Server Id" }, "server": { "anyOf": [ { "$ref": "#/components/schemas/MCPServerResponse" }, { "type": "null" } ] }, "subscriber_id": { "type": "string", "title": "Subscriber Id" }, "subscriber_email": { "type": "string", "title": "Subscriber Email" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "plan": { "type": "string", "title": "Plan" }, "api_key_prefix": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key Prefix" }, "status": { "$ref": "#/components/schemas/MCPSubscriptionStatusEnum" }, "status_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Reason" }, "tool_access": { "items": { "$ref": "#/components/schemas/MCPToolAccessResponse" }, "type": "array", "title": "Tool Access", "default": [] }, "last_rotated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Rotated At" }, "rotation_count": { "type": "integer", "title": "Rotation Count", "default": 0 }, "has_active_grace_period": { "type": "boolean", "title": "Has Active Grace Period", "default": false }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "approved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Approved At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" }, "usage_count": { "type": "integer", "title": "Usage Count", "default": 0 } }, "type": "object", "required": [ "id", "server_id", "subscriber_id", "subscriber_email", "tenant_id", "plan", "status", "created_at", "updated_at" ], "title": "MCPSubscriptionResponse", "description": "MCP Server subscription response." }, "MCPSubscriptionRevoke": { "properties": { "reason": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Reason" } }, "type": "object", "required": [ "reason" ], "title": "MCPSubscriptionRevoke", "description": "Schema for revoking a subscription.", "example": { "reason": "Violation of terms of service" } }, "MCPSubscriptionStatsResponse": { "properties": { "total_servers": { "type": "integer", "title": "Total Servers" }, "total_subscriptions": { "type": "integer", "title": "Total Subscriptions" }, "by_status": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Status" }, "by_server": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Server" }, "recent_24h": { "type": "integer", "title": "Recent 24H" } }, "type": "object", "required": [ "total_servers", "total_subscriptions", "by_status", "by_server", "recent_24h" ], "title": "MCPSubscriptionStatsResponse", "description": "Statistics about MCP subscriptions." }, "MCPSubscriptionStatusEnum": { "type": "string", "enum": [ "pending", "active", "suspended", "revoked", "expired" ], "title": "MCPSubscriptionStatusEnum", "description": "MCP Subscription status for API responses." }, "MCPSubscriptionWithKeyResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "server_id": { "type": "string", "format": "uuid", "title": "Server Id" }, "server": { "anyOf": [ { "$ref": "#/components/schemas/MCPServerResponse" }, { "type": "null" } ] }, "subscriber_id": { "type": "string", "title": "Subscriber Id" }, "subscriber_email": { "type": "string", "title": "Subscriber Email" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "plan": { "type": "string", "title": "Plan" }, "api_key_prefix": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key Prefix" }, "status": { "$ref": "#/components/schemas/MCPSubscriptionStatusEnum" }, "status_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Reason" }, "tool_access": { "items": { "$ref": "#/components/schemas/MCPToolAccessResponse" }, "type": "array", "title": "Tool Access", "default": [] }, "last_rotated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Rotated At" }, "rotation_count": { "type": "integer", "title": "Rotation Count", "default": 0 }, "has_active_grace_period": { "type": "boolean", "title": "Has Active Grace Period", "default": false }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "approved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Approved At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" }, "usage_count": { "type": "integer", "title": "Usage Count", "default": 0 }, "api_key": { "type": "string", "title": "Api Key", "description": "Full API key - shown only once!" } }, "type": "object", "required": [ "id", "server_id", "subscriber_id", "subscriber_email", "tenant_id", "plan", "status", "created_at", "updated_at", "api_key" ], "title": "MCPSubscriptionWithKeyResponse", "description": "Subscription response with full API key (shown only on creation)." }, "MCPToolAccessResponse": { "properties": { "tool_id": { "type": "string", "format": "uuid", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "status": { "$ref": "#/components/schemas/MCPToolAccessStatusEnum" }, "granted_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Granted At" }, "granted_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Granted By" }, "usage_count": { "type": "integer", "title": "Usage Count", "default": 0 }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" } }, "type": "object", "required": [ "tool_id", "tool_name", "status" ], "title": "MCPToolAccessResponse", "description": "Per-tool access control within a subscription." }, "MCPToolAccessStatusEnum": { "type": "string", "enum": [ "enabled", "disabled", "pending_approval" ], "title": "MCPToolAccessStatusEnum", "description": "Tool access status for API responses." }, "MCPToolResponse": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "inputSchema": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Inputschema" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "tenant_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Id" }, "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" } }, "type": "object", "required": [ "name" ], "title": "MCPToolResponse", "description": "MCP Tool response." }, "MergeRequestCreate": { "properties": { "title": { "type": "string", "title": "Title" }, "description": { "type": "string", "title": "Description" }, "source_branch": { "type": "string", "title": "Source Branch" }, "target_branch": { "type": "string", "title": "Target Branch", "default": "main" } }, "type": "object", "required": [ "title", "description", "source_branch" ], "title": "MergeRequestCreate" }, "MergeRequestResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "iid": { "type": "integer", "title": "Iid" }, "title": { "type": "string", "title": "Title" }, "description": { "type": "string", "title": "Description" }, "state": { "type": "string", "title": "State" }, "source_branch": { "type": "string", "title": "Source Branch" }, "target_branch": { "type": "string", "title": "Target Branch" }, "web_url": { "type": "string", "title": "Web Url" }, "created_at": { "type": "string", "title": "Created At" }, "author": { "type": "string", "title": "Author" } }, "type": "object", "required": [ "id", "iid", "title", "description", "state", "source_branch", "target_branch", "web_url", "created_at", "author" ], "title": "MergeRequestResponse" }, "OIDCConfigRequest": { "properties": { "tenant_id": { "type": "string", "title": "Tenant Id" }, "api_name": { "type": "string", "title": "Api Name" }, "api_version": { "type": "string", "title": "Api Version" }, "api_id": { "type": "string", "title": "Api Id" }, "client_id": { "type": "string", "title": "Client Id" }, "audience": { "type": "string", "title": "Audience", "default": "control-plane-api" }, "auth_server_alias": { "type": "string", "title": "Auth Server Alias", "default": "KeycloakOIDC" } }, "type": "object", "required": [ "tenant_id", "api_name", "api_version", "api_id", "client_id" ], "title": "OIDCConfigRequest" }, "OIDCConfigResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "strategy": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Strategy" }, "application": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Application" }, "scopes": { "items": { "type": "object" }, "type": "array", "title": "Scopes", "default": [] }, "message": { "type": "string", "title": "Message", "default": "" } }, "type": "object", "required": [ "success" ], "title": "OIDCConfigResponse" }, "PlatformEvent": { "properties": { "id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Id" }, "component": { "type": "string", "title": "Component" }, "event_type": { "type": "string", "title": "Event Type" }, "status": { "type": "string", "title": "Status" }, "revision": { "type": "string", "title": "Revision" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "timestamp": { "type": "string", "title": "Timestamp" }, "actor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor" } }, "type": "object", "required": [ "component", "event_type", "status", "revision", "timestamp" ], "title": "PlatformEvent", "description": "Platform deployment event." }, "PlatformStatusResponse": { "properties": { "gitops": { "$ref": "#/components/schemas/GitOpsStatus" }, "events": { "items": { "$ref": "#/components/schemas/PlatformEvent" }, "type": "array", "title": "Events" }, "external_links": { "$ref": "#/components/schemas/ExternalLinks" }, "timestamp": { "type": "string", "title": "Timestamp" } }, "type": "object", "required": [ "gitops", "events", "external_links", "timestamp" ], "title": "PlatformStatusResponse", "description": "Complete platform status response." }, "PolicyResult": { "properties": { "name": { "type": "string", "title": "Name" }, "result": { "type": "string", "title": "Result" }, "duration_ms": { "type": "integer", "title": "Duration Ms", "default": 0 }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "name", "result" ], "title": "PolicyResult", "description": "Result of a policy evaluation." }, "PortalAPIResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "version": { "type": "string", "title": "Version" }, "description": { "type": "string", "title": "Description" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "tenant_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Name" }, "status": { "type": "string", "title": "Status" }, "backend_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Backend Url" }, "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "default": [] }, "deployments": { "type": "object", "title": "Deployments", "default": {} }, "is_promoted": { "type": "boolean", "title": "Is Promoted", "default": true }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "id", "name", "display_name", "version", "description", "tenant_id", "status" ], "title": "PortalAPIResponse", "description": "API response for Portal catalog." }, "PortalAPIsResponse": { "properties": { "apis": { "items": { "$ref": "#/components/schemas/PortalAPIResponse" }, "type": "array", "title": "Apis" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "apis", "total", "page", "page_size" ], "title": "PortalAPIsResponse", "description": "Paginated API list response." }, "PortalMCPServerResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon" }, "category": { "type": "string", "title": "Category" }, "tenant_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Id" }, "status": { "type": "string", "title": "Status" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version" }, "documentation_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Documentation Url" }, "requires_approval": { "type": "boolean", "title": "Requires Approval", "default": false }, "tools_count": { "type": "integer", "title": "Tools Count", "default": 0 }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" } }, "type": "object", "required": [ "id", "name", "display_name", "description", "category", "status" ], "title": "PortalMCPServerResponse", "description": "MCP Server response for Portal catalog." }, "PortalMCPServersResponse": { "properties": { "servers": { "items": { "$ref": "#/components/schemas/PortalMCPServerResponse" }, "type": "array", "title": "Servers" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "servers", "total", "page", "page_size" ], "title": "PortalMCPServersResponse", "description": "Paginated MCP servers list response." }, "ProtocolBindingResponse": { "properties": { "protocol": { "$ref": "#/components/schemas/ProtocolType" }, "enabled": { "type": "boolean", "title": "Enabled" }, "endpoint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Endpoint" }, "playground_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Playground Url" }, "tool_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Name" }, "operations": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Operations" }, "proto_file_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Proto File Url" }, "topic_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Topic Name" }, "traffic_24h": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Traffic 24H" }, "generated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Generated At" }, "generation_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Generation Error" } }, "type": "object", "required": [ "protocol", "enabled" ], "title": "ProtocolBindingResponse", "description": "Protocol binding information for a contract.", "example": { "enabled": true, "endpoint": "https://api.stoa.example.com/v1/payments", "generated_at": "2024-01-15T10:30:00Z", "playground_url": "https://api.stoa.example.com/docs", "protocol": "rest", "traffic_24h": 1250 } }, "ProtocolType": { "type": "string", "enum": [ "rest", "graphql", "grpc", "mcp", "kafka" ], "title": "ProtocolType", "description": "Supported protocol types for UAC bindings." }, "RecentActivityItem": { "properties": { "id": { "type": "string", "title": "Id", "description": "Activity identifier" }, "type": { "allOf": [ { "$ref": "#/components/schemas/ActivityType" } ], "description": "Type of activity" }, "title": { "type": "string", "title": "Title", "description": "Activity title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "Activity description" }, "tool_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id", "description": "Related tool ID" }, "tool_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Name", "description": "Related tool name" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "When the activity occurred" } }, "type": "object", "required": [ "id", "type", "title", "timestamp" ], "title": "RecentActivityItem", "description": "A recent activity item for the dashboard", "example": { "description": "New subscription created", "id": "act-001", "timestamp": "2026-01-12T10:00:00Z", "title": "Subscribed to CRM Search", "tool_id": "crm-search", "tool_name": "CRM Customer Search", "type": "subscription.created" } }, "ReplayResponse": { "properties": { "curl_command": { "type": "string", "title": "Curl Command" }, "warning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Warning" } }, "type": "object", "required": [ "curl_command" ], "title": "ReplayResponse", "description": "Response for replay endpoint." }, "RequestSnapshot": { "properties": { "method": { "type": "string", "title": "Method" }, "path": { "type": "string", "title": "Path" }, "headers": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Headers" }, "body": { "anyOf": [ {}, { "type": "null" } ], "title": "Body" }, "query_params": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Query Params" }, "client_ip": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Client Ip" }, "user_agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Agent" } }, "type": "object", "required": [ "method", "path" ], "title": "RequestSnapshot", "description": "Captured HTTP request data." }, "ResponseSnapshot": { "properties": { "status": { "type": "integer", "title": "Status" }, "headers": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Headers" }, "body": { "anyOf": [ {}, { "type": "null" } ], "title": "Body" }, "duration_ms": { "type": "integer", "title": "Duration Ms" } }, "type": "object", "required": [ "status", "duration_ms" ], "title": "ResponseSnapshot", "description": "Captured HTTP response data." }, "RollbackRequest": { "properties": { "target_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Version" } }, "type": "object", "title": "RollbackRequest" }, "RoutingInfo": { "properties": { "api_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Name" }, "api_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Version" }, "route": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Route" }, "backend_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Backend Url" } }, "type": "object", "title": "RoutingInfo", "description": "API routing information at time of error." }, "SearchResponse": { "properties": { "query": { "type": "string", "title": "Query" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "results": { "items": { "$ref": "#/components/schemas/ToolSearchResult" }, "type": "array", "title": "Results" }, "facets": { "type": "object", "title": "Facets" }, "took_ms": { "type": "number", "title": "Took Ms", "default": 0.0 } }, "type": "object", "required": [ "query", "total", "page", "page_size", "results" ], "title": "SearchResponse", "description": "Search response model." }, "ServiceAccountCreate": { "properties": { "name": { "type": "string", "maxLength": 50, "minLength": 1, "title": "Name", "description": "Name for the service account (e.g., 'claude-desktop', 'cursor-ide')" }, "description": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Description", "description": "Optional description" } }, "type": "object", "required": [ "name" ], "title": "ServiceAccountCreate", "description": "Request to create a new service account", "example": { "description": "Service account for Claude Desktop MCP access", "name": "claude-desktop" } }, "ServiceAccountCreated": { "properties": { "id": { "type": "string", "title": "Id" }, "client_id": { "type": "string", "title": "Client Id" }, "client_secret": { "type": "string", "title": "Client Secret", "description": "Client secret - shown only once! Store it securely." }, "name": { "type": "string", "title": "Name" }, "message": { "type": "string", "title": "Message", "default": "Service account created. Save the client_secret - it won't be shown again!" } }, "type": "object", "required": [ "id", "client_id", "client_secret", "name" ], "title": "ServiceAccountCreated", "description": "Response when creating a service account (includes secret ONCE)", "example": { "client_id": "sa-acme-john-claude-desktop", "client_secret": "very-secret-value", "id": "abc123", "message": "Service account created. Save the client_secret - it won't be shown again!", "name": "claude-desktop" } }, "ServiceAccountResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "client_id": { "type": "string", "title": "Client Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "id", "client_id", "name", "description", "enabled" ], "title": "ServiceAccountResponse", "description": "Service account information (without secret)" }, "ServiceAccountSecretRegenerated": { "properties": { "id": { "type": "string", "title": "Id" }, "client_id": { "type": "string", "title": "Client Id" }, "client_secret": { "type": "string", "title": "Client Secret", "description": "New client secret - shown only once! Store it securely." }, "message": { "type": "string", "title": "Message", "default": "Secret regenerated. Save the new client_secret - it won't be shown again!" } }, "type": "object", "required": [ "id", "client_id", "client_secret" ], "title": "ServiceAccountSecretRegenerated", "description": "Response when regenerating a service account secret" }, "SnapshotListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SnapshotSummary" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "SnapshotListResponse", "description": "Paginated list of snapshots." }, "SnapshotSummary": { "properties": { "id": { "type": "string", "title": "Id" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "trigger": { "$ref": "#/components/schemas/SnapshotTrigger" }, "status": { "type": "integer", "title": "Status" }, "method": { "type": "string", "title": "Method" }, "path": { "type": "string", "title": "Path" }, "duration_ms": { "type": "integer", "title": "Duration Ms" }, "source": { "type": "string", "title": "Source", "default": "control-plane" } }, "type": "object", "required": [ "id", "timestamp", "tenant_id", "trigger", "status", "method", "path", "duration_ms" ], "title": "SnapshotSummary", "description": "Lightweight snapshot summary for list views." }, "SnapshotTrigger": { "type": "string", "enum": [ "4xx", "5xx", "timeout", "manual" ], "title": "SnapshotTrigger", "description": "What triggered the snapshot capture." }, "SortOrder": { "type": "string", "enum": [ "relevance", "name_asc", "name_desc", "updated_desc", "popularity" ], "title": "SortOrder", "description": "Sort order options." }, "SubscriptionApprove": { "properties": { "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At", "description": "Optional expiration date for the subscription" } }, "type": "object", "title": "SubscriptionApprove", "description": "Schema for approving a subscription", "example": { "expires_at": "2025-12-31T23:59:59Z" } }, "SubscriptionCreate": { "properties": { "application_id": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Application Id" }, "application_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Application Name" }, "api_id": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Api Id" }, "api_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Api Name" }, "api_version": { "type": "string", "maxLength": 50, "minLength": 1, "title": "Api Version" }, "tenant_id": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Tenant Id" }, "plan_id": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Plan Id" }, "plan_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Plan Name", "default": "default" } }, "type": "object", "required": [ "application_id", "application_name", "api_id", "api_name", "api_version", "tenant_id" ], "title": "SubscriptionCreate", "description": "Schema for creating a new subscription request", "example": { "api_id": "api-456", "api_name": "Weather API", "api_version": "1.0", "application_id": "app-123", "application_name": "My App", "plan_id": "basic", "plan_name": "Basic Plan", "tenant_id": "acme" } }, "SubscriptionListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SubscriptionResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "total_pages": { "type": "integer", "title": "Total Pages" } }, "type": "object", "required": [ "items", "total", "page", "page_size", "total_pages" ], "title": "SubscriptionListResponse", "description": "Schema for paginated subscription list" }, "SubscriptionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "application_id": { "type": "string", "title": "Application Id" }, "application_name": { "type": "string", "title": "Application Name" }, "subscriber_id": { "type": "string", "title": "Subscriber Id" }, "subscriber_email": { "type": "string", "title": "Subscriber Email" }, "api_id": { "type": "string", "title": "Api Id" }, "api_name": { "type": "string", "title": "Api Name" }, "api_version": { "type": "string", "title": "Api Version" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "plan_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Plan Id" }, "plan_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Plan Name" }, "api_key_prefix": { "type": "string", "title": "Api Key Prefix" }, "status": { "$ref": "#/components/schemas/SubscriptionStatusEnum" }, "status_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Reason" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "approved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Approved At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "revoked_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Revoked At" }, "approved_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Approved By" }, "revoked_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revoked By" } }, "type": "object", "required": [ "id", "application_id", "application_name", "subscriber_id", "subscriber_email", "api_id", "api_name", "api_version", "tenant_id", "plan_id", "plan_name", "api_key_prefix", "status", "status_reason", "created_at", "updated_at", "approved_at", "expires_at", "revoked_at", "approved_by", "revoked_by" ], "title": "SubscriptionResponse", "description": "Schema for subscription response" }, "SubscriptionRevoke": { "properties": { "reason": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Reason" } }, "type": "object", "required": [ "reason" ], "title": "SubscriptionRevoke", "description": "Schema for revoking a subscription", "example": { "reason": "Violation of terms of service" } }, "SubscriptionStatusEnum": { "type": "string", "enum": [ "pending", "active", "suspended", "revoked", "expired" ], "title": "SubscriptionStatusEnum", "description": "Subscription status enum for API responses" }, "SubscriptionWithRotationInfo": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "application_id": { "type": "string", "title": "Application Id" }, "application_name": { "type": "string", "title": "Application Name" }, "subscriber_id": { "type": "string", "title": "Subscriber Id" }, "subscriber_email": { "type": "string", "title": "Subscriber Email" }, "api_id": { "type": "string", "title": "Api Id" }, "api_name": { "type": "string", "title": "Api Name" }, "api_version": { "type": "string", "title": "Api Version" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "plan_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Plan Id" }, "plan_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Plan Name" }, "api_key_prefix": { "type": "string", "title": "Api Key Prefix" }, "status": { "$ref": "#/components/schemas/SubscriptionStatusEnum" }, "status_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Reason" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "approved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Approved At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "revoked_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Revoked At" }, "approved_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Approved By" }, "revoked_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revoked By" }, "previous_key_expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Previous Key Expires At", "description": "If set, old key is still valid until this time" }, "last_rotated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Rotated At", "description": "When the key was last rotated" }, "rotation_count": { "type": "integer", "title": "Rotation Count", "description": "Number of times the key has been rotated", "default": 0 }, "has_active_grace_period": { "type": "boolean", "title": "Has Active Grace Period", "description": "True if old key is still valid during grace period", "default": false } }, "type": "object", "required": [ "id", "application_id", "application_name", "subscriber_id", "subscriber_email", "api_id", "api_name", "api_version", "tenant_id", "plan_id", "plan_name", "api_key_prefix", "status", "status_reason", "created_at", "updated_at", "approved_at", "expires_at", "revoked_at", "approved_by", "revoked_by" ], "title": "SubscriptionWithRotationInfo", "description": "Extended subscription response with rotation info" }, "SuggestResponse": { "properties": { "query": { "type": "string", "title": "Query" }, "suggestions": { "items": { "type": "object" }, "type": "array", "title": "Suggestions" }, "took_ms": { "type": "number", "title": "Took Ms", "default": 0.0 } }, "type": "object", "required": [ "query", "suggestions" ], "title": "SuggestResponse", "description": "Auto-complete suggestion response." }, "SyncResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "servers_synced": { "type": "integer", "title": "Servers Synced", "default": 0 }, "servers_created": { "type": "integer", "title": "Servers Created", "default": 0 }, "servers_updated": { "type": "integer", "title": "Servers Updated", "default": 0 }, "servers_orphaned": { "type": "integer", "title": "Servers Orphaned", "default": 0 }, "errors": { "items": {}, "type": "array", "title": "Errors", "default": [] } }, "type": "object", "required": [ "success", "message" ], "title": "SyncResponse", "description": "Response for sync operations." }, "SyncStatusResponse": { "properties": { "total_servers": { "type": "integer", "title": "Total Servers" }, "synced": { "type": "integer", "title": "Synced" }, "pending": { "type": "integer", "title": "Pending" }, "error": { "type": "integer", "title": "Error" }, "orphan": { "type": "integer", "title": "Orphan" }, "untracked": { "type": "integer", "title": "Untracked" }, "last_sync_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Sync At" }, "errors": { "items": {}, "type": "array", "title": "Errors", "default": [] } }, "type": "object", "required": [ "total_servers", "synced", "pending", "error", "orphan", "untracked" ], "title": "SyncStatusResponse", "description": "Response for sync status." }, "TenantCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description", "default": "" }, "owner_email": { "type": "string", "title": "Owner Email" } }, "type": "object", "required": [ "name", "display_name", "owner_email" ], "title": "TenantCreate" }, "TenantResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description", "default": "" }, "owner_email": { "type": "string", "title": "Owner Email", "default": "" }, "status": { "type": "string", "title": "Status", "default": "active" }, "api_count": { "type": "integer", "title": "Api Count", "default": 0 }, "application_count": { "type": "integer", "title": "Application Count", "default": 0 }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At" } }, "type": "object", "required": [ "id", "name", "display_name" ], "title": "TenantResponse" }, "TenantUpdate": { "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "owner_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Email" } }, "type": "object", "title": "TenantUpdate" }, "ToolInvokeRequest": { "properties": { "arguments": { "type": "object", "title": "Arguments" } }, "type": "object", "required": [ "arguments" ], "title": "ToolInvokeRequest", "description": "Tool invocation request." }, "ToolInvokeResponse": { "properties": { "content": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Content" }, "isError": { "type": "boolean", "title": "Iserror", "default": false } }, "type": "object", "title": "ToolInvokeResponse", "description": "Tool invocation response." }, "ToolSearchResult": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "version": { "type": "string", "title": "Version", "default": "1.0.0" }, "visibility": { "type": "string", "title": "Visibility", "default": "private" }, "stats": { "type": "object", "title": "Stats" }, "score": { "type": "number", "title": "Score", "default": 0.0 }, "highlights": { "type": "object", "title": "Highlights" } }, "type": "object", "required": [ "id", "name" ], "title": "ToolSearchResult", "description": "Single tool search result." }, "ToolUsageStat": { "properties": { "tool_id": { "type": "string", "title": "Tool Id", "description": "Tool identifier" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "Tool display name" }, "call_count": { "type": "integer", "minimum": 0.0, "title": "Call Count", "description": "Number of calls to this tool" }, "success_rate": { "type": "number", "maximum": 100.0, "minimum": 0.0, "title": "Success Rate", "description": "Success rate percentage" }, "avg_latency_ms": { "type": "integer", "minimum": 0.0, "title": "Avg Latency Ms", "description": "Average latency in milliseconds" } }, "type": "object", "required": [ "tool_id", "tool_name", "call_count", "success_rate", "avg_latency_ms" ], "title": "ToolUsageStat", "description": "Usage statistics for a specific tool", "example": { "avg_latency_ms": 120, "call_count": 1250, "success_rate": 98.5, "tool_id": "crm-search", "tool_name": "CRM Customer Search" } }, "UsageCall": { "properties": { "id": { "type": "string", "title": "Id", "description": "Unique call identifier" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "When the call was made" }, "tool_id": { "type": "string", "title": "Tool Id", "description": "Tool identifier" }, "tool_name": { "type": "string", "title": "Tool Name", "description": "Tool display name" }, "status": { "allOf": [ { "$ref": "#/components/schemas/CallStatus" } ], "description": "Call status" }, "latency_ms": { "type": "integer", "minimum": 0.0, "title": "Latency Ms", "description": "Call latency in milliseconds" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message", "description": "Error message if failed" } }, "type": "object", "required": [ "id", "timestamp", "tool_id", "tool_name", "status", "latency_ms" ], "title": "UsageCall", "description": "A single MCP tool call record", "example": { "id": "call-0001", "latency_ms": 145, "status": "success", "timestamp": "2026-01-12T10:30:00Z", "tool_id": "crm-search", "tool_name": "CRM Customer Search" } }, "UsageCallsResponse": { "properties": { "calls": { "items": { "$ref": "#/components/schemas/UsageCall" }, "type": "array", "title": "Calls", "description": "List of calls" }, "total": { "type": "integer", "minimum": 0.0, "title": "Total", "description": "Total number of calls matching filters" }, "limit": { "type": "integer", "minimum": 1.0, "title": "Limit", "description": "Page size" }, "offset": { "type": "integer", "minimum": 0.0, "title": "Offset", "description": "Offset from start" } }, "type": "object", "required": [ "calls", "total", "limit", "offset" ], "title": "UsageCallsResponse", "description": "Paginated response for calls list", "example": { "calls": [], "limit": 20, "offset": 0, "total": 247 } }, "UsagePeriodStats": { "properties": { "period": { "type": "string", "title": "Period", "description": "Period identifier (today, week, month)" }, "total_calls": { "type": "integer", "minimum": 0.0, "title": "Total Calls", "description": "Total number of calls" }, "success_count": { "type": "integer", "minimum": 0.0, "title": "Success Count", "description": "Number of successful calls" }, "error_count": { "type": "integer", "minimum": 0.0, "title": "Error Count", "description": "Number of failed calls" }, "success_rate": { "type": "number", "maximum": 100.0, "minimum": 0.0, "title": "Success Rate", "description": "Success rate percentage" }, "avg_latency_ms": { "type": "integer", "minimum": 0.0, "title": "Avg Latency Ms", "description": "Average latency in milliseconds" } }, "type": "object", "required": [ "period", "total_calls", "success_count", "error_count", "success_rate", "avg_latency_ms" ], "title": "UsagePeriodStats", "description": "Statistics for a specific period", "example": { "avg_latency_ms": 180, "error_count": 7, "period": "today", "success_count": 120, "success_rate": 94.5, "total_calls": 127 } }, "UsageSummary": { "properties": { "tenant_id": { "type": "string", "title": "Tenant Id", "description": "User's tenant ID" }, "user_id": { "type": "string", "title": "User Id", "description": "User identifier" }, "today": { "allOf": [ { "$ref": "#/components/schemas/UsagePeriodStats" } ], "description": "Today's statistics" }, "this_week": { "allOf": [ { "$ref": "#/components/schemas/UsagePeriodStats" } ], "description": "This week's statistics" }, "this_month": { "allOf": [ { "$ref": "#/components/schemas/UsagePeriodStats" } ], "description": "This month's statistics" }, "top_tools": { "items": { "$ref": "#/components/schemas/ToolUsageStat" }, "type": "array", "title": "Top Tools", "description": "Top 5 most used tools" }, "daily_calls": { "items": { "$ref": "#/components/schemas/DailyCallStat" }, "type": "array", "title": "Daily Calls", "description": "Call counts for the last 7 days" } }, "type": "object", "required": [ "tenant_id", "user_id", "today", "this_week", "this_month" ], "title": "UsageSummary", "description": "Complete usage summary for a user", "example": { "daily_calls": [ { "calls": 120, "date": "2026-01-06" }, { "calls": 135, "date": "2026-01-07" } ], "tenant_id": "team-alpha", "this_month": { "avg_latency_ms": 158, "error_count": 74, "period": "month", "success_count": 3180, "success_rate": 97.7, "total_calls": 3254 }, "this_week": { "avg_latency_ms": 165, "error_count": 32, "period": "week", "success_count": 810, "success_rate": 96.2, "total_calls": 842 }, "today": { "avg_latency_ms": 180, "error_count": 7, "period": "today", "success_count": 120, "success_rate": 94.5, "total_calls": 127 }, "top_tools": [ { "avg_latency_ms": 120, "call_count": 1250, "success_rate": 98.5, "tool_id": "crm-search", "tool_name": "CRM Search" } ], "user_id": "alice" } }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WebhookCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name", "description": "Human-readable name for this webhook" }, "url": { "type": "string", "maxLength": 2048, "minLength": 1, "title": "Url", "description": "URL to send webhook events to" }, "events": { "items": { "type": "string" }, "type": "array", "minItems": 1, "title": "Events", "description": "List of events to subscribe to, or ['*'] for all events" }, "secret": { "anyOf": [ { "type": "string", "maxLength": 512, "minLength": 16 }, { "type": "null" } ], "title": "Secret", "description": "Secret for HMAC signature verification (min 16 chars)" }, "headers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Headers", "description": "Custom headers to include in webhook requests" } }, "type": "object", "required": [ "name", "url", "events" ], "title": "WebhookCreate", "description": "Schema for creating a new webhook", "example": { "events": [ "subscription.created", "subscription.approved" ], "headers": { "X-Custom-Header": "custom-value" }, "name": "Slack Notifications", "secret": "my-super-secret-key-min16chars", "url": "https://hooks.slack.com/services/xxx/yyy/zzz" } }, "WebhookDeliveryListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/WebhookDeliveryResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "WebhookDeliveryListResponse", "description": "Schema for delivery history response" }, "WebhookDeliveryResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "webhook_id": { "type": "string", "format": "uuid", "title": "Webhook Id" }, "subscription_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Subscription Id" }, "event_type": { "type": "string", "title": "Event Type" }, "payload": { "type": "object", "title": "Payload" }, "status": { "$ref": "#/components/schemas/WebhookDeliveryStatusEnum" }, "attempt_count": { "type": "integer", "title": "Attempt Count" }, "max_attempts": { "type": "integer", "title": "Max Attempts" }, "response_status_code": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Response Status Code" }, "response_body": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response Body" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "last_attempt_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Attempt At" }, "next_retry_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Next Retry At" }, "delivered_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Delivered At" } }, "type": "object", "required": [ "id", "webhook_id", "subscription_id", "event_type", "payload", "status", "attempt_count", "max_attempts", "response_status_code", "response_body", "error_message", "created_at", "last_attempt_at", "next_retry_at", "delivered_at" ], "title": "WebhookDeliveryResponse", "description": "Schema for webhook delivery response" }, "WebhookDeliveryStatusEnum": { "type": "string", "enum": [ "pending", "success", "failed", "retrying" ], "title": "WebhookDeliveryStatusEnum", "description": "Webhook delivery status" }, "WebhookListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/WebhookResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "WebhookListResponse", "description": "Schema for webhook list response" }, "WebhookResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "name": { "type": "string", "title": "Name" }, "url": { "type": "string", "title": "Url" }, "events": { "items": { "type": "string" }, "type": "array", "title": "Events" }, "has_secret": { "type": "boolean", "title": "Has Secret", "description": "Whether a secret is configured (secret value not returned)" }, "headers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Headers" }, "enabled": { "type": "boolean", "title": "Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" } }, "type": "object", "required": [ "id", "tenant_id", "name", "url", "events", "has_secret", "headers", "enabled", "created_at", "updated_at", "created_by" ], "title": "WebhookResponse", "description": "Schema for webhook response" }, "WebhookTestRequest": { "properties": { "event_type": { "type": "string", "title": "Event Type", "description": "Event type to simulate", "default": "subscription.created" } }, "type": "object", "title": "WebhookTestRequest", "description": "Schema for testing a webhook", "example": { "event_type": "subscription.created" } }, "WebhookTestResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "status_code": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Status Code" }, "response_body": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response Body" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "signature_header": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Signature Header", "description": "The X-Webhook-Signature header that was sent (if secret configured)" } }, "type": "object", "required": [ "success", "status_code", "response_body", "error" ], "title": "WebhookTestResponse", "description": "Schema for webhook test response" }, "WebhookUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "url": { "anyOf": [ { "type": "string", "maxLength": 2048, "minLength": 1 }, { "type": "null" } ], "title": "Url" }, "events": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "minItems": 1 }, { "type": "null" } ], "title": "Events" }, "secret": { "anyOf": [ { "type": "string", "maxLength": 512, "minLength": 16 }, { "type": "null" } ], "title": "Secret" }, "headers": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Headers" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" } }, "type": "object", "title": "WebhookUpdate", "description": "Schema for updating a webhook", "example": { "enabled": true, "events": [ "*" ], "name": "Updated Slack Notifications" } } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } }, "tags": [ { "name": "Tenants", "description": "Tenant management operations" }, { "name": "APIs", "description": "API lifecycle management" }, { "name": "Applications", "description": "Application and subscription management" }, { "name": "Deployments", "description": "Deployment operations and status" }, { "name": "Git", "description": "GitLab integration (commits, MRs, files)" }, { "name": "Events", "description": "Real-time event streaming (SSE)" }, { "name": "Webhooks", "description": "GitLab webhook handlers for GitOps" }, { "name": "Traces", "description": "Pipeline monitoring and tracing" }, { "name": "Gateway", "description": "webMethods Gateway administration via OIDC proxy" }, { "name": "Subscriptions", "description": "API subscription and API key management" }, { "name": "Tenant Webhooks", "description": "Webhook notifications for subscription events (CAB-315)" }, { "name": "certificates", "description": "Certificate validation for mTLS subscriptions (CAB-313)" }, { "name": "Search", "description": "Full-text search across tools and APIs (CAB-307)" }, { "name": "Usage", "description": "Usage dashboard for API consumers (CAB-280)" }, { "name": "Dashboard", "description": "Home dashboard stats and activity (CAB-299)" }, { "name": "Service Accounts", "description": "OAuth2 Service Accounts for MCP access (CAB-296)" }, { "name": "Contracts", "description": "Universal API Contracts with multi-protocol bindings (UAC)" }, { "name": "MCP Servers", "description": "Browse and discover MCP servers" }, { "name": "MCP Subscriptions", "description": "Subscribe to MCP servers and manage API keys" }, { "name": "MCP Validation", "description": "API key validation for MCP Gateway (internal)" }, { "name": "MCP Admin - Subscriptions", "description": "Admin approval workflow for MCP subscriptions" }, { "name": "MCP Admin - Servers", "description": "MCP server management (admin)" }, { "name": "Portal", "description": "Developer Portal API catalog and MCP server browsing" }, { "name": "MCP GitOps", "description": "GitOps synchronization for MCP servers" }, { "name": "MCP Tools", "description": "MCP tools discovery and invocation (proxy to MCP Gateway)" }, { "name": "Platform", "description": "Platform status and GitOps observability (CAB-654)" } ] }