{"openapi":"3.1.0","info":{"title":"SonarCloud (BYOK) API","version":"0.1.0","description":"SonarCloud (BYOK) lets an AI assistant read your own SonarCloud data through the SonarCloud API with a key you supply (user token). Read-only: 8 tools (validate_token, search_projects, search_issues, get_component_measures, get_measures_history, list_branches, list_analyses, search_metrics). The BYOK key travels with each request, is used for that one call only and is never stored, logged or...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-sonarcloud.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-sonarcloud/docs"},"termsOfService":"https://connectorbay.com/byok-sonarcloud/terms"},"servers":[{"url":"https://byok-sonarcloud.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-sonarcloud/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/validate_token":{"post":{"operationId":"validate_token","summary":"Check whether the SonarCloud token is accepted; returns valid true or false (true is also returned for anonymous access)","description":"Check whether the SonarCloud token is accepted; returns valid true or false (true is also returned for anonymous access). Use for \"Is my SonarCloud token valid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"validate_tokenArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_projects":{"post":{"operationId":"search_projects","summary":"List the projects of a SonarCloud organization with key, name, visibility and last analysis date. Page with page and pag","description":"List the projects of a SonarCloud organization with key, name, visibility and last analysis date. Page with page and page_size. Use for \"What projects are in my SonarCloud organization\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"Organization key, as shown in the SonarCloud URL (for example 'my-org').","maxLength":100,"title":"Organization","type":"string"},"q":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only projects whose name or key contains this text.","title":"Q"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"1-based page number.","title":"Page"},"page_size":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Page size (1 to 500).","title":"Page Size"}},"required":["organization"],"title":"search_projectsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_issues":{"post":{"operationId":"search_issues","summary":"Search SonarCloud issues (bugs, vulnerabilities, code smells) by project or component, organization, severity, status an","description":"Search SonarCloud issues (bugs, vulnerabilities, code smells) by project or component, organization, severity, status and software quality. Only the first 10,000 results are reachable. Use for \"What open security issues does my SonarCloud project have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Organization key (for example 'my-org').","title":"Organization"},"component_keys":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated project or component keys to restrict to, for example 'my-org_my-project'.","title":"Component Keys"},"branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Branch name (default: the main branch).","title":"Branch"},"impact_severities":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated impact severities: INFO, LOW, MEDIUM, HIGH, BLOCKER.","title":"Impact Severities"},"impact_software_qualities":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated software qualities: MAINTAINABILITY, RELIABILITY, SECURITY.","title":"Impact Software Qualities"},"issue_statuses":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated issue statuses: OPEN, CONFIRMED, FALSE_POSITIVE, ACCEPTED, FIXED.","title":"Issue Statuses"},"resolved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only resolved issues, false for only unresolved.","title":"Resolved"},"created_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only issues created on or after this date or time (for example 2026-01-01).","title":"Created After"},"sort":{"anyOf":[{"enum":["CREATION_DATE","UPDATE_DATE","SEVERITY","STATUS","FILE_LINE","CLOSE_DATE"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field: CREATION_DATE, UPDATE_DATE, SEVERITY, STATUS, FILE_LINE or CLOSE_DATE.","title":"Sort"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"1-based page number.","title":"Page"},"page_size":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Page size (1 to 500).","title":"Page Size"}},"title":"search_issuesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_component_measures":{"post":{"operationId":"get_component_measures","summary":"Get measures (metrics such as coverage, bugs, vulnerabilities, ncloc, duplicated_lines_density) for a SonarCloud project","description":"Get measures (metrics such as coverage, bugs, vulnerabilities, ncloc, duplicated_lines_density) for a SonarCloud project or file. Metric keys come from search_metrics. Use for \"What is the code coverage and bug count of my SonarCloud project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"component":{"description":"Project or component key, for example 'my-org_my-project'.","maxLength":200,"title":"Component","type":"string"},"metric_keys":{"description":"Comma-separated metric keys, for example 'coverage,bugs,vulnerabilities,code_smells,ncloc'.","maxLength":300,"title":"Metric Keys","type":"string"},"branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Branch name (default: the main branch).","title":"Branch"}},"required":["component","metric_keys"],"title":"get_component_measuresArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_measures_history":{"post":{"operationId":"get_measures_history","summary":"Get the history of measures of a SonarCloud project over time: dates and values per metric, oldest first. Use for \"How h","description":"Get the history of measures of a SonarCloud project over time: dates and values per metric, oldest first. Use for \"How has the coverage of my SonarCloud project changed over time\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"component":{"description":"Project or component key.","maxLength":200,"title":"Component","type":"string"},"metrics":{"description":"Comma-separated metric keys, for example 'coverage,bugs'.","maxLength":300,"title":"Metrics","type":"string"},"branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Branch name (default: the main branch).","title":"Branch"},"date_from":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only measures created on or after this date (YYYY-MM-DD or ISO 8601).","title":"Date From"},"date_to":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only measures created on or before this date.","title":"Date To"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"1-based page number.","title":"Page"},"page_size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Page size (1 to 1000).","title":"Page Size"}},"required":["component","metrics"],"title":"get_measures_historyArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_branches":{"post":{"operationId":"list_branches","summary":"List the branches of a SonarCloud project with type, main flag, quality gate status, bug, vulnerability and code smell c","description":"List the branches of a SonarCloud project with type, main flag, quality gate status, bug, vulnerability and code smell counts and last analysis date. Use for \"Which branches of my SonarCloud project have a failing quality gate\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Project key, for example 'my-org_my-project'.","maxLength":200,"title":"Project","type":"string"}},"required":["project"],"title":"list_branchesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_analyses":{"post":{"operationId":"list_analyses","summary":"List the analyses of a SonarCloud project (newest first) with date, project version, revision and events such as quality","description":"List the analyses of a SonarCloud project (newest first) with date, project version, revision and events such as quality gate changes. Use for \"When was my SonarCloud project last analyzed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Project key, for example 'my-org_my-project'.","maxLength":200,"title":"Project","type":"string"},"branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Branch name (default: the main branch).","title":"Branch"},"category":{"anyOf":[{"enum":["VERSION","OTHER","QUALITY_PROFILE","QUALITY_GATE","DEFINITION_CHANGE"],"type":"string"},{"type":"null"}],"default":null,"description":"Only analyses with an event of this category.","title":"Category"},"date_from":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only analyses created on or after this date.","title":"Date From"},"date_to":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only analyses created on or before this date.","title":"Date To"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"1-based page number.","title":"Page"},"page_size":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Page size (1 to 500).","title":"Page Size"}},"required":["project"],"title":"list_analysesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_metrics":{"post":{"operationId":"search_metrics","summary":"List the metrics SonarCloud knows (key, name, domain, type, description) so you can choose keys for measures tools. Page","description":"List the metrics SonarCloud knows (key, name, domain, type, description) so you can choose keys for measures tools. Page with page and page_size. Use for \"Which metrics can I query in SonarCloud\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"1-based page number.","title":"Page"},"page_size":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Page size (1 to 500).","title":"Page Size"}},"title":"search_metricsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}