openapi: 3.2.0 info: title: V12 Runs API version: 2.0.0 description: Findings, runs and context documents of one V12 organization. Every path but /me sits under /orgs/{org}, where {org} is the organization's slug (GET /me returns it); a token reaches only its own organization, and any other slug answers 404. servers: - url: https://v12.sh/api/v2 tags: - name: Runs paths: /orgs/{org}/runs: get: operationId: listRuns summary: List runs description: 'Runs of the organization, newest first. state filters raw states (failed alone misses compilation_failed and analysis_failed); phase filters the phase each run reports. With phase, a page can hold fewer than limit items: keep following nextCursor.' tags: - Runs security: - bearer: [] - oauth2: - runs:read x-mcp-tool: list_runs parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: repository in: query required: false schema: type: string pattern: ^[^/\s]+\/[^/\s]+$ description: Repository slug or full name, "owner/name". - name: steer in: query required: false schema: type: string minLength: 1 maxLength: 200 description: Steer slug. - name: state in: query required: false schema: minItems: 1 maxItems: 11 type: array items: type: string enum: - queued - in_progress - compilation_in_progress - compilation_completed - compilation_failed - analysis_in_progress - analysis_completed - analysis_failed - complete - failed - cancelled style: form explode: false - name: phase in: query required: false schema: minItems: 1 maxItems: 5 type: array items: type: string enum: - before - live - complete - failed - cancelled style: form explode: false - name: limit in: query required: false schema: default: 50 type: integer minimum: 1 maximum: 100 - name: cursor in: query required: false schema: type: string minLength: 1 maxLength: 2048 description: '`nextCursor` from the previous page.' responses: '200': description: List runs content: application/json: schema: type: object properties: nextCursor: anyOf: - type: string - type: 'null' items: type: array items: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 title: type: string state: type: string enum: - queued - in_progress - compilation_in_progress - compilation_completed - compilation_failed - analysis_in_progress - analysis_completed - analysis_failed - complete - failed - cancelled phase: type: string enum: - before - live - complete - failed - cancelled terminal: type: boolean createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ startedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' endedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' source: anyOf: - type: string enum: - repository - upload - type: 'null' description: 'Where the reviewed code came from: a repository or an uploaded archive. Null when V12 records neither.' repository: anyOf: - type: object properties: fullName: type: string required: - fullName additionalProperties: false - type: 'null' description: The reviewed repository; null for an upload, or when V12 records none. ref: anyOf: - type: string - type: 'null' sha: anyOf: - type: string - type: 'null' extraRepositories: type: integer minimum: 0 maximum: 9007199254740991 retryOf: anyOf: - type: integer exclusiveMinimum: 0 maximum: 9007199254740991 - type: 'null' trigger: type: object properties: kind: type: string enum: - manual - rule - actor description: anyOf: - type: string - type: 'null' login: anyOf: - type: string - type: 'null' required: - kind - description - login additionalProperties: false costCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 findings: anyOf: - type: object properties: count: type: integer minimum: 0 maximum: 9007199254740991 bySeverity: type: object propertyNames: type: string enum: - info - low - medium - high - critical additionalProperties: type: integer minimum: 0 maximum: 9007199254740991 required: - info - low - medium - high - critical required: - count - bySeverity additionalProperties: false - type: 'null' error: anyOf: - type: string - type: 'null' webUrl: type: string required: - number - title - state - phase - terminal - createdAt - startedAt - endedAt - source - repository - ref - sha - extraRepositories - retryOf - trigger - costCents - findings - error - webUrl additionalProperties: false required: - nextCursor - items additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' post: operationId: startRun summary: Start a run description: 'Start a paid run. Send the quote from estimate_run and a maxPriceCents the user approved; the run is refused when its price exceeds it. A repeated Idempotency-Key (REST) or requestId (MCP) returns the original response with replayed: true. A replay, or a start refused for its quote, repository, price or documents, spends nothing from the start limit; a start that reaches billing counts even if billing then refuses it. Without a quote, the estimate the start makes counts toward the estimate limit.' tags: - Runs security: - bearer: [] - oauth2: - runs:write x-mcp-tool: start_run parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: Idempotency-Key in: header required: false description: 'Repeat a request safely: the same key and body return the original result.' schema: type: string minLength: 1 maxLength: 255 requestBody: required: true content: application/json: schema: type: object additionalProperties: false properties: repository: type: string pattern: ^[^/\s]+\/[^/\s]+$ description: Repository slug or full name, "owner/name". at: description: Full review position (default "default"). Mutually exclusive with change. type: string maxLength: 512 change: description: 'Review a change: { pr } or { branch, since? }.' anyOf: - type: object properties: pr: type: integer exclusiveMinimum: 0 maximum: 2147483647 required: - pr additionalProperties: false - type: object properties: branch: type: string minLength: 1 maxLength: 255 since: description: Base commit; omitted means the merge base. type: string pattern: ^[0-9a-fA-F]{40}$ required: - branch additionalProperties: false steers: description: Saved Steers whose documents guide the run. maxItems: 5 type: array items: type: string minLength: 1 maxLength: 200 description: Steer slug. scope: description: 'Folders (ending in /) and files to review, relative to the repository root. Required for a full review: V12 reviews only what it names, and refuses a path that names no file it reviews at the position.' maxItems: 200 type: array items: type: string minLength: 1 maxLength: 1024 repositories: description: Extra repositories reviewed alongside; full reviews only. maxItems: 8 type: array items: type: object properties: repository: type: string pattern: ^[^/\s]+\/[^/\s]+$ description: Repository slug or full name, "owner/name". at: type: string maxLength: 512 description: 'Repository position: "default", "branch:[@]", "pr:[@]" or "commit:". Omitted means "default".' scope: description: 'Folders (ending in /) and files to review, relative to the repository root. Required for a full review: V12 reviews only what it names, and refuses a path that names no file it reviews at the position.' maxItems: 200 type: array items: type: string minLength: 1 maxLength: 1024 required: - repository additionalProperties: false steering: description: Instructions for the reviewers. type: string maxLength: 65536 documents: 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)$ description: Context document id. maxPriceCents: type: integer minimum: 0 maximum: 9007199254740991 description: Highest price, in cents, the caller accepts. quote: type: string minLength: 1 maxLength: 4096 required: - repository - maxPriceCents responses: '200': description: The original result of a replayed request content: application/json: schema: type: object properties: run: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 title: type: string state: type: string enum: - queued - in_progress - compilation_in_progress - compilation_completed - compilation_failed - analysis_in_progress - analysis_completed - analysis_failed - complete - failed - cancelled phase: type: string enum: - before - live - complete - failed - cancelled terminal: type: boolean createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ startedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' endedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' source: anyOf: - type: string enum: - repository - upload - type: 'null' description: 'Where the reviewed code came from: a repository or an uploaded archive. Null when V12 records neither.' repository: anyOf: - type: object properties: fullName: type: string required: - fullName additionalProperties: false - type: 'null' description: The reviewed repository; null for an upload, or when V12 records none. ref: anyOf: - type: string - type: 'null' sha: anyOf: - type: string - type: 'null' extraRepositories: type: integer minimum: 0 maximum: 9007199254740991 retryOf: anyOf: - type: integer exclusiveMinimum: 0 maximum: 9007199254740991 - type: 'null' trigger: type: object properties: kind: type: string enum: - manual - rule - actor description: anyOf: - type: string - type: 'null' login: anyOf: - type: string - type: 'null' required: - kind - description - login additionalProperties: false costCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 findings: anyOf: - type: object properties: count: type: integer minimum: 0 maximum: 9007199254740991 bySeverity: type: object propertyNames: type: string enum: - info - low - medium - high - critical additionalProperties: type: integer minimum: 0 maximum: 9007199254740991 required: - info - low - medium - high - critical required: - count - bySeverity additionalProperties: false - type: 'null' error: anyOf: - type: string - type: 'null' webUrl: type: string kind: type: string enum: - full - change cancellationRequested: type: boolean steers: type: array items: type: object properties: slug: type: string title: type: string revision: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - slug - title - revision additionalProperties: false description: The Steers the run carried, in order, with the revision each was read at. change: anyOf: - type: object properties: pullRequest: anyOf: - type: object properties: number: type: integer minimum: -9007199254740991 maximum: 9007199254740991 title: type: string url: type: string state: type: string enum: - open - merged - closed - draft required: - number - title - url - state additionalProperties: false - type: 'null' head: type: object properties: ref: type: string sha: type: string required: - ref - sha additionalProperties: false base: type: object properties: ref: type: string sha: type: string required: - ref - sha additionalProperties: false required: - pullRequest - head - base additionalProperties: false - type: 'null' repositories: type: array items: type: object properties: fullName: type: string sha: anyOf: - type: string - type: 'null' ref: anyOf: - type: string - type: 'null' files: type: integer minimum: 0 maximum: 9007199254740991 lines: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' paths: type: array items: type: string required: - fullName - sha - ref - files - lines - paths additionalProperties: false stage: anyOf: - type: string enum: - queue - prepare - scan - review - triage - prove - report - inbox - type: 'null' stages: type: array items: type: object properties: id: type: string state: type: string enum: - done - now - next - failed - stopped - skipped description: '"now" is the stage in progress; the inbox stage is "done" once findings reached it (a partial import too), "failed" when the import failed (see error) and "skipped" when nothing was imported.' detail: anyOf: - type: string - type: 'null' error: anyOf: - type: string - type: 'null' durationMs: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' progress: anyOf: - type: object properties: done: type: integer minimum: 0 maximum: 9007199254740991 total: type: integer minimum: 0 maximum: 9007199254740991 required: - done - total additionalProperties: false - type: 'null' required: - id - state - detail - error - durationMs - progress additionalProperties: false import: type: object properties: state: type: string enum: - none - available - repository-not-added - repository-access-unavailable - pending - repository-failed - importing - failed - skipped - imported - partial - tickets-unavailable count: type: integer minimum: 0 maximum: 9007199254740991 reason: anyOf: - type: string enum: - source-import-failed - platform-unavailable - organizer-failed - organizer-disabled - stalled - internal-error - unsupported-source-kind - unsupported-provider - missing-repository-registration - platform-link-not-active - platform-link-incomplete - provider-identity-mismatch - missing-revision - duplicate-repository-source - repository-unreachable - repository-not-public - public-reader-unavailable - github-not-connected - revision-unavailable - platform-refused - missing-description - missing-severity - no-source-locations - unknown-source-id - source-not-importable - ambiguous-repository-source - target-already-imported - invalid-finding - type: 'null' description: 'Why: the failure code when state is "failed". When it is "skipped" or "partial", the reason recorded by the first repository left out, else by most of the findings left out, else why findings could not be placed on a ticket. Null for every other state, and when none was recorded.' required: - state - count - reason additionalProperties: false publicUrl: anyOf: - type: string - type: 'null' pullRequestCommentUrl: anyOf: - type: string - type: 'null' required: - number - title - state - phase - terminal - createdAt - startedAt - endedAt - source - repository - ref - sha - extraRepositories - retryOf - trigger - costCents - findings - error - webUrl - kind - cancellationRequested - steers - change - repositories - stage - stages - import - publicUrl - pullRequestCommentUrl additionalProperties: false priceCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 replayed: type: boolean description: 'True when this answers a retried requestId (MCP) or Idempotency-Key (REST): run is the run as it was when it started; read get_run for its current state.' required: - run - priceCents - replayed additionalProperties: false '201': description: Start a run content: application/json: schema: type: object properties: run: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 title: type: string state: type: string enum: - queued - in_progress - compilation_in_progress - compilation_completed - compilation_failed - analysis_in_progress - analysis_completed - analysis_failed - complete - failed - cancelled phase: type: string enum: - before - live - complete - failed - cancelled terminal: type: boolean createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ startedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' endedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' source: anyOf: - type: string enum: - repository - upload - type: 'null' description: 'Where the reviewed code came from: a repository or an uploaded archive. Null when V12 records neither.' repository: anyOf: - type: object properties: fullName: type: string required: - fullName additionalProperties: false - type: 'null' description: The reviewed repository; null for an upload, or when V12 records none. ref: anyOf: - type: string - type: 'null' sha: anyOf: - type: string - type: 'null' extraRepositories: type: integer minimum: 0 maximum: 9007199254740991 retryOf: anyOf: - type: integer exclusiveMinimum: 0 maximum: 9007199254740991 - type: 'null' trigger: type: object properties: kind: type: string enum: - manual - rule - actor description: anyOf: - type: string - type: 'null' login: anyOf: - type: string - type: 'null' required: - kind - description - login additionalProperties: false costCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 findings: anyOf: - type: object properties: count: type: integer minimum: 0 maximum: 9007199254740991 bySeverity: type: object propertyNames: type: string enum: - info - low - medium - high - critical additionalProperties: type: integer minimum: 0 maximum: 9007199254740991 required: - info - low - medium - high - critical required: - count - bySeverity additionalProperties: false - type: 'null' error: anyOf: - type: string - type: 'null' webUrl: type: string kind: type: string enum: - full - change cancellationRequested: type: boolean steers: type: array items: type: object properties: slug: type: string title: type: string revision: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - slug - title - revision additionalProperties: false description: The Steers the run carried, in order, with the revision each was read at. change: anyOf: - type: object properties: pullRequest: anyOf: - type: object properties: number: type: integer minimum: -9007199254740991 maximum: 9007199254740991 title: type: string url: type: string state: type: string enum: - open - merged - closed - draft required: - number - title - url - state additionalProperties: false - type: 'null' head: type: object properties: ref: type: string sha: type: string required: - ref - sha additionalProperties: false base: type: object properties: ref: type: string sha: type: string required: - ref - sha additionalProperties: false required: - pullRequest - head - base additionalProperties: false - type: 'null' repositories: type: array items: type: object properties: fullName: type: string sha: anyOf: - type: string - type: 'null' ref: anyOf: - type: string - type: 'null' files: type: integer minimum: 0 maximum: 9007199254740991 lines: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' paths: type: array items: type: string required: - fullName - sha - ref - files - lines - paths additionalProperties: false stage: anyOf: - type: string enum: - queue - prepare - scan - review - triage - prove - report - inbox - type: 'null' stages: type: array items: type: object properties: id: type: string state: type: string enum: - done - now - next - failed - stopped - skipped description: '"now" is the stage in progress; the inbox stage is "done" once findings reached it (a partial import too), "failed" when the import failed (see error) and "skipped" when nothing was imported.' detail: anyOf: - type: string - type: 'null' error: anyOf: - type: string - type: 'null' durationMs: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' progress: anyOf: - type: object properties: done: type: integer minimum: 0 maximum: 9007199254740991 total: type: integer minimum: 0 maximum: 9007199254740991 required: - done - total additionalProperties: false - type: 'null' required: - id - state - detail - error - durationMs - progress additionalProperties: false import: type: object properties: state: type: string enum: - none - available - repository-not-added - repository-access-unavailable - pending - repository-failed - importing - failed - skipped - imported - partial - tickets-unavailable count: type: integer minimum: 0 maximum: 9007199254740991 reason: anyOf: - type: string enum: - source-import-failed - platform-unavailable - organizer-failed - organizer-disabled - stalled - internal-error - unsupported-source-kind - unsupported-provider - missing-repository-registration - platform-link-not-active - platform-link-incomplete - provider-identity-mismatch - missing-revision - duplicate-repository-source - repository-unreachable - repository-not-public - public-reader-unavailable - github-not-connected - revision-unavailable - platform-refused - missing-description - missing-severity - no-source-locations - unknown-source-id - source-not-importable - ambiguous-repository-source - target-already-imported - invalid-finding - type: 'null' description: 'Why: the failure code when state is "failed". When it is "skipped" or "partial", the reason recorded by the first repository left out, else by most of the findings left out, else why findings could not be placed on a ticket. Null for every other state, and when none was recorded.' required: - state - count - reason additionalProperties: false publicUrl: anyOf: - type: string - type: 'null' pullRequestCommentUrl: anyOf: - type: string - type: 'null' required: - number - title - state - phase - terminal - createdAt - startedAt - endedAt - source - repository - ref - sha - extraRepositories - retryOf - trigger - costCents - findings - error - webUrl - kind - cancellationRequested - steers - change - repositories - stage - stages - import - publicUrl - pullRequestCommentUrl additionalProperties: false priceCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 replayed: type: boolean description: 'True when this answers a retried requestId (MCP) or Idempotency-Key (REST): run is the run as it was when it started; read get_run for its current state.' required: - run - priceCents - replayed additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '402': description: Not enough credits, or the monthly spending limit is reached content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '413': description: The body exceeds 1 MiB content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '415': description: The body is not application/json content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' /orgs/{org}/runs/{run}: get: operationId: getRun summary: Get a run description: One run with its stages, progress, cost and finding import state. A failed or partial import says why in import.reason and on the inbox stage. import.count counts the run's reports; a report can join an existing finding, whose status (for example a won't-fix decision) then applies. tags: - Runs security: - bearer: [] - oauth2: - runs:read x-mcp-tool: get_run parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: run in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Run number within the organization, e.g. 12. responses: '200': description: Get a run content: application/json: schema: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 title: type: string state: type: string enum: - queued - in_progress - compilation_in_progress - compilation_completed - compilation_failed - analysis_in_progress - analysis_completed - analysis_failed - complete - failed - cancelled phase: type: string enum: - before - live - complete - failed - cancelled terminal: type: boolean createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ startedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' endedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' source: anyOf: - type: string enum: - repository - upload - type: 'null' description: 'Where the reviewed code came from: a repository or an uploaded archive. Null when V12 records neither.' repository: anyOf: - type: object properties: fullName: type: string required: - fullName additionalProperties: false - type: 'null' description: The reviewed repository; null for an upload, or when V12 records none. ref: anyOf: - type: string - type: 'null' sha: anyOf: - type: string - type: 'null' extraRepositories: type: integer minimum: 0 maximum: 9007199254740991 retryOf: anyOf: - type: integer exclusiveMinimum: 0 maximum: 9007199254740991 - type: 'null' trigger: type: object properties: kind: type: string enum: - manual - rule - actor description: anyOf: - type: string - type: 'null' login: anyOf: - type: string - type: 'null' required: - kind - description - login additionalProperties: false costCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 findings: anyOf: - type: object properties: count: type: integer minimum: 0 maximum: 9007199254740991 bySeverity: type: object propertyNames: type: string enum: - info - low - medium - high - critical additionalProperties: type: integer minimum: 0 maximum: 9007199254740991 required: - info - low - medium - high - critical required: - count - bySeverity additionalProperties: false - type: 'null' error: anyOf: - type: string - type: 'null' webUrl: type: string kind: type: string enum: - full - change cancellationRequested: type: boolean steers: type: array items: type: object properties: slug: type: string title: type: string revision: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - slug - title - revision additionalProperties: false description: The Steers the run carried, in order, with the revision each was read at. change: anyOf: - type: object properties: pullRequest: anyOf: - type: object properties: number: type: integer minimum: -9007199254740991 maximum: 9007199254740991 title: type: string url: type: string state: type: string enum: - open - merged - closed - draft required: - number - title - url - state additionalProperties: false - type: 'null' head: type: object properties: ref: type: string sha: type: string required: - ref - sha additionalProperties: false base: type: object properties: ref: type: string sha: type: string required: - ref - sha additionalProperties: false required: - pullRequest - head - base additionalProperties: false - type: 'null' repositories: type: array items: type: object properties: fullName: type: string sha: anyOf: - type: string - type: 'null' ref: anyOf: - type: string - type: 'null' files: type: integer minimum: 0 maximum: 9007199254740991 lines: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' paths: type: array items: type: string required: - fullName - sha - ref - files - lines - paths additionalProperties: false stage: anyOf: - type: string enum: - queue - prepare - scan - review - triage - prove - report - inbox - type: 'null' stages: type: array items: type: object properties: id: type: string state: type: string enum: - done - now - next - failed - stopped - skipped description: '"now" is the stage in progress; the inbox stage is "done" once findings reached it (a partial import too), "failed" when the import failed (see error) and "skipped" when nothing was imported.' detail: anyOf: - type: string - type: 'null' error: anyOf: - type: string - type: 'null' durationMs: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' progress: anyOf: - type: object properties: done: type: integer minimum: 0 maximum: 9007199254740991 total: type: integer minimum: 0 maximum: 9007199254740991 required: - done - total additionalProperties: false - type: 'null' required: - id - state - detail - error - durationMs - progress additionalProperties: false import: type: object properties: state: type: string enum: - none - available - repository-not-added - repository-access-unavailable - pending - repository-failed - importing - failed - skipped - imported - partial - tickets-unavailable count: type: integer minimum: 0 maximum: 9007199254740991 reason: anyOf: - type: string enum: - source-import-failed - platform-unavailable - organizer-failed - organizer-disabled - stalled - internal-error - unsupported-source-kind - unsupported-provider - missing-repository-registration - platform-link-not-active - platform-link-incomplete - provider-identity-mismatch - missing-revision - duplicate-repository-source - repository-unreachable - repository-not-public - public-reader-unavailable - github-not-connected - revision-unavailable - platform-refused - missing-description - missing-severity - no-source-locations - unknown-source-id - source-not-importable - ambiguous-repository-source - target-already-imported - invalid-finding - type: 'null' description: 'Why: the failure code when state is "failed". When it is "skipped" or "partial", the reason recorded by the first repository left out, else by most of the findings left out, else why findings could not be placed on a ticket. Null for every other state, and when none was recorded.' required: - state - count - reason additionalProperties: false publicUrl: anyOf: - type: string - type: 'null' pullRequestCommentUrl: anyOf: - type: string - type: 'null' required: - number - title - state - phase - terminal - createdAt - startedAt - endedAt - source - repository - ref - sha - extraRepositories - retryOf - trigger - costCents - findings - error - webUrl - kind - cancellationRequested - steers - change - repositories - stage - stages - import - publicUrl - pullRequestCommentUrl additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' /orgs/{org}/runs/{run}/findings: get: operationId: listRunFindings summary: List a run's findings description: 'Findings a completed run added to the inbox, positioned at each repository''s analyzed commit; send position.at together with its repositories[i].repository for positioned reads. Without repository, inference reports repository_required if several registered repositories hold the finding at that position. Status and codeState describe that commit, not today''s default head. Empty until import.state is "imported" or "partial"; a partial import lists only the findings that reached the inbox, and import.reason says why the rest did not. A finding can predate the run: runs lists every run that reported it.' tags: - Runs security: - bearer: [] - oauth2: - runs:read - findings:read x-mcp-tool: list_run_findings parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: run in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Run number within the organization, e.g. 12. - name: limit in: query required: false schema: default: 50 type: integer minimum: 1 maximum: 100 - name: cursor in: query required: false schema: type: string minLength: 1 maxLength: 2048 description: '`nextCursor` from the previous page.' responses: '200': description: List a run's findings content: application/json: schema: type: object properties: nextCursor: anyOf: - type: string - type: 'null' items: type: array items: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 description: Number within the organization, e.g. 42. key: type: string description: Display key, e.g. "F-42". title: type: string severity: type: string enum: - info - low - medium - high - critical status: type: string enum: - open - investigating - fixed - wont-fix - false-positive - duplicate investigating: type: boolean decision: anyOf: - type: object properties: kind: type: string enum: - wont-fix - risk-accepted reason: type: string required: - kind - reason additionalProperties: false - type: 'null' duplicateOf: anyOf: - type: string - type: 'null' description: Key of the finding this one duplicates. assignee: anyOf: - type: object properties: username: anyOf: - type: string - type: 'null' email: anyOf: - type: string - type: 'null' required: - username - email additionalProperties: false - type: 'null' steer: anyOf: - type: object properties: slug: type: string title: type: string required: - slug - title additionalProperties: false - type: 'null' firstObservedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ reportCount: type: integer minimum: 0 maximum: 9007199254740991 sources: type: array items: type: string enum: - agent - user - integration runs: type: array items: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 repositories: type: array items: type: object properties: repository: type: object properties: slug: type: string fullName: type: string required: - slug - fullName additionalProperties: false position: type: object properties: at: type: string description: Pinned position; send it back to stay on this commit. kind: type: string enum: - branch - pull-request - commit branch: anyOf: - type: string - type: 'null' pullRequest: anyOf: - type: integer minimum: -9007199254740991 maximum: 9007199254740991 - type: 'null' sha: type: string isDefault: type: boolean required: - at - kind - branch - pullRequest - sha - isDefault additionalProperties: false codeState: type: string enum: - present - needs-check - absent - conflicting - false-positive paths: anyOf: - type: array items: type: string - type: 'null' comparison: anyOf: - type: string enum: - not-compared - introduced-here - inherited-from-base - type: 'null' required: - repository - position - codeState - paths - comparison additionalProperties: false webUrl: type: string required: - number - key - title - severity - status - investigating - decision - duplicateOf - assignee - steer - firstObservedAt - reportCount - sources - runs - repositories - webUrl additionalProperties: false import: type: object properties: state: type: string enum: - none - available - repository-not-added - repository-access-unavailable - pending - repository-failed - importing - failed - skipped - imported - partial - tickets-unavailable count: type: integer minimum: 0 maximum: 9007199254740991 reason: anyOf: - type: string enum: - source-import-failed - platform-unavailable - organizer-failed - organizer-disabled - stalled - internal-error - unsupported-source-kind - unsupported-provider - missing-repository-registration - platform-link-not-active - platform-link-incomplete - provider-identity-mismatch - missing-revision - duplicate-repository-source - repository-unreachable - repository-not-public - public-reader-unavailable - github-not-connected - revision-unavailable - platform-refused - missing-description - missing-severity - no-source-locations - unknown-source-id - source-not-importable - ambiguous-repository-source - target-already-imported - invalid-finding - type: 'null' description: 'Why: the failure code when state is "failed". When it is "skipped" or "partial", the reason recorded by the first repository left out, else by most of the findings left out, else why findings could not be placed on a ticket. Null for every other state, and when none was recorded.' required: - state - count - reason additionalProperties: false asOf: anyOf: - type: integer minimum: -9007199254740991 maximum: 9007199254740991 - type: 'null' required: - nextCursor - items - import - asOf additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' /orgs/{org}/runs/estimate: post: operationId: estimateRun summary: Estimate a run description: Price a full review (at) or a change review (change) without starting it. Returns a quote to pass to start_run within 15 minutes. targets[].paths (or change.paths) lists up to 500 in-scope paths. tags: - Runs security: - bearer: [] - oauth2: - runs:write x-mcp-tool: estimate_run parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string requestBody: required: true content: application/json: schema: type: object additionalProperties: false properties: repository: type: string pattern: ^[^/\s]+\/[^/\s]+$ description: Repository slug or full name, "owner/name". at: description: Full review position (default "default"). Mutually exclusive with change. type: string maxLength: 512 change: description: 'Review a change: { pr } or { branch, since? }.' anyOf: - type: object properties: pr: type: integer exclusiveMinimum: 0 maximum: 2147483647 required: - pr additionalProperties: false - type: object properties: branch: type: string minLength: 1 maxLength: 255 since: description: Base commit; omitted means the merge base. type: string pattern: ^[0-9a-fA-F]{40}$ required: - branch additionalProperties: false steers: description: Saved Steers whose documents guide the run. maxItems: 5 type: array items: type: string minLength: 1 maxLength: 200 description: Steer slug. scope: description: 'Folders (ending in /) and files to review, relative to the repository root. Required for a full review: V12 reviews only what it names, and refuses a path that names no file it reviews at the position.' maxItems: 200 type: array items: type: string minLength: 1 maxLength: 1024 repositories: description: Extra repositories reviewed alongside; full reviews only. maxItems: 8 type: array items: type: object properties: repository: type: string pattern: ^[^/\s]+\/[^/\s]+$ description: Repository slug or full name, "owner/name". at: type: string maxLength: 512 description: 'Repository position: "default", "branch:[@]", "pr:[@]" or "commit:". Omitted means "default".' scope: description: 'Folders (ending in /) and files to review, relative to the repository root. Required for a full review: V12 reviews only what it names, and refuses a path that names no file it reviews at the position.' maxItems: 200 type: array items: type: string minLength: 1 maxLength: 1024 required: - repository additionalProperties: false steering: description: Instructions for the reviewers. type: string maxLength: 65536 documents: 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)$ description: Context document id. required: - repository responses: '200': description: Estimate a run content: application/json: schema: type: object properties: kind: type: string enum: - full - change priceCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 balanceCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 targets: type: array items: type: object properties: repository: type: object properties: slug: type: string fullName: type: string required: - slug - fullName additionalProperties: false sha: type: string files: type: integer minimum: 0 maximum: 9007199254740991 lines: type: integer minimum: 0 maximum: 9007199254740991 paths: type: array items: type: string description: In-scope paths, sorted; at most 500 (files counts them all). required: - repository - sha - files - lines - paths additionalProperties: false steerRevisions: type: object propertyNames: type: string additionalProperties: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The revision of every requested Steer, by slug. change: anyOf: - type: object properties: from: type: string to: type: string files: type: integer minimum: 0 maximum: 9007199254740991 commits: type: integer minimum: 0 maximum: 9007199254740991 pullRequest: anyOf: - type: integer minimum: -9007199254740991 maximum: 9007199254740991 - type: 'null' paths: type: array items: type: string description: In-scope paths, sorted; at most 500 (files counts them all). required: - from - to - files - commits - pullRequest - paths additionalProperties: false - type: 'null' quote: type: string description: Pass to start_run / POST /runs within 15 minutes. expiresAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - kind - priceCents - balanceCents - targets - steerRevisions - change - quote - expiresAt additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '413': description: The body exceeds 1 MiB content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '415': description: The body is not application/json content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' /orgs/{org}/runs/{run}/cancel: post: operationId: cancelRun summary: Cancel a run description: Cancel a queued or running run. A run that has already started stops at its next checkpoint (result "cancelling"). tags: - Runs security: - bearer: [] - oauth2: - runs:manage x-mcp-tool: cancel_run parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: run in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Run number within the organization, e.g. 12. requestBody: required: true content: application/json: schema: type: object additionalProperties: false properties: {} required: [] responses: '200': description: Cancel a run content: application/json: schema: type: object properties: run: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 title: type: string state: type: string enum: - queued - in_progress - compilation_in_progress - compilation_completed - compilation_failed - analysis_in_progress - analysis_completed - analysis_failed - complete - failed - cancelled phase: type: string enum: - before - live - complete - failed - cancelled terminal: type: boolean createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ startedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' endedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' source: anyOf: - type: string enum: - repository - upload - type: 'null' description: 'Where the reviewed code came from: a repository or an uploaded archive. Null when V12 records neither.' repository: anyOf: - type: object properties: fullName: type: string required: - fullName additionalProperties: false - type: 'null' description: The reviewed repository; null for an upload, or when V12 records none. ref: anyOf: - type: string - type: 'null' sha: anyOf: - type: string - type: 'null' extraRepositories: type: integer minimum: 0 maximum: 9007199254740991 retryOf: anyOf: - type: integer exclusiveMinimum: 0 maximum: 9007199254740991 - type: 'null' trigger: type: object properties: kind: type: string enum: - manual - rule - actor description: anyOf: - type: string - type: 'null' login: anyOf: - type: string - type: 'null' required: - kind - description - login additionalProperties: false costCents: type: integer minimum: -9007199254740991 maximum: 9007199254740991 findings: anyOf: - type: object properties: count: type: integer minimum: 0 maximum: 9007199254740991 bySeverity: type: object propertyNames: type: string enum: - info - low - medium - high - critical additionalProperties: type: integer minimum: 0 maximum: 9007199254740991 required: - info - low - medium - high - critical required: - count - bySeverity additionalProperties: false - type: 'null' error: anyOf: - type: string - type: 'null' webUrl: type: string kind: type: string enum: - full - change cancellationRequested: type: boolean steers: type: array items: type: object properties: slug: type: string title: type: string revision: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - slug - title - revision additionalProperties: false description: The Steers the run carried, in order, with the revision each was read at. change: anyOf: - type: object properties: pullRequest: anyOf: - type: object properties: number: type: integer minimum: -9007199254740991 maximum: 9007199254740991 title: type: string url: type: string state: type: string enum: - open - merged - closed - draft required: - number - title - url - state additionalProperties: false - type: 'null' head: type: object properties: ref: type: string sha: type: string required: - ref - sha additionalProperties: false base: type: object properties: ref: type: string sha: type: string required: - ref - sha additionalProperties: false required: - pullRequest - head - base additionalProperties: false - type: 'null' repositories: type: array items: type: object properties: fullName: type: string sha: anyOf: - type: string - type: 'null' ref: anyOf: - type: string - type: 'null' files: type: integer minimum: 0 maximum: 9007199254740991 lines: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' paths: type: array items: type: string required: - fullName - sha - ref - files - lines - paths additionalProperties: false stage: anyOf: - type: string enum: - queue - prepare - scan - review - triage - prove - report - inbox - type: 'null' stages: type: array items: type: object properties: id: type: string state: type: string enum: - done - now - next - failed - stopped - skipped description: '"now" is the stage in progress; the inbox stage is "done" once findings reached it (a partial import too), "failed" when the import failed (see error) and "skipped" when nothing was imported.' detail: anyOf: - type: string - type: 'null' error: anyOf: - type: string - type: 'null' durationMs: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' progress: anyOf: - type: object properties: done: type: integer minimum: 0 maximum: 9007199254740991 total: type: integer minimum: 0 maximum: 9007199254740991 required: - done - total additionalProperties: false - type: 'null' required: - id - state - detail - error - durationMs - progress additionalProperties: false import: type: object properties: state: type: string enum: - none - available - repository-not-added - repository-access-unavailable - pending - repository-failed - importing - failed - skipped - imported - partial - tickets-unavailable count: type: integer minimum: 0 maximum: 9007199254740991 reason: anyOf: - type: string enum: - source-import-failed - platform-unavailable - organizer-failed - organizer-disabled - stalled - internal-error - unsupported-source-kind - unsupported-provider - missing-repository-registration - platform-link-not-active - platform-link-incomplete - provider-identity-mismatch - missing-revision - duplicate-repository-source - repository-unreachable - repository-not-public - public-reader-unavailable - github-not-connected - revision-unavailable - platform-refused - missing-description - missing-severity - no-source-locations - unknown-source-id - source-not-importable - ambiguous-repository-source - target-already-imported - invalid-finding - type: 'null' description: 'Why: the failure code when state is "failed". When it is "skipped" or "partial", the reason recorded by the first repository left out, else by most of the findings left out, else why findings could not be placed on a ticket. Null for every other state, and when none was recorded.' required: - state - count - reason additionalProperties: false publicUrl: anyOf: - type: string - type: 'null' pullRequestCommentUrl: anyOf: - type: string - type: 'null' required: - number - title - state - phase - terminal - createdAt - startedAt - endedAt - source - repository - ref - sha - extraRepositories - retryOf - trigger - costCents - findings - error - webUrl - kind - cancellationRequested - steers - change - repositories - stage - stages - import - publicUrl - pullRequestCommentUrl additionalProperties: false result: type: string enum: - cancelled - cancelling required: - run - result additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '413': description: The body exceeds 1 MiB content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '415': description: The body is not application/json content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' /orgs/{org}/runs/{run}/links: get: operationId: listRunLinks summary: List guest links description: A run's guest links, newest first, with their number, role, state and guest count. A link's number addresses it within the run. The full URL is never listed; urlPrefix helps recognise a link. tags: - Runs security: - bearer: [] - oauth2: - runs:share x-mcp-tool: list_run_links parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: run in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Run number within the organization, e.g. 12. responses: '200': description: List guest links content: application/json: schema: type: object properties: nextCursor: anyOf: - type: string - type: 'null' items: type: array items: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 description: Number within the run, e.g. 3. run: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 label: anyOf: - type: string - type: 'null' role: type: string enum: - view - comment - triage state: type: string enum: - live - expired - revoked urlPrefix: type: string description: 'The start of the link, ending in "…": enough to recognise it, never to open it.' createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ expiresAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' revokedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' lastUsedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' guests: type: integer minimum: 0 maximum: 9007199254740991 description: Guests who entered through the link. required: - number - run - label - role - state - urlPrefix - createdAt - expiresAt - revokedAt - lastUsedAt - guests additionalProperties: false required: - nextCursor - items additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' post: operationId: createRunLink summary: Create a guest link description: Create a link that opens this run to people outside the organization, without an account. Links are numbered 1, 2, 3… within the run, and a number is never reused. The API returns the full URL only in this response; owners can copy a live link again from the run's Share dialog. Needs a complete run whose findings are in the inbox. tags: - Runs security: - bearer: [] - oauth2: - runs:share - findings:read x-mcp-tool: create_run_link parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: run in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Run number within the organization, e.g. 12. requestBody: required: true content: application/json: schema: type: object additionalProperties: false properties: role: default: comment type: string enum: - view - comment - triage expiresInDays: default: 14 type: integer minimum: 1 maximum: 30 description: Days from now until the link ends. label: type: string minLength: 1 maxLength: 80 required: [] responses: '201': description: Create a guest link content: application/json: schema: type: object properties: link: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 description: Number within the run, e.g. 3. run: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 label: anyOf: - type: string - type: 'null' role: type: string enum: - view - comment - triage state: type: string enum: - live - expired - revoked urlPrefix: type: string description: 'The start of the link, ending in "…": enough to recognise it, never to open it.' createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ expiresAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' revokedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' lastUsedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' guests: type: integer minimum: 0 maximum: 9007199254740991 description: Guests who entered through the link. required: - number - run - label - role - state - urlPrefix - createdAt - expiresAt - revokedAt - lastUsedAt - guests additionalProperties: false url: type: string required: - link - url additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '413': description: The body exceeds 1 MiB content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '415': description: The body is not application/json content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' /orgs/{org}/runs/{run}/links/{link}: patch: operationId: updateRunLink summary: Change a guest link description: Change a link's role, label or expiry (days from now), by run number and link number. A new expiry revives an expired link, within the live-link cap. A revoked link cannot change. tags: - Runs security: - bearer: [] - oauth2: - runs:share - findings:read x-mcp-tool: update_run_link parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: run in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Run number within the organization, e.g. 12. - name: link in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Link number within the run, e.g. 3. requestBody: required: true content: application/json: schema: type: object additionalProperties: false properties: role: type: string enum: - view - comment - triage expiresInDays: type: integer minimum: 1 maximum: 30 description: Days from now until the link ends. label: description: null removes the label. anyOf: - type: string minLength: 1 maxLength: 80 - type: 'null' required: [] responses: '200': description: Change a guest link content: application/json: schema: type: object properties: link: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 description: Number within the run, e.g. 3. run: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 label: anyOf: - type: string - type: 'null' role: type: string enum: - view - comment - triage state: type: string enum: - live - expired - revoked urlPrefix: type: string description: 'The start of the link, ending in "…": enough to recognise it, never to open it.' createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ expiresAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' revokedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' lastUsedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' guests: type: integer minimum: 0 maximum: 9007199254740991 description: Guests who entered through the link. required: - number - run - label - role - state - urlPrefix - createdAt - expiresAt - revokedAt - lastUsedAt - guests additionalProperties: false required: - link additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '413': description: The body exceeds 1 MiB content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '415': description: The body is not application/json content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' delete: operationId: revokeRunLink summary: Revoke a guest link description: End a link now, by run number and link number; anyone using it loses access at their next request. Revoking twice returns the same link. tags: - Runs security: - bearer: [] - oauth2: - runs:share x-mcp-tool: revoke_run_link parameters: - name: org in: path required: true description: Organization slug; must be the token's organization. schema: type: string - name: run in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Run number within the organization, e.g. 12. - name: link in: path required: true schema: anyOf: - type: integer exclusiveMinimum: 0 maximum: 2147483647 - type: string pattern: ^[1-9][0-9]{0,9}$ description: Link number within the run, e.g. 3. responses: '200': description: Revoke a guest link content: application/json: schema: type: object properties: link: type: object properties: number: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 description: Number within the run, e.g. 3. run: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 label: anyOf: - type: string - type: 'null' role: type: string enum: - view - comment - triage state: type: string enum: - live - expired - revoked urlPrefix: type: string description: 'The start of the link, ending in "…": enough to recognise it, never to open it.' createdAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ expiresAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' revokedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' lastUsedAt: 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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - type: 'null' guests: type: integer minimum: 0 maximum: 9007199254740991 description: Guests who entered through the link. required: - number - run - label - role - state - urlPrefix - createdAt - expiresAt - revokedAt - lastUsedAt - guests additionalProperties: false required: - link additionalProperties: false '400': description: The request is invalid content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '401': description: Missing or invalid bearer token content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '403': description: The token lacks a scope, or its user lacks a permission content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '404': description: Not found in the token organization content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '409': description: The request conflicts with the current state content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '429': description: Rate limited; see Retry-After content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' '503': description: Temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/ApiErrorEnvelope' components: schemas: ApiErrorEnvelope: type: object properties: error: type: object properties: code: type: string enum: - invalid_request - repository_required - unauthenticated - insufficient_credits - spend_cap_reached - insufficient_scope - forbidden - not_found - repository_not_visible - repository_not_added - method_not_allowed - position_unavailable - decision_active - conflict - price_exceeds_max - quote_stale - change_refused - nothing_to_review - repository_not_runnable - idempotency_key_reused - api_version_retired - payload_too_large - unsupported_media_type - rate_limited - internal_error - upstream_error - platform_unavailable - repository_access_unavailable - rate_limit_unavailable - public_api_disabled message: type: string details: type: object propertyNames: type: string additionalProperties: {} required: - code - message additionalProperties: false requestId: type: string required: - error - requestId additionalProperties: false securitySchemes: bearer: type: http scheme: bearer description: A personal access token (v12p_…) or an OAuth access token (v12a_…). oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://v12.sh/oauth/authorize tokenUrl: https://v12.sh/api/oauth/token refreshUrl: https://v12.sh/api/oauth/token scopes: user:read: 'The member directory: usernames, emails and roles. Any key reads its own account, organization and credit balance without it.' repos:read: Repositories, branches, pull requests, tags and Steer instructions. repos:write: Add public repositories to the workspace; owners can also add private repositories granted by GitHub, create repositories V12 hosts and push code to them. steers:write: Create, edit, archive and restore Steers. Archiving detaches them from Autopilot rules; finding tags and run history are kept. runs:read: Runs, their progress and context documents. runs:write: Estimate and start runs; add or archive context documents. runs:manage: Cancel runs. runs:share: Create, change and revoke guest links that open a run to people outside the organization. findings:read: 'The inbox: findings, their status, reports and comments.' findings:write: Change status, comment and update triage decisions.