{"openapi":"3.1.0","info":{"title":"Superlog Management API","description":"Programmatic surface for provisioning projects, ingest keys, and GitHub access. Authenticated with org-scoped management keys (prefix `sl_management_*`).","version":"1.0.0"},"servers":[{"url":"https://api.superlog.sh","description":"Production"},{"url":"http://localhost:4100","description":"Local dev"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sl_management_*"}}},"security":[{"bearerAuth":[]}],"tags":[{"name":"Projects"},{"name":"API keys"},{"name":"GitHub integration"}],"paths":{"/api/v1/projects":{"post":{"operationId":"postApiV1Projects","tags":["Projects"],"summary":"Create a project","description":"Creates a new project in the authed org. Optionally mints an initial ingest key in the same call (default behavior).","responses":{"200":{"description":"Project created","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"project_context":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automerge_fix_prs":{"type":"string","enum":["never","when_checks_pass","immediately"],"description":"Controls whether the agent's auto-opened fix PRs are merged. 'when_checks_pass' uses GitHub native auto-merge; 'immediately' calls the merge API right after PR open."},"automerge_method":{"type":"string","enum":["squash","merge","rebase"],"description":"Merge strategy used for auto-merge."},"pr_base_branch":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Target branch for agent-opened PRs. Null or blank uses the repository default branch."}},"required":["id","name","slug","project_context","automerge_fix_prs","automerge_method","pr_base_branch"],"description":"Project metadata."},"api_key":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key_prefix":{"type":"string","description":"Stable prefix of the key (safe to display)."},"plaintext":{"type":"string","description":"Full key. Shown once — store immediately."}},"required":["id","name","key_prefix","plaintext"]},{"type":"null"}],"description":"Present when mint_ingest_key is true (default); null otherwise."}},"required":["project","api_key"]}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict (e.g. slug already in use)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"project_context":{"type":"string","maxLength":8000},"mint_ingest_key":{"default":true,"description":"If true, mint an initial ingest key alongside the project.","type":"boolean"},"automerge_fix_prs":{"type":"string","enum":["never","when_checks_pass","immediately"],"description":"Controls whether the agent's auto-opened fix PRs are merged. 'when_checks_pass' uses GitHub native auto-merge; 'immediately' calls the merge API right after PR open."},"automerge_method":{"type":"string","enum":["squash","merge","rebase"],"description":"Merge strategy used for auto-merge."},"pr_base_branch":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Target branch for agent-opened PRs. Null or blank uses the repository default branch."}},"required":["name","slug"]}}}}},"get":{"operationId":"getApiV1Projects","tags":["Projects"],"summary":"List projects in the org","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"project_context":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automerge_fix_prs":{"type":"string","enum":["never","when_checks_pass","immediately"],"description":"Controls whether the agent's auto-opened fix PRs are merged. 'when_checks_pass' uses GitHub native auto-merge; 'immediately' calls the merge API right after PR open."},"automerge_method":{"type":"string","enum":["squash","merge","rebase"],"description":"Merge strategy used for auto-merge."},"pr_base_branch":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Target branch for agent-opened PRs. Null or blank uses the repository default branch."}},"required":["id","name","slug","project_context","automerge_fix_prs","automerge_method","pr_base_branch"],"description":"Project metadata."}}},"required":["projects"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/projects/{projectId}":{"get":{"operationId":"getApiV1ProjectsByProjectId","tags":["Projects"],"summary":"Get a project","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"project_context":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automerge_fix_prs":{"type":"string","enum":["never","when_checks_pass","immediately"],"description":"Controls whether the agent's auto-opened fix PRs are merged. 'when_checks_pass' uses GitHub native auto-merge; 'immediately' calls the merge API right after PR open."},"automerge_method":{"type":"string","enum":["squash","merge","rebase"],"description":"Merge strategy used for auto-merge."},"pr_base_branch":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Target branch for agent-opened PRs. Null or blank uses the repository default branch."}},"required":["id","name","slug","project_context","automerge_fix_prs","automerge_method","pr_base_branch"],"description":"Project metadata."}},"required":["project"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"patch":{"operationId":"patchApiV1ProjectsByProjectId","tags":["Projects"],"summary":"Update a project","description":"Partial update. Only fields present in the body are written.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"project_context":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"automerge_fix_prs":{"type":"string","enum":["never","when_checks_pass","immediately"],"description":"Controls whether the agent's auto-opened fix PRs are merged. 'when_checks_pass' uses GitHub native auto-merge; 'immediately' calls the merge API right after PR open."},"automerge_method":{"type":"string","enum":["squash","merge","rebase"],"description":"Merge strategy used for auto-merge."},"pr_base_branch":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Target branch for agent-opened PRs. Null or blank uses the repository default branch."}},"required":["id","name","slug","project_context","automerge_fix_prs","automerge_method","pr_base_branch"],"description":"Project metadata."}},"required":["project"]}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict (e.g. slug already in use)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"project_context":{"type":"string","maxLength":8000},"automerge_fix_prs":{"type":"string","enum":["never","when_checks_pass","immediately"],"description":"Controls whether the agent's auto-opened fix PRs are merged. 'when_checks_pass' uses GitHub native auto-merge; 'immediately' calls the merge API right after PR open."},"automerge_method":{"type":"string","enum":["squash","merge","rebase"],"description":"Merge strategy used for auto-merge."},"pr_base_branch":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Target branch for agent-opened PRs. Null or blank uses the repository default branch."}},"description":"Partial update. Only fields present in the body are written."}}}}}},"/api/v1/projects/{projectId}/api-keys":{"post":{"operationId":"postApiV1ProjectsByProjectIdApiKeys","tags":["API keys"],"summary":"Mint a new ingest API key","responses":{"200":{"description":"Key minted (plaintext shown once)","content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key_prefix":{"type":"string","description":"Stable prefix of the key (safe to display)."},"plaintext":{"type":"string","description":"Full key. Shown once — store immediately."}},"required":["id","name","key_prefix","plaintext"]}},"required":["api_key"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]},"get":{"operationId":"getApiV1ProjectsByProjectIdApiKeys","tags":["API keys"],"summary":"List ingest API keys for a project","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"api_keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key_prefix":{"type":"string"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","key_prefix","last_used_at","revoked_at","created_at"]}}},"required":["api_keys"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/projects/{projectId}/sourcemaps":{"post":{"operationId":"postApiV1ProjectsByProjectIdSourcemaps","tags":["Projects"],"summary":"Upload a source map artifact","description":"Uploads a compressed source map artifact for later issue symbolication. Accepts either a project-scoped `sl_public_*` ingest key for this project or a server-side `sl_management_*` key for the org.","responses":{"200":{"description":"Source map stored","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","minLength":1,"maxLength":32},"release":{"type":"string","minLength":1,"maxLength":200},"dist":{"type":"string","minLength":1,"maxLength":200},"debugId":{"type":"string","minLength":1,"maxLength":200},"bundleFile":{"type":"string","minLength":1,"maxLength":500},"mapFile":{"type":"string","minLength":1,"maxLength":500},"sourceMap":{"type":"string","minLength":2},"sourceMapHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceMapBytes":{"type":"integer","exclusiveMinimum":0,"maximum":26214400}},"required":["platform","release","mapFile","sourceMap","sourceMapHash","sourceMapBytes"]}}}}}},"/api/v1/integrations/github/install-url":{"post":{"operationId":"postApiV1IntegrationsGithubInstallUrl","tags":["GitHub integration"],"summary":"Mint an org-scoped GitHub App install URL","description":"Resulting install is owned by the org and can be granted to multiple projects. `return_url` host must be in the org's allowlist.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"install_url":{"type":"string","format":"uri"}},"required":["install_url"]}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"503":{"description":"GitHub App not configured server-side","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/projects/{projectId}/integrations/github/install-url":{"post":{"operationId":"postApiV1ProjectsByProjectIdIntegrationsGithubInstallUrl","tags":["GitHub integration"],"summary":"Mint a project-scoped GitHub App install URL","description":"Resulting install is bound to one project and is NOT listed by `GET /api/v1/integrations/github/installations`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"install_url":{"type":"string","format":"uri"}},"required":["install_url"]}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"503":{"description":"GitHub App not configured server-side","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/integrations/github/installations":{"get":{"operationId":"getApiV1IntegrationsGithubInstallations","tags":["GitHub integration"],"summary":"List org-scoped GitHub installs","description":"Project-scoped installs and revoked / suspended installs are excluded.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"installations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"installation_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"GitHub's numeric install ID."},"account_login":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","installation_id","account_login","account_type","created_at"]}}},"required":["installations"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/integrations/github/installations/{installationRowId}/repos":{"get":{"operationId":"getApiV1IntegrationsGithubInstallationsByInstallationRowIdRepos","tags":["GitHub integration"],"summary":"List repos an install covers (live)","description":"Live call to GitHub. Capped at 1000 repos; `truncated=true` means more exist. You can still grant a beyond-cap repo by passing its numeric ID to the grant endpoint (O(1) lookup).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"repos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"full_name":{"type":"string"},"private":{"type":"boolean"}},"required":["id","full_name","private"]}},"truncated":{"type":"boolean","description":"True if the install has more repos than the listing endpoint returns (cap is 1000)."}},"required":["repos","truncated"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"Upstream GitHub call failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"installationRowId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/projects/{projectId}/github/repos":{"post":{"operationId":"postApiV1ProjectsByProjectIdGithubRepos","tags":["GitHub integration"],"summary":"Grant a project access to a repo","description":"Validates the install belongs to this org and the repo is covered by it (live GitHub check) so a leaked management key can't grant access to arbitrary repo IDs.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"grant":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"installation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"repo_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repo_full_name":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","installation_id","repo_id","repo_full_name","created_at"]}},"required":["grant"]}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"Upstream GitHub call failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Install row UUID (from GET .../installations)."},"repo_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"GitHub numeric repo ID."}},"required":["installation_id","repo_id"]}}}}},"get":{"operationId":"getApiV1ProjectsByProjectIdGithubRepos","tags":["GitHub integration"],"summary":"List repo grants on a project","description":"Grants whose underlying install has been revoked are filtered out.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"installation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"repo_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repo_full_name":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","installation_id","repo_id","repo_full_name","created_at"]}}},"required":["grants"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}]}},"/api/v1/projects/{projectId}/github/repos/{repoId}":{"delete":{"operationId":"deleteApiV1ProjectsByProjectIdGithubReposByRepoId","tags":["GitHub integration"],"summary":"Revoke a project's grant on a repo","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"repoId","schema":{"type":"string","pattern":"^\\d+$"},"required":true}]}},"/api/v1/projects/{projectId}/traces/{traceId}":{"get":{"operationId":"getApiV1ProjectsByProjectIdTracesByTraceId","tags":["Telemetry read"],"summary":"Get a trace by id","description":"Returns all spans and correlated logs for the given trace.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{},"description":"ClickHouse rows. Shape mirrors what the dashboard /explore/* endpoints return."}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"traceId","schema":{"type":"string","pattern":"^[a-fA-F0-9]{1,64}$"},"required":true,"description":"Hex-encoded OTLP trace id."}]}},"/api/v1/projects/{projectId}/logs":{"get":{"operationId":"getApiV1ProjectsByProjectIdLogs","tags":["Telemetry read"],"summary":"Query logs","description":"Returns log rows filtered by any combination of trace_id, service, severity, free-text search, and time range. Newest first.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{},"description":"ClickHouse rows. Shape mirrors what the dashboard /explore/* endpoints return."}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"trace_id","schema":{"type":"string","pattern":"^[a-fA-F0-9]{1,64}$"},"description":"Hex-encoded OTLP trace id."},{"in":"query","name":"service","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"severity","schema":{"type":"string","minLength":1,"maxLength":40}},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":500}},{"in":"query","name":"from","schema":{"type":"string","minLength":1,"maxLength":128},"description":"ISO 8601 timestamp (e.g. '2026-05-25T19:00:00Z') or a ClickHouse relative expression (e.g. 'now() - INTERVAL 1 HOUR'). Defaults: from=1h ago, to=now."},{"in":"query","name":"to","schema":{"type":"string","minLength":1,"maxLength":128},"description":"ISO 8601 timestamp (e.g. '2026-05-25T19:00:00Z') or a ClickHouse relative expression (e.g. 'now() - INTERVAL 1 HOUR'). Defaults: from=1h ago, to=now."},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}]}},"/api/v1/projects/{projectId}/metrics":{"get":{"operationId":"getApiV1ProjectsByProjectIdMetrics","tags":["Telemetry read"],"summary":"Query metric data points","description":"Returns metric data points across sum/gauge/histogram tables, filtered by metric name and (optionally) service / time range.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{},"description":"ClickHouse rows. Shape mirrors what the dashboard /explore/* endpoints return."}}}},"400":{"description":"Malformed input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing / wrong-type / revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Resource not found in this org","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"name","schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"description":"Metric name (e.g. 'http.server.duration')."},{"in":"query","name":"service","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"from","schema":{"type":"string","minLength":1,"maxLength":128},"description":"ISO 8601 timestamp (e.g. '2026-05-25T19:00:00Z') or a ClickHouse relative expression (e.g. 'now() - INTERVAL 1 HOUR'). Defaults: from=1h ago, to=now."},{"in":"query","name":"to","schema":{"type":"string","minLength":1,"maxLength":128},"description":"ISO 8601 timestamp (e.g. '2026-05-25T19:00:00Z') or a ClickHouse relative expression (e.g. 'now() - INTERVAL 1 HOUR'). Defaults: from=1h ago, to=now."},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}]}}}}