diff --git a/apps/engine/docs/openapi.yaml b/apps/engine/docs/openapi.yaml index d455a296c6..d752d90889 100644 --- a/apps/engine/docs/openapi.yaml +++ b/apps/engine/docs/openapi.yaml @@ -13,11 +13,67 @@ info: paths: /v1/admin/auth_providers: get: - description: List a page of auth providers that are available to the caller + description: List the auth providers that are available to the caller, filtered, + ordered and a page at a time tags: - Admin summary: List auth providers operationId: auth-providers-list + parameters: + - description: "Number of items to return (default: 100, max: 1000)" + name: limit + in: query + schema: + type: integer + - description: "Offset from the start of the list (default: 0)" + name: offset + in: query + schema: + type: integer + - description: "An AIP-160 filter (https://google.aip.dev/160) of id, provider_id, + description, status (active or inactive), binding.type (static, + tenant or project), created_at and updated_at. A value with no field + finds providers whose id, provider_id or description contains it, + and every such value must match. Text ignores case, and * at the + start or end of a value in = or != is a wildcard. field:value means + field = value, and field:* means the field is set. Times are RFC + 3339, quoted or in timestamp('...'). Providers the Engine's config + declares were created and updated at 0001-01-01T00:00:00Z. At most + 512 characters and 32 conditions. provider_id = null finds the + providers that name no well-known provider. Example: binding.type = + 'tenant' AND status = 'active' AND github" + name: filter + in: query + schema: + type: string + - description: "Order by creation time, id, status or relevance (default: + created_at, which lists the stored providers newest first, then + those the Engine's config declares, in config order). Rows that tie + are ordered by their internal key in the same direction. relevance + puts the best matches of the filter's search first, ids before + provider_ids before descriptions: an id that is the search, then ids + that start with its first word, then ids that hold every word, then + provider_ids and descriptions the same way, then providers whose + words are split between fields; rows that rank the same follow the + default order" + name: sort_by + in: query + schema: + type: string + enum: + - created_at + - id + - status + - relevance + - description: "Order direction (default: desc for created_at, asc for id and + status). Not taken with relevance" + name: sort_dir + in: query + schema: + type: string + enum: + - asc + - desc responses: "200": description: OK @@ -25,12 +81,24 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.OffsetPage-schemas_AuthProviderResponse" + "400": + description: Bad Request + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/schemas.Error" + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" security: - Bearer: [] post: @@ -190,7 +258,8 @@ paths: - Bearer: [] /v1/admin/secrets: get: - description: List all secrets that are visible to the caller + description: List the secrets that are visible to the caller, filtered, ordered + and a page at a time tags: - Admin summary: List secrets @@ -206,6 +275,43 @@ paths: in: query schema: type: integer + - description: "An AIP-160 filter (https://google.aip.dev/160) of key, + description, binding.type (static, tenant or project), created_at, + updated_at and last_accessed_at. A value with no field finds secrets + whose key or description contains it, and every such value must + match. Text ignores case, and * at the start or end of a value in = + or != is a wildcard. field:value means field = value, and field:* + means the field is set. Times are RFC 3339, quoted or in + timestamp('...'). At most 512 characters and 32 conditions. Example: + binding.type = 'tenant' AND key = '*stripe*'" + name: filter + in: query + schema: + type: string + - description: "Order by creation time, key or relevance (default: created_at). + Rows that tie are ordered by id in the same direction. relevance + puts the best matches of the filter's search first, keys before + descriptions: a key that is the search, then keys that start with + its first word, then keys that hold every word, then descriptions + the same way, then secrets whose words are split between key and + description; rows that rank the same follow the default order" + name: sort_by + in: query + schema: + type: string + enum: + - created_at + - key + - relevance + - description: "Order direction (default: desc for created_at, asc for key). Not + taken with relevance" + name: sort_dir + in: query + schema: + type: string + enum: + - asc + - desc responses: "200": description: OK @@ -225,6 +331,12 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.Error" + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" security: - Bearer: [] "/v1/admin/secrets/{secret_id}": @@ -1431,7 +1543,8 @@ paths: - Bearer: [] "/v1/orgs/{org_id}/projects/{project_id}/gateways": get: - description: Returns a paginated list of gateways for the current project + description: List the gateways of the current project, its organization and the + platform, filtered, ordered and a page at a time tags: - Gateways summary: List gateways @@ -1459,6 +1572,50 @@ paths: in: query schema: type: integer + - description: "An AIP-160 filter (https://google.aip.dev/160) of binding.type + (static, tenant or project), created_at, status (active or + inactive), name, description, slug, auth_type (arcade, arcade_header + or user_source) and tool_filter.allowed_tools. A value with no field + finds gateways whose name, slug or description contains it, and + every such value must match. Text ignores case, and * at the start + or end of a value in = or != is a wildcard. field:value means field + = value, and field:* means the field is set. + tool_filter.allowed_tools = value keeps the gateways that allow a + tool matching it, != the gateways that allow none, and + tool_filter.allowed_tools:* those that allow any; + tool_filter.allowed_tools = 'Github.*' finds the gateways that allow + a GitHub tool. Times are RFC 3339, quoted or in timestamp('...'). At + most 512 characters and 32 conditions. Example: status = 'active' + AND tool_filter.allowed_tools = 'Github.*' AND github" + name: filter + in: query + schema: + type: string + - description: "Order by creation time, name or relevance (default: created_at). + Rows that tie are ordered by id in the same direction. relevance + puts the best matches of the filter's search first, names before + slugs before descriptions: a name that is the search, then names + that start with its first word, then names that hold every word, + then slugs and descriptions the same way, then gateways whose words + are split between fields; rows that rank the same follow the default + order" + name: sort_by + in: query + schema: + type: string + enum: + - created_at + - name + - relevance + - description: "Order direction (default: desc for created_at, asc for name). Not + taken with relevance" + name: sort_dir + in: query + schema: + type: string + enum: + - asc + - desc responses: "200": description: OK @@ -1484,6 +1641,12 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.Error" + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" security: - Bearer: [] post: @@ -2600,6 +2763,65 @@ paths: $ref: "#/components/schemas/schemas.Error" security: - Bearer: [] + "/v1/orgs/{org_id}/projects/{project_id}/server_catalog": + get: + description: Returns a page of the third-party MCP servers available for + one-click registration, in catalog order + tags: + - Admin + summary: List the server catalog + operationId: project-server-catalog-list + parameters: + - description: Organization ID + name: org_id + in: path + required: true + schema: + type: string + - description: Project ID + name: project_id + in: path + required: true + schema: + type: string + - description: "Number of items to return (default: 100, max: 1000)" + name: limit + in: query + schema: + type: integer + - description: "Offset from the start of the list (default: 0)" + name: offset + in: query + schema: + type: integer + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.OffsetPage-schemas_ServerCatalogEntryRespon\ + se" + "400": + description: Bad Request + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" + security: + - Bearer: [] "/v1/orgs/{org_id}/projects/{project_id}/suggestions": get: description: Returns suggestions from every gateway in the project, ordered by @@ -2747,6 +2969,18 @@ paths: in: query schema: type: string + - description: Filter by the project API key that made the call. Comma-separate to + match any of several keys + name: api_key_id + in: query + schema: + type: string + - description: Filter by the MCP gateway the call came through. Comma-separate to + match any of several gateways + name: gateway_id + in: query + schema: + type: string - description: Filter by outcome name: outcome in: query @@ -2777,8 +3011,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.OffsetPage-schemas_ToolExecutionListRespons\ - e" + $ref: "#/components/schemas/schemas.ToolExecutionsPage" "400": description: Bad Request content: @@ -2843,6 +3076,18 @@ paths: in: query schema: type: string + - description: Filter by the project API key that made the call. Comma-separate to + match any of several keys + name: api_key_id + in: query + schema: + type: string + - description: Filter by the MCP gateway the call came through. Comma-separate to + match any of several gateways + name: gateway_id + in: query + schema: + type: string - description: Filter by outcome name: outcome in: query @@ -3840,8 +4085,16 @@ components: api.ToolExecutionCountResponse: type: object properties: + api_key_id: + type: array + items: + type: string count: type: integer + gateway_id: + type: array + items: + type: string auth.AuthorizationContext: type: object properties: @@ -3917,12 +4170,10 @@ components: - static - tenant - project - - account x-enum-varnames: - StaticBindingType - TenantBindingType - ProjectBindingType - - AccountBindingType plugins.FailureMode: type: string enum: @@ -4042,6 +4293,16 @@ components: type: string oauth2: $ref: "#/components/schemas/schemas.OAuth2ConfigResponse" + overridden: + description: Whether a more specific level the caller reads holds a provider + with this provider_id; never for a provider without one; set only by + the list. + type: boolean + overriding: + description: Whether this provider has a provider_id a less specific level the + caller reads also holds, and no more specific level does; set only + by the list. + type: boolean provider_id: type: string status: @@ -4576,6 +4837,8 @@ components: type: string discovery: $ref: "#/components/schemas/schemas.CreateDiscoveryRequest" + registry_project_catalog: + $ref: "#/components/schemas/schemas.RegistryProjectCatalogSettingRequest" registry_suggestions: $ref: "#/components/schemas/schemas.RegistrySuggestionsSettingRequest" schemas.CreateWebhookConfigRequest: @@ -4630,9 +4893,29 @@ components: type: string timestamp: type: string + schemas.DeploymentOAuthClient: + type: object + required: + - client_id + properties: + client_id: + type: string + maxLength: 1000 + client_secret: + type: string + maxLength: 1000 schemas.DeploymentStatusResponse: type: object properties: + authorization_required: + description: >- + AuthorizationRequired is set on a running server that refuses to + list its tools + + until someone authorizes it, so it has no tools to serve yet. It clears once + + anyone in the project authorizes the server. + type: boolean error: type: string server_version: @@ -4960,6 +5243,15 @@ components: schemas.MCPOAuth2ConfigCreateRequest: type: object properties: + assume_pkce_support: + description: >- + AssumePKCESupport starts authorization even though the authorization + server's + + metadata omits code_challenge_methods_supported. Set it only for a server known to + + verify S256 without advertising it. + type: boolean authorization_url: type: string maxLength: 2048 @@ -4975,6 +5267,13 @@ components: schemas.MCPOAuth2ConfigResponse: type: object properties: + assume_pkce_support: + description: >- + AssumePKCESupport is true when authorization starts even though the + authorization + + server's metadata does not advertise PKCE support. + type: boolean authorization_url: type: string client_id: @@ -4992,6 +5291,13 @@ components: schemas.MCPOAuth2ConfigUpdateRequest: type: object properties: + assume_pkce_support: + description: >- + AssumePKCESupport starts authorization even though the authorization + server's + + metadata omits code_challenge_methods_supported. Omitted, the stored value is kept. + type: boolean authorization_url: type: string maxLength: 2048 @@ -5343,26 +5649,26 @@ components: type: integer total_count: type: integer - schemas.OffsetPage-schemas_StoredSecretResponse: + schemas.OffsetPage-schemas_ServerCatalogEntryResponse: type: object properties: items: type: array items: - $ref: "#/components/schemas/schemas.StoredSecretResponse" + $ref: "#/components/schemas/schemas.ServerCatalogEntryResponse" limit: type: integer offset: type: integer total_count: type: integer - schemas.OffsetPage-schemas_ToolExecutionListResponse: + schemas.OffsetPage-schemas_StoredSecretResponse: type: object properties: items: type: array items: - $ref: "#/components/schemas/schemas.ToolExecutionListResponse" + $ref: "#/components/schemas/schemas.StoredSecretResponse" limit: type: integer offset: @@ -5665,6 +5971,8 @@ components: type: string discovery: $ref: "#/components/schemas/schemas.PatchDiscoveryRequest" + registry_project_catalog: + $ref: "#/components/schemas/schemas.RegistryProjectCatalogSettingRequest" registry_suggestions: $ref: "#/components/schemas/schemas.RegistrySuggestionsSettingRequest" schemas.PatchWebhookConfigRequest: @@ -5836,6 +6144,16 @@ components: type: string time_unit: type: string + schemas.RegistryProjectCatalogResponse: + type: object + properties: + enabled: + type: boolean + schemas.RegistryProjectCatalogSettingRequest: + type: object + properties: + enabled: + type: boolean schemas.RegistrySuggestionsResponse: type: object properties: @@ -5931,6 +6249,26 @@ components: type: boolean value: type: string + schemas.ServerCatalogEntryResponse: + type: object + properties: + description: + type: string + id: + type: string + name: + type: string + outdated_urls: + description: Endpoints the vendor no longer serves, replaced by URL. + type: array + items: + type: string + requires_authorization: + type: boolean + source: + type: string + url: + type: string schemas.ServerInfoResponse: type: object properties: @@ -5978,6 +6316,15 @@ components: type: string last_accessed_at: type: string + overridden: + description: "Set only by the secrets list: true when a more specific level has + a secret with this key, which is used instead of this one." + type: boolean + overriding: + description: "Set only by the secrets list: true when this secret is used and a + less specific level has a secret with the same key. Never true with + overridden." + type: boolean updated_at: type: string schemas.TaskSelectionResult: @@ -6133,10 +6480,17 @@ components: schemas.ToolExecutionDetailResponse: type: object properties: + api_key_id: + description: APIKeyID is the project API key that made the call, when one did. + type: string attempts: type: array items: $ref: "#/components/schemas/schemas.ToolExecutionAttemptResponse" + client_ip: + description: ClientIP is the network address of the caller that made the run, + when one was recorded. + type: string created_at: type: string execution_status: @@ -6145,6 +6499,10 @@ components: type: string finished_at: type: string + gateway_id: + description: GatewayID is the MCP gateway the call came through, when it came + through one. + type: string id: type: string input: @@ -6166,6 +6524,13 @@ components: schemas.ToolExecutionListResponse: type: object properties: + api_key_id: + description: APIKeyID is the project API key that made the call, when one did. + type: string + client_ip: + description: ClientIP is the network address of the caller that made the run, + when one was recorded. + type: string created_at: type: string execution_status: @@ -6174,6 +6539,10 @@ components: type: string finished_at: type: string + gateway_id: + description: GatewayID is the MCP gateway the call came through, when it came + through one. + type: string id: type: string run_at: @@ -6190,6 +6559,27 @@ components: type: string user_id: type: string + schemas.ToolExecutionsPage: + type: object + properties: + api_key_id: + type: array + items: + type: string + gateway_id: + type: array + items: + type: string + items: + type: array + items: + $ref: "#/components/schemas/schemas.ToolExecutionListResponse" + limit: + type: integer + offset: + type: integer + total_count: + type: integer schemas.ToolFilterResponse: type: object properties: @@ -6199,6 +6589,8 @@ components: type: string discovery: $ref: "#/components/schemas/schemas.DiscoveryResponse" + registry_project_catalog: + $ref: "#/components/schemas/schemas.RegistryProjectCatalogResponse" registry_suggestions: $ref: "#/components/schemas/schemas.RegistrySuggestionsResponse" schemas.ToolRecommendationRequest: @@ -6463,22 +6855,29 @@ components: type: string schemas.UpdateDeploymentRequest: type: object - required: - - toolkits properties: description: type: string maxLength: 1000 environment: + description: The full set of environment variables; a name left out is removed. type: object additionalProperties: type: string + oauth_client: + description: A redeploy without a client keeps the one stored on the server. + allOf: + - $ref: "#/components/schemas/schemas.DeploymentOAuthClient" secrets: + description: The full set of secrets; a name left out is removed, and a name + sent with a null value keeps its stored value. type: object additionalProperties: type: string toolkits: - $ref: "#/components/schemas/schemas.ToolkitMetadata" + description: An update without toolkits keeps the stored release. + allOf: + - $ref: "#/components/schemas/schemas.ToolkitMetadata" schemas.UpdateDiscoveryRequest: type: object properties: @@ -6554,6 +6953,8 @@ components: type: string discovery: $ref: "#/components/schemas/schemas.UpdateDiscoveryRequest" + registry_project_catalog: + $ref: "#/components/schemas/schemas.RegistryProjectCatalogSettingRequest" registry_suggestions: $ref: "#/components/schemas/schemas.RegistrySuggestionsSettingRequest" schemas.UpdateWorkerRequest: