{"info":{"description":"Workspace-aware API for TestPerch configuration, whole runs, tests, and diagnostics. Project keys have Read only or Read + write permissions; OAuth and workspace keys remain read-only. Configuration writes cannot manage credentials.","title":"TestPerch Public API","version":"1.0.0"},"openapi":"3.1.1","servers":[{"url":"/"}],"components":{"securitySchemes":{"AccountSession":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"A real Better Auth account session (Secure deployments use the __Secure- prefix). Requires a matching Origin header; guest sessions do not qualify."},"OnboardingClaim":{"in":"header","name":"X-Onboarding-Claim","type":"apiKey","description":"The separate claim_secret returned at provisioning. Never place it in a URL. Revoked by claim, expiry, or purge; project keys and account sessions cannot substitute for it."},"PublicApiKey":{"in":"header","name":"X-API-Key","type":"apiKey"},"OAuth2":{"flows":{"authorizationCode":{"authorizationUrl":"/api/auth/oauth2/authorize","scopes":{"test-results:read":"Read tests, executions, logs, and artifact links."},"tokenUrl":"/api/auth/oauth2/token"}},"type":"oauth2"}},"schemas":{"OnboardingGithubConnectionCreated":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["awaiting_confirmation","awaiting_installation","awaiting_authorization","verifying","pending_approval","connected","failed","expired","superseded"]},"expires_at":{"type":"string","format":"date-time"},"installation_id":{"type":["string","null"]},"failure_code":{"type":["string","null"],"enum":["authorization_denied","installation_access_denied","installation_inactive","permissions_required","provider_unavailable","invalid_callback",null]},"next_action":{"type":"string"},"browser_url":{"type":"string","format":"uri"}},"required":["connection_id","status","expires_at","installation_id","failure_code","next_action","browser_url"],"additionalProperties":false},"PublicApiErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","conflict","diagnostics_expired","insufficient_scope","unauthorized","subscription_required","not_found","rate_limited","query_timeout","internal_error","onboarding_closed"]},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["code","message","path"],"additionalProperties":false}},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string","format":"uuid"}},"required":["error","request_id"],"additionalProperties":false},"OnboardingGithubConnection":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["awaiting_confirmation","awaiting_installation","awaiting_authorization","verifying","pending_approval","connected","failed","expired","superseded"]},"expires_at":{"type":"string","format":"date-time"},"installation_id":{"type":["string","null"]},"failure_code":{"type":["string","null"],"enum":["authorization_denied","installation_access_denied","installation_inactive","permissions_required","provider_unavailable","invalid_callback",null]},"next_action":{"type":"string"}},"required":["connection_id","status","expires_at","installation_id","failure_code","next_action"],"additionalProperties":false},"OnboardingCredentials":{"type":"object","properties":{"onboarding_id":{"type":"string","format":"uuid"},"claim_secret":{"type":"string","pattern":"^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$/u"},"ingestion_key":{"type":"string"},"project_api_key":{"type":"string"},"project_api_key_mode":{"type":"string","enum":["read_write"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["onboarding_id","claim_secret","ingestion_key","project_api_key","project_api_key_mode","workspace","project","created_at","expires_at"],"additionalProperties":false,"description":"Sensitive credential response. Save directly to a private file; do not display. Recovered responses contain exactly the original credentials, names, identifiers and deadline."},"CreateOnboarding":{"type":"object","properties":{"workspace_name":{"type":"string","minLength":1,"maxLength":100},"project_name":{"type":"string","minLength":1,"maxLength":100},"request_secret":{"type":"string","pattern":"^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$/u","description":"Recovery authority: generate 32 cryptographically random bytes, encode as canonical unpadded base64url, and save privately BEFORE requesting. Reuse exactly with the same names after interruption. Never print, log, or commit this secret.","writeOnly":true}},"required":["workspace_name","project_name","request_secret"],"additionalProperties":false},"OnboardingStatus":{"type":"object","properties":{"onboarding_id":{"type":"string","format":"uuid"},"lifecycle":{"type":"string","enum":["unclaimed"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"progress":{"type":"object","properties":{"configuration_complete":{"type":"boolean"},"reporter_configured":{"type":"boolean"},"verification_complete":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}},"required":["configuration_complete","reporter_configured","verification_complete","updated_at"],"additionalProperties":false}},"required":["onboarding_id","lifecycle","workspace","project","created_at","expires_at","progress"],"additionalProperties":false,"description":"Current unclaimed onboarding and separately persisted, agent-reported progress. Claim authority is revoked on claim, expiry, or purge; closed onboardings return 404."},"OnboardingProgressUpdate":{"type":"object","properties":{"configuration_complete":{"type":"boolean"},"reporter_configured":{"type":"boolean"},"verification_complete":{"type":"boolean"}},"additionalProperties":false,"description":"Agent-reported setup milestones. These do not change lifecycle, entitlements, or expiry and are not server verification of integration."},"PublicApiProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"web_url":{"type":"string","format":"uri"},"workspace":{"$ref":"#/components/schemas/PublicApiWorkspace"}},"required":["id","name","slug","web_url","workspace"],"additionalProperties":false},"PublicApiWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"PublicApiEnvironment":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"type":{"type":"string","enum":["branch","pullRequest"]},"color":{"type":"string","enum":["red","yellow","green","blue","purple","neutral"]},"branch_regexes":{"type":"array","items":{"type":"string"}},"include_in_success_rate":{"type":"boolean"},"priority":{"type":"integer","minimum":0}},"required":["id","name","label","description","type","color","branch_regexes","include_in_success_rate","priority"]},"PublicApiAiSelection":{"type":"object","properties":{"configuration":{"type":["object","null"],"properties":{"configuration_version":{"type":"integer"},"enabled":{"type":"boolean"},"custom_guidance":{"type":["string","null"]},"environment_selections":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string"},"always_run_tags":{"type":"array","items":{"type":"string"}}},"required":["environment_id","always_run_tags"]}}},"required":["configuration_version","enabled","custom_guidance","environment_selections"]},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"color":{"type":"string","enum":["red","yellow","green","blue","purple","neutral"]},"type":{"type":"string","enum":["branch","pullRequest"]}},"required":["id","name","label","color","type"]}},"workspace_sandbox":{"type":"object","properties":{"blocking_reason":{"type":["string","null"]},"ready":{"type":"boolean"},"github_repository_ready":{"type":"boolean"}},"required":["blocking_reason","ready","github_repository_ready"]}},"required":["configuration","environments","workspace_sandbox"]},"PublicApiRepositoryMapping":{"type":"object","properties":{"has_workspace_connection":{"type":"boolean"},"mapping":{"type":["object","null"],"properties":{"id":{"type":"string"},"full_name":{"type":"string"},"html_url":{"type":"string","format":"uri"},"installation_id":{"type":"string"},"account_login":{"type":"string"},"installation_status":{"type":"string"},"active":{"type":"boolean"},"archived":{"type":"boolean"},"visibility":{"type":"string"},"selectable":{"type":"boolean"}},"required":["id","full_name","html_url","installation_id","account_login","installation_status","active","archived","visibility","selectable"]},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"full_name":{"type":"string"},"html_url":{"type":"string","format":"uri"},"installation_id":{"type":"string"},"account_login":{"type":"string"},"installation_status":{"type":"string"},"active":{"type":"boolean"},"archived":{"type":"boolean"},"visibility":{"type":"string"},"selectable":{"type":"boolean"}},"required":["id","full_name","html_url","installation_id","account_login","installation_status","active","archived","visibility","selectable"]}}},"required":["has_workspace_connection","mapping","repositories"]},"PublicApiWholeRun":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running","passed","failed","timed_out","cancelled","interrupted","unreported"]},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"duration_ms":{"type":["number","null"],"minimum":0},"partial":{"type":"boolean","description":"The reporter ran a selected subset of tests; this is independent of ingestion completeness."},"branch":{"type":["string","null"]},"environment_id":{"type":["string","null"]},"ci":{"type":"boolean"},"ci_provider":{"type":["string","null"]},"ci_build_id":{"type":["string","null"]},"attempt":{"type":"integer"},"git_sha":{"type":["string","null"]},"pull_request_number":{"type":["number","null"]},"web_url":{"type":"string","format":"uri"},"completion":{"type":"object","properties":{"lifecycle_complete":{"type":"boolean"},"ingestion_complete":{"type":["boolean","null"],"description":"True only when complete shard coverage and declared test totals match received terminal test results. Null means the unsharded reporter did not declare an expected test total. A finished lifecycle alone does not prove all diagnostics have arrived."},"received_shards":{"type":"integer","minimum":0},"expected_shards":{"type":["integer","null"],"exclusiveMinimum":0},"received_tests":{"type":"integer","minimum":0},"pending_tests":{"type":"integer","minimum":0},"expected_tests":{"type":["integer","null"],"minimum":0}},"required":["lifecycle_complete","ingestion_complete","received_shards","expected_shards","received_tests","pending_tests","expected_tests"],"additionalProperties":false}},"required":["id","status","started_at","finished_at","duration_ms","partial","branch","environment_id","ci","ci_provider","ci_build_id","attempt","git_sha","pull_request_number","web_url","completion"],"additionalProperties":false},"PublicApiPageInfo":{"type":"object","properties":{"end_cursor":{"type":["string","null"],"description":"Opaque cursor for the last returned edge, or null when the page is empty."},"has_next_page":{"type":"boolean","description":"Whether another forward page is available after end_cursor."}},"required":["end_cursor","has_next_page"],"additionalProperties":false,"description":"Forward-pagination state for the returned page."},"PublicApiContext":{"type":"object","properties":{"client":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},"credential_type":{"type":"string","enum":["oauth","project_api_key","workspace_api_key"]},"permissions":{"type":"array","items":{"type":"string"}},"project_restriction":{"type":["object","null"],"properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"user":{"type":["object","null"],"properties":{"email":{"type":"string","format":"email"},"id":{"type":"string"},"name":{"type":"string"}},"required":["email","id","name"],"additionalProperties":false},"workspace":{"$ref":"#/components/schemas/PublicApiWorkspace"}},"required":["client","credential_type","permissions","project_restriction","user","workspace"],"additionalProperties":false},"PublicApiProjectsResponse":{"type":"object","properties":{"edges":{"type":"array","items":{"type":"object","properties":{"cursor":{"type":"string"},"node":{"$ref":"#/components/schemas/PublicApiProject"}},"required":["cursor","node"],"additionalProperties":false}},"page_info":{"$ref":"#/components/schemas/PublicApiPageInfo"}},"required":["edges","page_info"],"additionalProperties":false},"PublicApiTestRunDiagnostic":{"type":"object","properties":{"diagnostics":{"type":"object","properties":{"status":{"type":"string","enum":["available","pruning","pruned"]},"removedAt":{"type":["string","null"],"format":"date-time"},"retentionMonths":{"type":["integer","null"]},"hadDiagnostics":{"type":"boolean"}},"required":["status","removedAt","retentionMonths","hadDiagnostics"],"additionalProperties":false,"description":"Run-level diagnostic retention state. Expired diagnostics are not evidence that the run reported no logs, steps, or attachments."},"id":{"type":"string","description":"Per-run test ID (run_test_id), grouping all attempts of one test in one run and Playwright project."},"status":{"type":"string","enum":["running","passed","failed","timed_out","skipped","interrupted","unreported","flaky"],"description":"Actual terminal status, with flaky for an execution that recovered from an unexpected attempt to an expected result and ended successfully. Passed excludes flaky; failed filtering uses the raw status and includes expected failures, including recovered expected failures."},"expected_status":{"type":"string","enum":["passed","failed","skipped"],"description":"Expected status stored for this test in the containing run. Compare with actual status: failed/failed met expectations; passed/failed did not."},"failed":{"type":"boolean","description":"Whether the stored execution result is unexpected: includes unexpected passes, failures, timeouts, interruptions, and unreported results. Running, skipped, expected failures, and executions recovered to an expected result are false. Unreported means missing evidence, not a confirmed assertion failure. Does not inspect attempt history."},"attempt_count":{"type":"integer","minimum":0,"description":"Number of recorded attempts, including the initial attempt; matches attempts.data.length."},"max_retries":{"type":"integer","minimum":0,"description":"Maximum number of retries configured for this test in the run; 0 means no retries."},"started_at":{"type":"string","format":"date-time","description":"Stored per-run test start time, normalized to UTC."},"finished_at":{"type":["string","null"],"format":"date-time","description":"Stored per-run test finish time in UTC, or null while unfinished or unreported."},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Stored per-run test duration in milliseconds, or null when unavailable; not recomputed from attempts."},"playwright_project":{"type":["string","null"],"description":"Playwright project recorded for this execution, or null."},"web_url":{"type":"string","format":"uri","description":"Browser URL for this test within its run; may require a TestPerch user session."},"run":{"$ref":"#/components/schemas/PublicApiDiagnosticRun"},"test_definition":{"$ref":"#/components/schemas/PublicApiTest"},"attempts":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiTestRunDiagnosticAttempt"}}},"required":["data"],"additionalProperties":false}},"required":["diagnostics","id","status","expected_status","failed","attempt_count","max_retries","started_at","finished_at","duration_ms","playwright_project","web_url","run","test_definition","attempts"],"additionalProperties":false,"description":"Grouped execution with evidence for every attempt, fitted toward 256 KiB with a 1 MiB hard ceiling. Attempt entries, focus steps, and retrieval links are retained."},"PublicApiDiagnosticRun":{"type":"object","properties":{"branch":{"type":["string","null"],"description":"Source-control branch reported for the run, or null."},"ci_build_id":{"type":["string","null"],"description":"CI provider's build identifier, or null when not reported."},"ci_provider":{"type":["string","null"],"description":"CI provider name reported for the run, or null."},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Reported duration of the entire run in milliseconds, or null when unavailable."},"environment":{"type":["object","null"],"properties":{"label":{"type":"string","description":"Display label of the matched environment."},"name":{"type":"string","description":"Configured name of the matched environment."},"type":{"type":"string","description":"Configured environment matching type."}},"required":["label","name","type"],"additionalProperties":false,"description":"Project environment matched to the run, or null when none was assigned."},"finished_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp reported when the entire run finished, normalized to UTC; null while unfinished or unreported."},"git_sha":{"type":["string","null"],"description":"Source-control commit SHA reported for the run, or null."},"id":{"type":"string","description":"Reporter-run ID. The run is the execution container for many per-run tests, attempts, and shards."},"partial":{"type":"boolean","description":"Whether the reporter marked this run as partial, meaning the run may intentionally omit tests or shards."},"pull_request":{"type":["object","null"],"properties":{"head_sha":{"type":["string","null"],"description":"Head commit SHA reported for the pull request, or null."},"number":{"type":"integer","exclusiveMinimum":0,"description":"Pull-request number reported for the run."},"target_branch":{"type":["string","null"],"description":"Pull-request target branch, or null when not reported."}},"required":["head_sha","number","target_branch"],"additionalProperties":false,"description":"Pull-request context reported for the run, or null."},"repository_url":{"type":["string","null"],"description":"Source repository URL reported for the run, or null."},"started_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp reported when the entire run started, normalized to UTC."},"status":{"type":"string","enum":["running","passed","failed","timed_out","cancelled","interrupted","unreported"],"description":"Current or terminal aggregate outcome of the entire run, not the test execution; running is unfinished and unreported means no terminal result was reported."}},"required":["branch","ci_build_id","ci_provider","duration_ms","environment","finished_at","git_sha","id","partial","pull_request","repository_url","started_at","status"],"additionalProperties":false,"description":"Execution-wide context for the reporter run that contains the test execution."},"PublicApiTest":{"type":"object","properties":{"active_issue_types":{"type":["array","null"],"prefixItems":[{"type":"string","enum":["flaky"]}],"description":"Current unresolved issue types for the test, or null when none are active. Does not determine an execution's status."},"quarantined_at":{"type":["string","null"],"format":"date-time","description":"Creation time of the active quarantine, or null when no quarantine is active. Branch allowances do not change this value."},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"file":{"type":"string"},"id":{"type":"string"},"success_rate":{"type":["number","null"],"minimum":0,"maximum":100},"title":{"type":"string"},"web_url":{"type":"string","format":"uri"}},"required":["active_issue_types","quarantined_at","archived_at","created_at","file","id","success_rate","title","web_url"],"additionalProperties":false,"description":"Stable test identity, latest observed title and file, and current health metadata. Shared by /tests and embedded test definitions."},"PublicApiTestRunDiagnosticAttempt":{"type":"object","properties":{"id":{"type":"string","description":"Individual attempt ID, used as attempt_id in evidence URLs."},"attempt":{"type":"integer","minimum":0,"description":"Zero-based attempt number; the initial attempt is 0."},"status":{"type":"string","enum":["running","passed","failed","timed_out","skipped","interrupted","unreported"]},"expected_status":{"type":"string","enum":["passed","failed","skipped"],"description":"Expected status for this attempt. A failed attempt is successful when failed was expected; a passed attempt is unexpected when failure was expected."},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"duration_ms":{"type":["integer","null"],"minimum":0},"error_messages":{"type":"array","items":{"type":"string"},"description":"ANSI-cleaned errors reported for this attempt."},"worker_index":{"type":["integer","null"],"minimum":0},"shard":{"type":["object","null"],"properties":{"index":{"type":"integer","exclusiveMinimum":0},"total":{"type":"integer","exclusiveMinimum":0}},"required":["index","total"],"additionalProperties":false},"attachments":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiTestRunAttachment"},"description":"Up to 100 attachments ordered by sequence then ID, retaining the error-context attachment when present."},"truncated":{"type":"boolean","description":"True when additional attachments were omitted by the per-attempt attachment limit."}},"required":["data","truncated"],"additionalProperties":false},"error_context":{"type":"object","properties":{"attachment_id":{"type":["string","null"],"description":"ID of the attempt's attachment named error-context, or null when no such attachment exists."},"status":{"type":"string","enum":["available","missing","unavailable","expired"],"description":"available means text was fetched; missing means no error-context attachment was reported; unavailable means an attachment exists but could not be fetched."},"text":{"type":["string","null"],"description":"UTF-8 error-context text with ANSI escape sequences removed, or null unless status is available."},"truncated":{"type":"boolean","description":"True when inline text was shortened by its read limit or the overall diagnostic response budget; url still addresses the complete artifact."},"url":{"type":["string","null"],"format":"uri","description":"Path-signed direct URL for the complete error-context artifact, or null when missing. It does not require X-API-Key; possession grants artifact access, so treat it as sensitive."}},"required":["attachment_id","status","text","truncated","url"],"additionalProperties":false,"description":"Inline, ANSI-cleaned view of the attempt's error-context attachment and its fetch state."},"logs":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"chunk":{"type":"string","description":"UTF-8 diagnostic text with ANSI escape sequences removed. Base64 raw chunks are decoded; malformed base64 is replaced with an explanatory placeholder."},"attempt_id":{"type":"string","description":"ID of the attempt that owns this output chunk."},"decode_status":{"type":"string","enum":["decoded","malformed_base64"],"description":"decoded means chunk contains decoded, ANSI-cleaned text; malformed_base64 means invalid raw base64 was replaced by a placeholder."},"id":{"type":"string","description":"Reporter output-event ID; distinct from the owning attempt ID."},"occurred_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp of the output event as reported, normalized to UTC."},"sequence":{"type":"integer","minimum":0,"description":"Reporter event sequence used with id to order output within the containing run."},"stream":{"type":"string","enum":["stdout","stderr"],"description":"Output stream that produced this chunk: stdout or stderr."}},"required":["chunk","attempt_id","decode_status","id","occurred_at","sequence","stream"],"additionalProperties":false,"description":"One decoded, ANSI-cleaned diagnostic output chunk; use raw_url when original bytes and encoding are required."},"description":"Chronological bounded tail of decoded diagnostic output for the attempt. Older chunks can be omitted when truncated is true."},"raw_url":{"type":["string","null"],"format":"uri","description":"Public API URL for paginating original stdout/stderr chunks with their raw encoding; null after diagnostic removal starts. Send an X-API-Key authorized for the same project."},"status":{"type":"string","enum":["available","unavailable","expired"],"description":"available means inline log storage was read successfully, even when data is empty; unavailable means authoritative storage could not be read and data is empty; expired means the workspace retention policy removed access to diagnostics."},"truncated":{"type":"boolean","description":"True when older inline chunks were omitted by the diagnostic log limit or overall response budget; retrieve the complete paginated representation from raw_url."}},"required":["data","raw_url","status","truncated"],"additionalProperties":false,"description":"Bounded decoded and ANSI-cleaned logs for the attempt, plus a link to the raw paginated API."},"steps":{"type":"object","properties":{"focus_step_id":{"type":["string","null"],"description":"ID of the selected diagnostic focus node. Normally this is the earliest completed errored step, preferring the deepest step on a timestamp tie; for timeouts or no completed error it is the latest-started step. Null means no focus step is available, including after diagnostic expiration."},"full_url":{"type":["string","null"],"format":"uri","description":"Public API URL for the complete chronological paginated step list; null after diagnostic removal starts. Send an X-API-Key authorized for the same project."},"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiTestRunStep"},"description":"Curated chronological diagnostic subset containing the focus step, its title-path ancestors, nearby preceding context, and up to 25 following steps. The subset can be non-contiguous; use full_url for every step."},"total_count":{"type":"integer","minimum":0,"description":"Total number of steps reported for the attempt before curation."},"truncated":{"type":"boolean","description":"True when data omits any reported step because of diagnostic curation or response-size fitting; data is not guaranteed to be one contiguous range."}},"required":["focus_step_id","full_url","data","total_count","truncated"],"additionalProperties":false,"description":"Curated, potentially non-contiguous step evidence centered on a deterministic focus selection."}},"required":["id","attempt","status","expected_status","started_at","finished_at","duration_ms","error_messages","worker_index","shard","attachments","error_context","logs","steps"],"additionalProperties":false},"PublicApiTestRunAttachment":{"type":"object","properties":{"byte_length":{"type":"string","pattern":"^\\d+$/u","description":"Exact artifact payload length in bytes, encoded as a decimal string so values larger than JavaScript's safe integer remain lossless."},"checksum":{"type":["string","null"],"description":"Reporter-supplied SHA-256 checksum of the artifact payload, preserved verbatim; null when none was reported."},"id":{"type":"string","description":"Attachment event ID for this test attempt; distinct from run, test, per-run test, and attempt IDs."},"mime_type":{"type":"string","description":"Reported media type of the artifact payload."},"name":{"type":"string","description":"Reporter-provided attachment name."},"occurred_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp of the attachment event as reported, normalized to UTC."},"sequence":{"type":"integer","minimum":0,"description":"Reporter event sequence used to order attachments within the containing run."},"url":{"type":"string","format":"uri","description":"Path-signed direct artifact download URL. It does not require X-API-Key; possession grants access to that artifact, so treat the full URL as sensitive."}},"required":["byte_length","checksum","id","mime_type","name","occurred_at","sequence","url"],"additionalProperties":false,"description":"Artifact attached to the test execution."},"PublicApiTestRunStep":{"type":"object","properties":{"category":{"type":["string","null"],"description":"Playwright step category as reported, or null when absent."},"depth":{"type":"integer","minimum":0,"description":"Reporter-provided nesting depth; 0 denotes a top-level step."},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Reported step duration in milliseconds, or null when the step has not finished."},"error_message":{"type":["string","null"],"description":"ANSI-cleaned step error message, or null when no step error was reported."},"finished_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 reporter timestamp for step completion, normalized to UTC; null when no finish was reported."},"id":{"type":"string","description":"Step ID within this test attempt. It is also the value referenced by steps.focus_step_id."},"source_location":{"type":["object","null"],"properties":{"column":{"type":["integer","null"],"minimum":0,"description":"Source column reported by Playwright, preserving Playwright's coordinate semantics; null when omitted."},"file":{"type":"string","description":"Reporter-provided source-file path for the step, which may be relative to the test workspace."},"line":{"type":["integer","null"],"minimum":0,"description":"Source line reported by Playwright, preserving Playwright's coordinate semantics; null when omitted."}},"required":["column","file","line"],"additionalProperties":false,"description":"Playwright-reported source location for the step, not a parsed stack-frame location; null when no file was reported."},"started_at":{"type":"string","format":"date-time","description":"RFC 3339 reporter timestamp for step start, normalized to UTC."},"attempt_id":{"type":"string","description":"ID of the individual test attempt that owns this step; it matches the attempt_id path parameter."},"title":{"type":"string","description":"Reporter-provided display title for the step."},"title_path":{"type":"array","items":{"type":"string"},"description":"Reporter-provided hierarchical title segments from the outermost group through this step."}},"required":["category","depth","duration_ms","error_message","finished_at","id","source_location","started_at","attempt_id","title","title_path"],"additionalProperties":false,"description":"One Playwright step belonging to a single test attempt, ordered by started_at and then id."},"PublicApiTestRunLogsResponse":{"type":"object","properties":{"edges":{"type":"array","items":{"type":"object","properties":{"cursor":{"type":"string"},"node":{"$ref":"#/components/schemas/PublicApiTestRunLog"}},"required":["cursor","node"],"additionalProperties":false}},"page_info":{"$ref":"#/components/schemas/PublicApiPageInfo"}},"required":["edges","page_info"],"additionalProperties":false},"PublicApiTestRunLog":{"type":"object","properties":{"chunk":{"type":"string","description":"Raw output chunk. When encoding is `base64`, this value is base64-encoded bytes and must be decoded before use."},"encoding":{"type":"string","enum":["utf8","base64"]},"id":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"sequence":{"type":"integer","minimum":0},"stream":{"type":"string","enum":["stdout","stderr"]},"attempt_id":{"type":"string"}},"required":["chunk","encoding","id","occurred_at","sequence","stream","attempt_id"],"additionalProperties":false},"PublicApiTestRunStepsResponse":{"type":"object","properties":{"edges":{"type":"array","items":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor for this step's started_at and id ordering position."},"node":{"type":"object","properties":{"category":{"type":["string","null"],"description":"Playwright step category as reported, or null when absent."},"depth":{"type":"integer","minimum":0,"description":"Reporter-provided nesting depth; 0 denotes a top-level step."},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Reported step duration in milliseconds, or null when the step has not finished."},"error_message":{"type":["string","null"],"description":"ANSI-cleaned step error message, or null when no step error was reported."},"finished_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 reporter timestamp for step completion, normalized to UTC; null when no finish was reported."},"id":{"type":"string","description":"Step ID within this test attempt. It is also the value referenced by steps.focus_step_id."},"source_location":{"type":["object","null"],"properties":{"column":{"type":["integer","null"],"minimum":0,"description":"Source column reported by Playwright, preserving Playwright's coordinate semantics; null when omitted."},"file":{"type":"string","description":"Reporter-provided source-file path for the step, which may be relative to the test workspace."},"line":{"type":["integer","null"],"minimum":0,"description":"Source line reported by Playwright, preserving Playwright's coordinate semantics; null when omitted."}},"required":["column","file","line"],"additionalProperties":false,"description":"Playwright-reported source location for the step, not a parsed stack-frame location; null when no file was reported."},"started_at":{"type":"string","format":"date-time","description":"RFC 3339 reporter timestamp for step start, normalized to UTC."},"attempt_id":{"type":"string","description":"ID of the individual test attempt that owns this step; it matches the attempt_id path parameter."},"title":{"type":"string","description":"Reporter-provided display title for the step."},"title_path":{"type":"array","items":{"type":"string"},"description":"Reporter-provided hierarchical title segments from the outermost group through this step."}},"required":["category","depth","duration_ms","error_message","finished_at","id","source_location","started_at","attempt_id","title","title_path"],"additionalProperties":false,"description":"Step at this chronological pagination position."}},"required":["cursor","node"],"additionalProperties":false,"description":"Cursor and step value for one result edge."},"description":"Steps ordered chronologically by started_at and then id."},"page_info":{"type":"object","properties":{"end_cursor":{"type":["string","null"],"description":"Opaque cursor for the last returned edge, or null when the page is empty."},"has_next_page":{"type":"boolean","description":"Whether another forward page is available after end_cursor."}},"required":["end_cursor","has_next_page"],"additionalProperties":false,"description":"Forward-pagination state for the complete step list."}},"required":["edges","page_info"],"additionalProperties":false,"description":"One forward page from the complete step list for a single test attempt."},"PublicApiTestRunsResponse":{"type":"object","properties":{"edges":{"type":"array","items":{"type":"object","properties":{"cursor":{"type":"string"},"node":{"$ref":"#/components/schemas/PublicApiTestRun"}},"required":["cursor","node"],"additionalProperties":false}},"page_info":{"$ref":"#/components/schemas/PublicApiPageInfo"}},"required":["edges","page_info"],"additionalProperties":false},"PublicApiTestRun":{"type":"object","properties":{"diagnostics":{"type":"object","properties":{"status":{"type":"string","enum":["available","pruning","pruned"]},"removedAt":{"type":["string","null"],"format":"date-time"},"retentionMonths":{"type":["integer","null"]},"hadDiagnostics":{"type":"boolean"}},"required":["status","removedAt","retentionMonths","hadDiagnostics"],"additionalProperties":false,"description":"Run-level diagnostic retention state. Expired diagnostics are not evidence that the run reported no logs, steps, or attachments."},"id":{"type":"string","description":"Per-run test ID (run_test_id), grouping all attempts of one test in one run and Playwright project."},"status":{"type":"string","enum":["running","passed","failed","timed_out","skipped","interrupted","unreported","flaky"],"description":"Actual terminal status, with flaky for an execution that recovered from an unexpected attempt to an expected result and ended successfully. Passed excludes flaky; failed filtering uses the raw status and includes expected failures, including recovered expected failures."},"expected_status":{"type":"string","enum":["passed","failed","skipped"],"description":"Expected status stored for this test in the containing run. Compare with actual status: failed/failed met expectations; passed/failed did not."},"failed":{"type":"boolean","description":"Whether the stored execution result is unexpected: includes unexpected passes, failures, timeouts, interruptions, and unreported results. Running, skipped, expected failures, and executions recovered to an expected result are false. Unreported means missing evidence, not a confirmed assertion failure. Does not inspect attempt history."},"attempt_count":{"type":"integer","minimum":0,"description":"Number of recorded attempts, including the initial attempt; matches attempts.data.length."},"max_retries":{"type":"integer","minimum":0,"description":"Maximum number of retries configured for this test in the run; 0 means no retries."},"started_at":{"type":"string","format":"date-time","description":"Stored per-run test start time, normalized to UTC."},"finished_at":{"type":["string","null"],"format":"date-time","description":"Stored per-run test finish time in UTC, or null while unfinished or unreported."},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Stored per-run test duration in milliseconds, or null when unavailable; not recomputed from attempts."},"playwright_project":{"type":["string","null"],"description":"Playwright project recorded for this execution, or null."},"web_url":{"type":"string","format":"uri","description":"Browser URL for this test within its run; may require a TestPerch user session."},"run":{"$ref":"#/components/schemas/PublicApiDiagnosticRun"},"test_definition":{"$ref":"#/components/schemas/PublicApiTest"},"attempts":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiTestRunAttempt"}}},"required":["data"],"additionalProperties":false,"description":"All recorded attempts ordered by attempt number then ID, including an empty array when none were recorded. No limit or truncation."}},"required":["diagnostics","id","status","expected_status","failed","attempt_count","max_retries","started_at","finished_at","duration_ms","playwright_project","web_url","run","test_definition","attempts"],"additionalProperties":false,"description":"One test execution within a run, including every recorded attempt. Timing and expected status come from the stored per-run test."},"PublicApiTestRunAttempt":{"type":"object","properties":{"id":{"type":"string","description":"Individual attempt ID, used as attempt_id in evidence URLs."},"attempt":{"type":"integer","minimum":0,"description":"Zero-based attempt number; the initial attempt is 0."},"status":{"type":"string","enum":["running","passed","failed","timed_out","skipped","interrupted","unreported"]},"expected_status":{"type":"string","enum":["passed","failed","skipped"],"description":"Expected status for this attempt. A failed attempt is successful when failed was expected; a passed attempt is unexpected when failure was expected."},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"duration_ms":{"type":["integer","null"],"minimum":0},"error_messages":{"type":"array","items":{"type":"string"},"description":"ANSI-cleaned errors reported for this attempt."},"worker_index":{"type":["integer","null"],"minimum":0},"shard":{"type":["object","null"],"properties":{"index":{"type":"integer","exclusiveMinimum":0},"total":{"type":"integer","exclusiveMinimum":0}},"required":["index","total"],"additionalProperties":false}},"required":["id","attempt","status","expected_status","started_at","finished_at","duration_ms","error_messages","worker_index","shard"],"additionalProperties":false},"PublicApiTestsResponse":{"type":"object","properties":{"edges":{"type":"array","items":{"type":"object","properties":{"cursor":{"type":"string"},"node":{"$ref":"#/components/schemas/PublicApiTest"}},"required":["cursor","node"],"additionalProperties":false}},"page_info":{"$ref":"#/components/schemas/PublicApiPageInfo"}},"required":["edges","page_info"],"additionalProperties":false}},"parameters":{}},"paths":{"/api/public/v1/onboardings/{onboarding_id}/github-connections":{"post":{"operationId":"createOnboardingGithubConnection","security":[{"OnboardingClaim":[]}],"summary":"Start GitHub connection before claiming","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"onboarding_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"Requires X-Onboarding-Claim, never a project API key. Returns a short-lived person-facing confirmation link without requiring TestPerch login or a browser handoff. GET previews do not consume it; a same-origin confirmation POST sets a separate Secure HttpOnly browser binding. New attempts supersede all unfinished onboarding connections, including pending approval; each uses fresh OAuth state/PKCE and a new immutable installation selection. Does not claim the workspace or alter account sessions. Send an empty JSON object. No query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingGithubConnectionCreated"}}}},"400":{"description":"Invalid request. Secret values are never echoed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"Onboarding is closed, claim proof is invalid, or the connection belongs to another workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"The connection state changed. Read status and follow next_action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"Temporary authorization expired while processing. Create a fresh connection if onboarding is still active; after claiming use workspace settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"413":{"description":"JSON request body exceeds 4096 bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"GitHub connection could not be processed. Retry status before creating a fresh connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"503":{"description":"GitHub configuration or verification is temporarily unavailable. Retry with a fresh connection link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/onboardings/{onboarding_id}/github-connections/{connection_id}":{"get":{"operationId":"getOnboardingGithubConnection","security":[{"OnboardingClaim":[]}],"summary":"Read GitHub connection progress and recovery action","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"onboarding_id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"connection_id","in":"path"}],"responses":{"200":{"description":"Requires X-Onboarding-Claim for this exact onboarding/workspace. Status includes next_action and bounded failure_code. Pending approval is not connected and may outlast the 15-minute authorization deadline. Continue reporter/environment setup; after approval create a fresh connection and authorize again. An installation webhook never attaches a workspace. A stalled awaiting_installation may indicate organization policy prevents installation or requests: ask an organization owner. Connected means verified GitHub user access to this app installation with required permissions; map a repository separately through the project API. Claimed, expired or purged onboarding revokes claim authority and returns 404; use real-account workspace settings after claiming. No query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingGithubConnection"}}}},"400":{"description":"Invalid request. Secret values are never echoed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"Onboarding is closed, claim proof is invalid, or the connection belongs to another workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"The connection state changed. Read status and follow next_action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"Temporary authorization expired while processing. Create a fresh connection if onboarding is still active; after claiming use workspace settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"413":{"description":"JSON request body exceeds 4096 bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"GitHub connection could not be processed. Retry status before creating a fresh connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"503":{"description":"GitHub configuration or verification is temporarily unavailable. Retry with a fresh connection link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/onboardings/{onboarding_id}/handoff":{"post":{"operationId":"createOnboardingBrowserHandoff","security":[{"OnboardingClaim":[]}],"summary":"Create a temporary browser entry link","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"onboarding_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_path":{"type":"string","minLength":1,"maxLength":512}},"required":["target_path"],"additionalProperties":false}}}},"responses":{"200":{"description":"A single-use browser link valid for five minutes or until onboarding expires, whichever comes first. The link opens a confirmation form; same-origin POST redeems it and redirects to the clean destination. Requires X-Onboarding-Claim. Only canonical same-workspace/project app paths are accepted; no query strings, fragments or encoded paths. Creates separate Secure HttpOnly guest and claim-continuation cookies without changing the account session. This short-lived link may be shown to the person; never put the durable claim secret in a URL.","content":{"application/json":{"schema":{"type":"object","properties":{"browser_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["browser_url","expires_at"],"additionalProperties":false}}}},"400":{"description":"Invalid request. Secret values are never echoed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"The request secret was already used with different names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"onboarding_closed: recovery is permanently unavailable; the request cannot recreate anything.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"413":{"description":"JSON request body exceeds 4096 bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error. Retry provisioning with the same saved request secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/onboardings/{onboarding_id}/claim":{"post":{"operationId":"claimOnboarding","security":[{"OnboardingClaim":[],"AccountSession":[]}],"summary":"Claim an onboarding workspace with a real account","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"onboarding_id","in":"path"}],"responses":{"200":{"description":"Requires a real signed-in account session, X-Onboarding-Claim, and a matching Origin header. Claims ownership atomically and revokes every temporary browser session, handoff and claim proof. Preserves all workspace/project identities, keys, modes, configuration, mappings and results. Open setup_url to complete Stripe Checkout and activate the 14-day trial with $5 shared AI credit; claiming alone does not start a trial. Canceled or failed Checkout can resume on the same setup page. A guest cookie alone cannot claim. Human browser signup/login can instead use the separate HttpOnly continuation established by a browser handoff.","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"setup_url":{"type":"string"}},"required":["workspace","setup_url"],"additionalProperties":false}}}},"400":{"description":"Invalid request. Secret values are never echoed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"The request secret was already used with different names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"onboarding_closed: recovery is permanently unavailable; the request cannot recreate anything.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"413":{"description":"JSON request body exceeds 4096 bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error. Retry provisioning with the same saved request secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/onboardings":{"post":{"operationId":"createOnboarding","summary":"Create or recover an agent onboarding","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOnboarding"}}}},"responses":{"200":{"description":"Atomically create a seven-day workspace with a shared $1 AI allowance, initial project, reporter key, and Read + write project key. Save the sensitive response directly to private storage. Identical requests recover the exact original response without extending expiry. Names are trimmed for retry comparison. Changed names return 409; closed requests return 410 and never create again. Basic creation limits: 3 per source and 30 globally per UTC hour. Recovery does not consume these limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCredentials"}}}},"400":{"description":"Invalid request. Secret values are never echoed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"The request secret was already used with different names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"onboarding_closed: recovery is permanently unavailable; the request cannot recreate anything.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"413":{"description":"JSON request body exceeds 4096 bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error. Retry provisioning with the same saved request secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/onboardings/{onboarding_id}":{"get":{"operationId":"getOnboardingStatus","security":[{"OnboardingClaim":[]}],"summary":"Read active onboarding status","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"onboarding_id","in":"path"}],"responses":{"200":{"description":"Read current workspace/project names and agent-reported setup progress. Requires X-Onboarding-Claim; the ID alone grants no authority. Closed onboarding and invalid proof return 404. No query parameters are accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStatus"}}}},"400":{"description":"Invalid request. Secret values are never echoed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"Onboarding is closed, missing, or the claim secret is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"The request secret was already used with different names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"onboarding_closed: recovery is permanently unavailable; the request cannot recreate anything.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"413":{"description":"JSON request body exceeds 4096 bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error. Retry provisioning with the same saved request secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/onboardings/{onboarding_id}/progress":{"patch":{"operationId":"updateOnboardingProgress","security":[{"OnboardingClaim":[]}],"summary":"Update onboarding setup progress","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"onboarding_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingProgressUpdate"}}}},"responses":{"200":{"description":"Update agent-reported setup milestones separately from lifecycle. Requires X-Onboarding-Claim. Does not change ownership, allowance, credentials, or deadlines.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStatus"}}}},"400":{"description":"Invalid request. Secret values are never echoed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"Onboarding is closed, missing, or the claim secret is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"The request secret was already used with different names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"onboarding_closed: recovery is permanently unavailable; the request cannot recreate anything.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"413":{"description":"JSON request body exceeds 4096 bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error. Retry provisioning with the same saved request secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}":{"patch":{"operationId":"updateProjectPublicApi","security":[{"PublicApiKey":[]}],"summary":"Update project name or slug","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string"}}}}}},"responses":{"200":{"description":"Update project name or slug.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiProject"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}},"get":{"operationId":"getPublicApiProject","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"Get an accessible project","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"responses":{"200":{"description":"One project visible to this credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiProject"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The project is inaccessible, deleted, or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/environments":{"get":{"operationId":"environmentsPublicApi","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"List project environments","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"responses":{"200":{"description":"List project environments.","content":{"application/json":{"schema":{"type":"object","properties":{"environments":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiEnvironment"}}},"required":["environments"]}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}},"post":{"operationId":"createEnvironmentPublicApi","security":[{"PublicApiKey":[]}],"summary":"Create an environment","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":12},"description":{"type":["string","null"],"minLength":1},"type":{"type":"string","enum":["branch","pullRequest"]},"color":{"type":"string","enum":["red","yellow","green","blue","purple","neutral"]},"branch_regexes":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"include_in_success_rate":{"type":"boolean","default":true},"priority":{"type":"integer","minimum":0}},"required":["name","label","type","color","branch_regexes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Create an environment.","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"$ref":"#/components/schemas/PublicApiEnvironment"}},"required":["environment"]}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/environments/{environment_id}":{"patch":{"operationId":"updateEnvironmentPublicApi","security":[{"PublicApiKey":[]}],"summary":"Update an environment","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","minLength":1},"required":true,"name":"environment_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":12},"description":{"type":["string","null"],"minLength":1},"color":{"type":"string","enum":["red","yellow","green","blue","purple","neutral"]},"branch_regexes":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"include_in_success_rate":{"type":"boolean"},"priority":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Update an environment.","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"$ref":"#/components/schemas/PublicApiEnvironment"}},"required":["environment"]}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}},"delete":{"operationId":"deleteEnvironmentPublicApi","security":[{"PublicApiKey":[]}],"summary":"Delete an environment","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","minLength":1},"required":true,"name":"environment_id","in":"path"}],"responses":{"200":{"description":"Delete an environment.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/ai-selection":{"get":{"operationId":"aiSelectionPublicApi","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"Get AI selection settings","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"responses":{"200":{"description":"Get AI selection settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAiSelection"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}},"put":{"operationId":"updateAiSelectionPublicApi","security":[{"PublicApiKey":[]}],"summary":"Set AI selection settings","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"custom_guidance":{"type":["string","null"],"maxLength":8000},"enabled":{"type":"boolean"},"environment_selections":{"type":"array","items":{"type":"object","properties":{"environment_id":{"type":"string"},"always_run_tags":{"type":"array","items":{"type":"string","minLength":1}}},"required":["environment_id","always_run_tags"],"additionalProperties":false}}},"required":["custom_guidance","enabled","environment_selections"],"additionalProperties":false}}}},"responses":{"200":{"description":"Set AI selection settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAiSelection"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/repository":{"get":{"operationId":"repositoryMappingPublicApi","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"Get mapping and authorized repositories","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"responses":{"200":{"description":"Get mapping and authorized repositories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiRepositoryMapping"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}},"put":{"operationId":"updateRepositoryMappingPublicApi","security":[{"PublicApiKey":[]}],"summary":"Map an already authorized repository","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"github_repository_id":{"type":"string","pattern":"^[1-9]\\d*$/u"}},"required":["github_repository_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Map an already authorized repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiRepositoryMapping"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}},"delete":{"operationId":"deleteRepositoryMappingPublicApi","security":[{"PublicApiKey":[]}],"summary":"Remove project repository mapping","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"}],"responses":{"200":{"description":"Remove project repository mapping.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/runs":{"get":{"operationId":"wholeRunsPublicApi","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"List whole runs with exact invocation or CI attempt correlation","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","minLength":1},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20},"required":false,"name":"first","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"run_id","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"ci_provider","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"ci_build_id","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"attempt","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"git_sha","in":"query"}],"responses":{"200":{"description":"List whole runs with exact invocation or CI attempt correlation.","content":{"application/json":{"schema":{"type":"object","properties":{"edges":{"type":"array","items":{"type":"object","properties":{"cursor":{"type":"string"},"node":{"$ref":"#/components/schemas/PublicApiWholeRun"}},"required":["cursor","node"],"additionalProperties":false}},"page_info":{"$ref":"#/components/schemas/PublicApiPageInfo"}},"required":["edges","page_info"],"additionalProperties":false}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/runs/{run_id}":{"get":{"operationId":"wholeRunPublicApi","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"Get one whole run","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"run_id","in":"path"}],"responses":{"200":{"description":"Get one whole run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiWholeRun"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource is inaccessible or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/context":{"get":{"operationId":"getPublicApiContext","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"Get credential context","responses":{"200":{"description":"The identity and authorization represented by this credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiContext"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects":{"get":{"operationId":"listPublicApiProjects","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"List accessible projects","parameters":[{"schema":{"type":"string","minLength":1,"description":"Opaque forward-pagination cursor containing the project ID."},"required":false,"description":"Opaque forward-pagination cursor containing the project ID.","in":"query","name":"after"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Number of projects to return (maximum 100)."},"required":false,"description":"Number of projects to return (maximum 100).","in":"query","name":"first"}],"responses":{"200":{"description":"A forward page of projects visible to this credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiProjectsResponse"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/test-runs/{run_test_id}":{"get":{"operationId":"getPublicTestRunDiagnostic","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"Get diagnostic evidence for a grouped test execution","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","minLength":1,"description":"Per-run test ID returned as the grouped execution id."},"required":true,"description":"Per-run test ID returned as the grouped execution id.","in":"path","name":"run_test_id"}],"responses":{"200":{"description":"Diagnostic evidence for every attempt of one grouped test execution, fitted toward 256 KiB with a 1 MiB hard response ceiling.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiTestRunDiagnostic"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource does not exist, belongs to a different project, or the attempt does not belong to the requested group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/test-runs/{run_test_id}/attempts/{attempt_id}/logs":{"get":{"operationId":"listPublicTestRunLogs","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"List raw logs for a test attempt","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","minLength":1,"description":"Per-run test ID returned as the grouped execution id."},"required":true,"description":"Per-run test ID returned as the grouped execution id.","in":"path","name":"run_test_id"},{"schema":{"type":"string","minLength":1,"description":"ID of an attempt belonging to this grouped execution."},"required":true,"description":"ID of an attempt belonging to this grouped execution.","in":"path","name":"attempt_id"},{"schema":{"type":"string","minLength":1,"description":"Opaque forward-pagination cursor containing only the event sequence and ID."},"required":false,"description":"Opaque forward-pagination cursor containing only the event sequence and ID.","in":"query","name":"after"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":500,"description":"Maximum number of raw output chunks to return (maximum 1,000). Pages may contain fewer chunks to limit output size; use page_info.has_next_page to determine whether more output remains."},"required":false,"description":"Maximum number of raw output chunks to return (maximum 1,000). Pages may contain fewer chunks to limit output size; use page_info.has_next_page to determine whether more output remains.","in":"query","name":"first"}],"responses":{"200":{"description":"A forward page of raw stdout and stderr chunks for one test attempt. At least one available chunk is returned intact, even if it exceeds the server's output-size target.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiTestRunLogsResponse"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource does not exist, belongs to a different project, or the attempt does not belong to the requested group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"diagnostics_expired: diagnostic content was removed by workspace retention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/test-runs/{run_test_id}/attempts/{attempt_id}/steps":{"get":{"operationId":"listPublicTestRunSteps","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"List steps for a test attempt","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","minLength":1,"description":"Per-run test ID returned as the grouped execution id."},"required":true,"description":"Per-run test ID returned as the grouped execution id.","in":"path","name":"run_test_id"},{"schema":{"type":"string","minLength":1,"description":"ID of an attempt belonging to this grouped execution."},"required":true,"description":"ID of an attempt belonging to this grouped execution.","in":"path","name":"attempt_id"},{"schema":{"type":"string","minLength":1,"description":"Opaque forward-pagination cursor containing only the start time and ID."},"required":false,"description":"Opaque forward-pagination cursor containing only the start time and ID.","in":"query","name":"after"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":250,"description":"Number of steps to return (maximum 1,000)."},"required":false,"description":"Number of steps to return (maximum 1,000).","in":"query","name":"first"}],"responses":{"200":{"description":"A forward page of steps for one test attempt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiTestRunStepsResponse"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"404":{"description":"The resource does not exist, belongs to a different project, or the attempt does not belong to the requested group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"410":{"description":"diagnostics_expired: diagnostic content was removed by workspace retention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/test-runs":{"get":{"operationId":"listPublicTestRuns","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"List grouped test executions","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","minLength":1,"description":"Opaque forward-pagination cursor containing only the active sort key and ID."},"required":false,"description":"Opaque forward-pagination cursor containing only the active sort key and ID.","in":"query","name":"after"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Number of grouped test executions to return (maximum 100)."},"required":false,"description":"Number of grouped test executions to return (maximum 100).","in":"query","name":"first"},{"schema":{"type":"string","minLength":1,"description":"Search expression, not free text. Supports id, test_id, run_id, title, file, branch, pull_request.number, failed, status, expected_status, attempt_count, started_at, finished_at, and duration_ms. For failed tests use failed:true; for one run use run_id:\"…\" AND failed:true. This matches unexpected stored results, including unexpected passes, failures, timeouts, interruptions, and unreported results. Running, skipped, expected failures, and executions recovered to an expected result are excluded. Unreported means missing evidence. failed:false is the exact complement, not a passed filter; Boolean values must be unquoted and use :. Strings must be quoted; : matches exactly and ~ matches substrings (at least 3 characters). Mix AND and OR with parentheses: AND binds more tightly than OR, and whitespace means AND. Prefix a clause or group directly with - to negate it. Allow at most 10 clauses and 10 nested parentheses levels. Timestamps are integer Unix seconds. status:\"failed\" is a raw-result filter and includes expected failures; use status:\"failed\" AND expected_status:\"failed\" to find those. Use failed:true AND status:\"passed\" for unexpected passes. status:\"flaky\" denotes recovery to an expected result, including an expected failure. Example: (failed:true OR status:\"flaky\") AND branch:\"main\". Each query statement has a five-second limit; narrow run_id or started_at if query_timeout is returned."},"required":false,"description":"Search expression, not free text. Supports id, test_id, run_id, title, file, branch, pull_request.number, failed, status, expected_status, attempt_count, started_at, finished_at, and duration_ms. For failed tests use failed:true; for one run use run_id:\"…\" AND failed:true. This matches unexpected stored results, including unexpected passes, failures, timeouts, interruptions, and unreported results. Running, skipped, expected failures, and executions recovered to an expected result are excluded. Unreported means missing evidence. failed:false is the exact complement, not a passed filter; Boolean values must be unquoted and use :. Strings must be quoted; : matches exactly and ~ matches substrings (at least 3 characters). Mix AND and OR with parentheses: AND binds more tightly than OR, and whitespace means AND. Prefix a clause or group directly with - to negate it. Allow at most 10 clauses and 10 nested parentheses levels. Timestamps are integer Unix seconds. status:\"failed\" is a raw-result filter and includes expected failures; use status:\"failed\" AND expected_status:\"failed\" to find those. Use failed:true AND status:\"passed\" for unexpected passes. status:\"flaky\" denotes recovery to an expected result, including an expected failure. Example: (failed:true OR status:\"flaky\") AND branch:\"main\". Each query statement has a five-second limit; narrow run_id or started_at if query_timeout is returned.","in":"query","name":"query"},{"schema":{"type":"string","enum":["id","duration_ms","file","finished_at","started_at","title"],"default":"started_at","description":"Stored field used to order grouped test executions: id, duration_ms, file, finished_at, started_at, or title. File and title ordering is case-insensitive. Nulls are always last."},"required":false,"description":"Stored field used to order grouped test executions: id, duration_ms, file, finished_at, started_at, or title. File and title ordering is case-insensitive. Nulls are always last.","in":"query","name":"sort_by"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction. ID uses the same direction as the deterministic tie-breaker."},"required":false,"description":"Sort direction. ID uses the same direction as the deterministic tie-breaker.","in":"query","name":"sort_order"}],"responses":{"200":{"description":"A forward page of grouped test executions across runs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiTestRunsResponse"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"504":{"description":"Query time limit exceeded. Narrow the run_id or started_at range and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/projects/{project_id}/tests":{"get":{"operationId":"listPublicTests","security":[{"OAuth2":["test-results:read"]},{"PublicApiKey":[]}],"summary":"List test definitions","parameters":[{"schema":{"type":"string","minLength":1,"description":"ID of a project visible to the authenticated credential."},"required":true,"description":"ID of a project visible to the authenticated credential.","in":"path","name":"project_id"},{"schema":{"type":"string","minLength":1,"description":"Opaque forward-pagination cursor containing only the active sort key and ID."},"required":false,"description":"Opaque forward-pagination cursor containing only the active sort key and ID.","in":"query","name":"after"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Number of tests to return (maximum 100)."},"required":false,"description":"Number of tests to return (maximum 100).","in":"query","name":"first"},{"schema":{"type":"string","minLength":1,"description":"Search expression over id, title, file, created_at, archived_at, quarantined_at, active_issue_types, and success_rate. Mix AND and OR with parentheses: AND binds more tightly than OR, and whitespace means AND. Prefix a clause or group directly with - to negate it. Supports field-specific operators, at most 10 clauses in total, and 10 nested parentheses levels. Archived tests are excluded unless archived_at appears anywhere in the expression, including in a negated group. Use -quarantined_at:null for currently quarantined tests or quarantined_at:null for tests without active quarantine. Example: (title~\"checkout\" OR file~\"checkout\") AND -(quarantined_at:null OR success_rate:null). Timestamps are integer Unix seconds."},"required":false,"description":"Search expression over id, title, file, created_at, archived_at, quarantined_at, active_issue_types, and success_rate. Mix AND and OR with parentheses: AND binds more tightly than OR, and whitespace means AND. Prefix a clause or group directly with - to negate it. Supports field-specific operators, at most 10 clauses in total, and 10 nested parentheses levels. Archived tests are excluded unless archived_at appears anywhere in the expression, including in a negated group. Use -quarantined_at:null for currently quarantined tests or quarantined_at:null for tests without active quarantine. Example: (title~\"checkout\" OR file~\"checkout\") AND -(quarantined_at:null OR success_rate:null). Timestamps are integer Unix seconds.","in":"query","name":"query"},{"schema":{"type":"string","enum":["id","archived_at","created_at","title","file","success_rate"],"default":"created_at","description":"Field used to order tests."},"required":false,"description":"Field used to order tests.","in":"query","name":"sort_by"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction. ID uses the same direction as the deterministic tie-breaker."},"required":false,"description":"Sort direction. ID uses the same direction as the deterministic tie-breaker.","in":"query","name":"sort_order"}],"responses":{"200":{"description":"A forward page of test definitions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiTestsResponse"}}}},"400":{"description":"Invalid parameters, query, or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"401":{"description":"Missing or invalid OAuth bearer token or API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"402":{"description":"The project workspace does not have product access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"403":{"description":"The credential lacks the required permission; configuration writes require a Read + write project key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"409":{"description":"Configuration conflicts with an existing resource or integration requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"429":{"description":"Credential or workspace rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Seconds before retrying."},"required":true,"description":"Seconds before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}},"/api/public/v1/openapi.json":{"get":{"operationId":"getPublicApiOpenApiDocument","summary":"Get the OpenAPI document","responses":{"200":{"description":"OpenAPI 3.1.1 document.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}}}}}}}},"webhooks":{}}