{"openapi":"3.1.0","info":{"title":"Gecko Security API","version":"1.0.0","description":"Programmatic access to scans, vulnerabilities, repositories, schedules, and scanner image releases. Authenticate with an API key via the `X-API-Key` header or `Authorization: Bearer <key>`."},"servers":[{"url":"/api/v1"}],"security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"doc_url":{"type":"string"},"request_id":{"type":"string"}},"required":["type","code","message","doc_url","request_id"]}},"required":["error"]},"ScanEndpoints":{"type":"object","properties":{"object":{"const":"scan_endpoints"},"scan_id":{"type":"string"},"format":{"type":["string","null"],"enum":["json","yaml",null]},"endpoints":{"type":["string","null"]},"parsed":{}},"required":["object","scan_id","format","endpoints","parsed"]},"Scan":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"scan"},"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"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_done":{"type":"boolean"},"progress":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"programming_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["main","pr","fix"]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull_request_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"vulnerability_counts":{"type":"object","properties":{"critical":{"type":"integer","minimum":0,"maximum":9007199254740991},"high":{"type":"integer","minimum":0,"maximum":9007199254740991},"medium":{"type":"integer","minimum":0,"maximum":9007199254740991},"low":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["critical","high","medium","low","total"],"additionalProperties":false},"created_at":{"type":"string"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","id","name","status","is_done","progress","programming_language","kind","branch","commit_sha","pull_request_number","repository","vulnerability_counts","created_at","ended_at"],"additionalProperties":false},"Vulnerability":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"vulnerability"},"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)$"},"scan_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)$"},"repository_id":{"anyOf":[{"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)$"},{"type":"null"}]},"status":{"type":"string","enum":["open","in_progress","fixed","false_positive","accepted_risk"]},"severity":{"type":"number"},"severity_level":{"type":"string","enum":["critical","high","medium","low"]},"type":{"type":"string"},"cwe":{"type":"string"},"title":{"type":"string"},"short_description":{"type":"string"},"file_path":{"type":"string"},"confidence_score":{"type":"number"},"cvss_vector":{"type":"string"},"created_at":{"type":"string"},"scan":{"type":"object","properties":{"object":{"type":"string","const":"scan"},"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"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_done":{"type":"boolean"},"progress":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"programming_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["main","pr","fix"]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull_request_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"vulnerability_counts":{"type":"object","properties":{"critical":{"type":"integer","minimum":0,"maximum":9007199254740991},"high":{"type":"integer","minimum":0,"maximum":9007199254740991},"medium":{"type":"integer","minimum":0,"maximum":9007199254740991},"low":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["critical","high","medium","low","total"],"additionalProperties":false},"created_at":{"type":"string"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","id","name","status","is_done","progress","programming_language","kind","branch","commit_sha","pull_request_number","repository","vulnerability_counts","created_at","ended_at"],"additionalProperties":false},"repository":{"type":"object","properties":{"object":{"type":"string","const":"repository"},"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)$"},"full_name":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"default_branch":{"type":"string"},"web_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_scan_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"scan_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"open_vulnerability_counts":{"type":"object","properties":{"critical":{"type":"integer","minimum":0,"maximum":9007199254740991},"high":{"type":"integer","minimum":0,"maximum":9007199254740991},"medium":{"type":"integer","minimum":0,"maximum":9007199254740991},"low":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["critical","high","medium","low"],"additionalProperties":false},"created_at":{"type":"string"}},"required":["object","id","full_name","name","provider","default_branch","web_url","last_scan_at","scan_count","open_vulnerability_counts","created_at"],"additionalProperties":false}},"required":["object","id","scan_id","repository_id","status","severity","severity_level","type","cwe","title","short_description","file_path","confidence_score","cvss_vector","created_at"],"additionalProperties":false},"Repository":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"repository"},"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)$"},"full_name":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"default_branch":{"type":"string"},"web_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_scan_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"scan_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"open_vulnerability_counts":{"type":"object","properties":{"critical":{"type":"integer","minimum":0,"maximum":9007199254740991},"high":{"type":"integer","minimum":0,"maximum":9007199254740991},"medium":{"type":"integer","minimum":0,"maximum":9007199254740991},"low":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["critical","high","medium","low"],"additionalProperties":false},"created_at":{"type":"string"}},"required":["object","id","full_name","name","provider","default_branch","web_url","last_scan_at","scan_count","open_vulnerability_counts","created_at"],"additionalProperties":false},"Schedule":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"schedule"},"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"},"repository_ids":{"type":"array","items":{"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)$"}},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"cron_expression":{"type":"string"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"scan_mode":{"type":"string"},"is_active":{"type":"boolean"},"next_run_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["object","id","name","repository_ids","branch","cron_expression","timezone","scan_mode","is_active","next_run_at","last_run_at","created_at"],"additionalProperties":false},"CreateScanRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1},"repository":{"type":"string","minLength":1},"provider":{"type":"string","enum":["github","gitlab"]},"branch":{"type":"string","minLength":1}},"required":["name","repository"],"additionalProperties":false},"TriageVulnerabilityRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["dismiss","accept_risk","reopen","confirm","resolve"]},"reason":{"type":"string","maxLength":2000}},"required":["action"],"additionalProperties":false},"UpdateRepositoryRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fail_on_severity":{"anyOf":[{"type":"string","enum":["critical","high","medium","low"]},{"type":"null"}]}},"additionalProperties":false},"CreateScheduleRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1},"repository_ids":{},"cron_expression":{"type":"string","minLength":1},"branch":{"type":"string","minLength":1},"timezone":{"type":"string","minLength":1},"scan_mode":{"type":"string","enum":["full","diff"]}},"required":["name","repository_ids","cron_expression"],"additionalProperties":false},"UpdateScheduleRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1},"repository_ids":{},"cron_expression":{"type":"string","minLength":1},"branch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"scan_mode":{"type":"string","enum":["full","diff"]},"is_active":{"type":"boolean"}},"additionalProperties":false},"ImageRelease":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"image_release"},"channel":{"type":"string","enum":["bx","bx-staging"]},"version":{"type":"string"},"git_sha":{"type":"string"},"image_digest":{"type":"string"},"image_uri":{"type":"string"},"image_ref":{"type":"string"},"pull_command":{"type":"string"},"pushed_at":{"type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","channel","version","git_sha","image_digest","image_uri","image_ref","pull_command","pushed_at","notes"],"additionalProperties":false}}},"paths":{"/scans":{"get":{"summary":"List scans","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"created_after","in":"query","schema":{"type":"string"}},{"name":"created_before","in":"query","schema":{"type":"string"}},{"name":"pull_request","in":"query","schema":{"type":"integer","minimum":1},"description":"Filter to the PR/MR with this number; combine with `repository` to disambiguate across repos."},{"name":"repository","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A list of scans","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Scan"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Trigger a scan (GitHub or GitLab)","parameters":[{"name":"Idempotency-Key","in":"header","description":"Safely retry a POST/PATCH; a replayed key returns the original response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScanRequest"}}}},"responses":{"201":{"description":"Scan created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scan"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scans/{id}":{"get":{"summary":"Get a scan","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scan"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scans/{id}/vulnerabilities":{"get":{"summary":"List a scan's vulnerabilities","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"severity","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"cwe","in":"query","schema":{"type":"string"}},{"name":"created_after","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"expand","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A list of vulnerabilities","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Vulnerability"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scans/{id}/endpoints":{"get":{"summary":"Get the API spec discovered by a scan","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Endpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanEndpoints"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scans/{id}/wiki":{"get":{"summary":"Get a scan's wiki (markdown)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Markdown wiki","content":{"text/markdown":{}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vulnerabilities":{"get":{"summary":"List vulnerabilities","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"severity","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"cwe","in":"query","schema":{"type":"string"}},{"name":"created_after","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"expand","in":"query","schema":{"type":"string"}},{"name":"repository","in":"query","schema":{"type":"string"}},{"name":"scan_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"pull_request","in":"query","schema":{"type":"integer","minimum":1},"description":"Filter to the PR/MR with this number; combine with `repository` to disambiguate across repos."}],"responses":{"200":{"description":"A list of vulnerabilities","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Vulnerability"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vulnerabilities/{id}":{"get":{"summary":"Get a vulnerability","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vulnerability"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Triage a vulnerability","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Safely retry a POST/PATCH; a replayed key returns the original response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriageVulnerabilityRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vulnerability"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories":{"get":{"summary":"List repositories","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A list of repositories","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Repository"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{repository_id}":{"get":{"summary":"Get a repository by id","parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Repository id (from any repository resource) — the collision-free canonical address."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update repository settings by id","parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Repository id (from any repository resource) — the collision-free canonical address."},{"name":"Idempotency-Key","in":"header","description":"Safely retry a POST/PATCH; a replayed key returns the original response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRepositoryRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{repository_id}/vulnerabilities":{"get":{"summary":"List a repository's vulnerabilities by repository id","parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Repository id (from any repository resource) — the collision-free canonical address."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"severity","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"cwe","in":"query","schema":{"type":"string"}},{"name":"created_after","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"expand","in":"query","schema":{"type":"string"}},{"name":"pull_request","in":"query","schema":{"type":"integer","minimum":1},"description":"Filter to the PR/MR with this number; combine with `repository` to disambiguate across repos."}],"responses":{"200":{"description":"A list of vulnerabilities","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Vulnerability"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{repository_id}/scans":{"get":{"summary":"List a repository's scans by repository id","parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Repository id (from any repository resource) — the collision-free canonical address."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"created_after","in":"query","schema":{"type":"string"}},{"name":"created_before","in":"query","schema":{"type":"string"}},{"name":"pull_request","in":"query","schema":{"type":"integer","minimum":1},"description":"Filter to the PR/MR with this number; combine with `repository` to disambiguate across repos."}],"responses":{"200":{"description":"A list of scans","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Scan"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{owner}/{repo}":{"get":{"summary":"Get a repository","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string"},"description":"Repository name; may contain `/` segments for GitLab subgroup paths. A name whose final segment is literally `scans` or `vulnerabilities` collides with the sub-resource routes — address that repository by id instead."},{"name":"provider","in":"query","schema":{"type":"string","enum":["github","gitlab","zip"]},"description":"Disambiguates when the same full name is tracked on multiple providers."},{"name":"resource","in":"query","schema":{"type":"string","enum":["repository"]},"description":"Pass `repository` to pin the whole path as the repository name when it ends in `scans` or `vulnerabilities`."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update repository settings","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string"},"description":"Repository name; may contain `/` segments for GitLab subgroup paths. A name whose final segment is literally `scans` or `vulnerabilities` collides with the sub-resource routes — address that repository by id instead."},{"name":"provider","in":"query","schema":{"type":"string","enum":["github","gitlab","zip"]},"description":"Disambiguates when the same full name is tracked on multiple providers."},{"name":"resource","in":"query","schema":{"type":"string","enum":["repository"]},"description":"Pass `repository` to pin the whole path as the repository name when it ends in `scans` or `vulnerabilities`."},{"name":"Idempotency-Key","in":"header","description":"Safely retry a POST/PATCH; a replayed key returns the original response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRepositoryRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{owner}/{repo}/vulnerabilities":{"get":{"summary":"List a repository's vulnerabilities","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string"},"description":"Repository name; may contain `/` segments for GitLab subgroup paths. A name whose final segment is literally `scans` or `vulnerabilities` collides with the sub-resource routes — address that repository by id instead."},{"name":"provider","in":"query","schema":{"type":"string","enum":["github","gitlab","zip"]},"description":"Disambiguates when the same full name is tracked on multiple providers."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"severity","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"cwe","in":"query","schema":{"type":"string"}},{"name":"created_after","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"expand","in":"query","schema":{"type":"string"}},{"name":"pull_request","in":"query","schema":{"type":"integer","minimum":1},"description":"Filter to the PR/MR with this number; combine with `repository` to disambiguate across repos."}],"responses":{"200":{"description":"A list of vulnerabilities","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Vulnerability"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{owner}/{repo}/scans":{"get":{"summary":"List a repository's scans","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string"},"description":"Repository name; may contain `/` segments for GitLab subgroup paths. A name whose final segment is literally `scans` or `vulnerabilities` collides with the sub-resource routes — address that repository by id instead."},{"name":"provider","in":"query","schema":{"type":"string","enum":["github","gitlab","zip"]},"description":"Disambiguates when the same full name is tracked on multiple providers."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"created_after","in":"query","schema":{"type":"string"}},{"name":"created_before","in":"query","schema":{"type":"string"}},{"name":"pull_request","in":"query","schema":{"type":"integer","minimum":1},"description":"Filter to the PR/MR with this number; combine with `repository` to disambiguate across repos."}],"responses":{"200":{"description":"A list of scans","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Scan"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/schedules":{"get":{"summary":"List schedules","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A list of schedules","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a schedule","parameters":[{"name":"Idempotency-Key","in":"header","description":"Safely retry a POST/PATCH; a replayed key returns the original response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleRequest"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/schedules/{id}":{"get":{"summary":"Get a schedule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a schedule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Safely retry a POST/PATCH; a replayed key returns the original response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduleRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a schedule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/releases/{channel}":{"get":{"summary":"List image releases for a channel","description":"Newest-first history of published scanner images. Pin pulls to the returned digest-pinned `image_ref`, never a mutable tag. Only public channels are listed here — other channel names return `not_found`.","parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","enum":["bx"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A list of image releases","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ImageRelease"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"]}},"required":["object","data","pagination"]}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/releases/{channel}/latest":{"get":{"summary":"Get the latest image release for a channel","description":"Only public channels are listed here — other channel names return `not_found`.","parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","enum":["bx"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRelease"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}