# Get a test run `GET /distribution/v1/runs/{run_id}` Return a single test run: what it was asked to exercise, and what it found. ## Request example ```bash curl --request GET \ --url 'https://api.eu1.luigisbox.ai/distribution/v1/runs/' \ --header 'Authorization: Bearer ' ``` ## Path Parameters | Name | Type | Required | Description | Constraints | |---|---|---|---|---| | `run_id` | `string` | Yes | Test run to read, e.g. `lbtr_3n8q1v`. | — | ## Responses | Status | Description | Content | |---|---|---| | `200` | Successful Response | application/json: TestRunView | | `401` | Missing or invalid credentials | application/json: ErrorResponse | | `403` | Authenticated but not permitted | application/json: ErrorResponse | | `404` | Resource not found | application/json: ErrorResponse | | `422` | Request validation failed | application/json: ErrorResponse | | `503` | Service temporarily unavailable | application/json: ErrorResponse | ### 200 Successful Response #### application/json Schema: `TestRunView` ##### Attributes | Attribute | Type | Required | Description | Constraints | |---|---|---|---|---| | `artifact_schema_version` | `anyOf(integer, null)` | No | Version of the **artifact** shape these summarized fields were read from. The report's version, not this endpoint's — the two are unrelated. | — | | `attribution_status` | `anyOf(string, null)` | No | Which channel the page tried to be: `confirmed`, `mismatch`, `unobserved` or `not-integrated`. Not a health signal: `confirmed` says the page attempted to reach Luigi's Box, and holds even when every one of those requests was refused. Behaviour findings come from the scenarios. | — | | `branch` | `anyOf(string, null)` | No | The branch pushed to, when there was one. | — | | `build_selector` | `anyOf(string, null)` | No | The label the tested build was published under — the full commit SHA for a production push, a sanitized ref for an opted-in branch, `null` for a run against live production. **Not a branch name:** a ref whose name needed sanitizing publishes under a different string. | — | | `channel_id` | `string` | Yes | The channel the run was asked to exercise, e.g. `lbn_kz1yve`. What the page actually identified itself as is `observed_channel_ids`, and the two can legitimately differ. | — | | `commit_sha` | `anyOf(string, null)` | No | The commit built and tested, when there was one. | — | | `completed_at` | `anyOf(string, null)` | No | When the run reached a terminal status. | — | | `created_at` | `string` | Yes | When the run was recorded. | format: date-time | | `document_status` | `anyOf(integer, null)` | No | HTTP status of the first document served. A non-2xx is why a run errors. | — | | `error_message` | `anyOf(string, null)` | No | Why a run produced no verdicts at all. Present on every `error`, and the only thing separating its causes: a page that could not be reached, an internal failure, a pipeline that failed at a step before the agent (naming the step), a report that was never published, or one this service could not read — the last two naming the location it looked in. | — | | `failed_count` | `anyOf(integer, null)` | No | How many scenarios failed. | — | | `failing_assertions` | `anyOf(Array, null)` | No | Names of the assertions that failed, across every scenario. | — | | `flags` | `Array` | No | How the tested pair was arrived at, recorded here because nothing else learns it. `gate_pair_undeclared` — the repository named no channel or origin, so both were picked arbitrarily and may not be the target that was meant. `origin_unconfirmed` — the repository declared an origin and auth-service did not answer for the channel, so it was tested without being confirmed against the allowlist, which is the usual reason a run fails while obtaining a browser token. Runs recorded before the gate stopped pushes on a refused origin may carry `origin_not_allowlisted`: the declared origin was tested although auth-service did not allow it. | — | | `loader_tag_present` | `anyOf(boolean, null)` | No | Whether our loader tag was found in the page. Separate from attribution: it distinguishes the snippet being absent from the site from the snippet being present and never firing. | — | | `observed_channel_ids` | `anyOf(Array, null)` | No | Every channel id the page was seen identifying itself as. | — | | `organization_id` | `anyOf(string, null)` | No | Organization the run was performed for. | — | | `origin` | `string` | Yes | The single origin the browser opened. | — | | `report_uri` | `anyOf(string, null)` | No | Where the run's report was published. `null` when no report was ever read, and once it has expired. | — | | `repository_id` | `anyOf(string, null)` | No | Repository whose push caused the run. Absent for a run with no repository. | — | | `run_id` | `string` | Yes | Assigned run id, e.g. `lbtr_3n8q1v`. Also names the run's artifact prefix. | — | | `scenario_source` | `anyOf(string, null)` | No | Where the executed scenarios came from: `repo`, `defaults-only`, or both. `defaults-only` proves only that the page renders, nothing about the Luigi's Box integration. | — | | `status` | `TestRunStatus` | Yes | Where the run stands. `queued` is the only non-terminal value; the rest are the agent's own verdicts. `skipped` means the run happened and every scenario was skipped — it checked nothing. | — | | `transcripts_prefix` | `anyOf(string, null)` | No | Where the run's transcripts were published. Null on the same terms as `report_uri`. | — | | `trigger_kind` | `TriggerKind` | Yes | What caused the run to happen. | — | | `updated_at` | `string` | Yes | When the run record last changed. | format: date-time | | `warning_count` | `anyOf(integer, null)` | No | How many scenarios warned. | — | ##### Response example ```json { "artifact_schema_version": 1, "attribution_status": "example", "branch": "example", "build_selector": "example", "channel_id": "example", "commit_sha": "example", "completed_at": "2026-04-15T12:00:00Z", "created_at": "2026-04-15T12:00:00Z", "document_status": 1, "error_message": "example", "failed_count": 1, "failing_assertions": [ "example" ], "flags": [ "example" ], "loader_tag_present": true, "observed_channel_ids": [ "example" ], "organization_id": "example", "origin": "example", "report_uri": "example", "repository_id": "example", "run_id": "example", "scenario_source": "example", "status": "queued", "transcripts_prefix": "example", "trigger_kind": "pipeline", "updated_at": "2026-04-15T12:00:00Z", "warning_count": 1 } ``` ### 401 Missing or invalid credentials #### application/json Schema: `ErrorResponse` ##### Attributes | Attribute | Type | Required | Description | Constraints | |---|---|---|---|---| | `exception_details` | `ExceptionDetails` | No | Machine-readable error context; empty object when there is nothing to add. | — | | `exception_details.error_code` | `string` | No | Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. `filter_unknown_field` or `cursor_mismatch`. Safe to branch on; `reason` is not. Absent when the status code says all there is to say. | — | | `exception_details.validation_errors` | `Array` | No | Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value. | — | | `exception_details.validation_errors[].loc` | `Array` | Yes | Path to the offending value from the request root, e.g. `["body", "filters", 0, "operator"]`. | — | | `exception_details.validation_errors[].msg` | `string` | Yes | What is wrong with the value at `loc`. | — | | `exception_details.validation_errors[].type` | `string` | Yes | Stable machine code for the problem, e.g. `missing` or `string_too_short`. | — | | `exception_details.*` | `any` | No | Additional property. | — | | `reason` | `string` | Yes | Human-readable, actionable error message. | — | | `request_id` | `anyOf(string, null)` | No | Request correlation ID (matches the X-Request-Id response header). | — | ##### Response example ```json { "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example" } ``` ### 403 Authenticated but not permitted #### application/json Schema: `ErrorResponse` ##### Attributes | Attribute | Type | Required | Description | Constraints | |---|---|---|---|---| | `exception_details` | `ExceptionDetails` | No | Machine-readable error context; empty object when there is nothing to add. | — | | `exception_details.error_code` | `string` | No | Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. `filter_unknown_field` or `cursor_mismatch`. Safe to branch on; `reason` is not. Absent when the status code says all there is to say. | — | | `exception_details.validation_errors` | `Array` | No | Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value. | — | | `exception_details.validation_errors[].loc` | `Array` | Yes | Path to the offending value from the request root, e.g. `["body", "filters", 0, "operator"]`. | — | | `exception_details.validation_errors[].msg` | `string` | Yes | What is wrong with the value at `loc`. | — | | `exception_details.validation_errors[].type` | `string` | Yes | Stable machine code for the problem, e.g. `missing` or `string_too_short`. | — | | `exception_details.*` | `any` | No | Additional property. | — | | `reason` | `string` | Yes | Human-readable, actionable error message. | — | | `request_id` | `anyOf(string, null)` | No | Request correlation ID (matches the X-Request-Id response header). | — | ##### Response example ```json { "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example" } ``` ### 404 Resource not found #### application/json Schema: `ErrorResponse` ##### Attributes | Attribute | Type | Required | Description | Constraints | |---|---|---|---|---| | `exception_details` | `ExceptionDetails` | No | Machine-readable error context; empty object when there is nothing to add. | — | | `exception_details.error_code` | `string` | No | Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. `filter_unknown_field` or `cursor_mismatch`. Safe to branch on; `reason` is not. Absent when the status code says all there is to say. | — | | `exception_details.validation_errors` | `Array` | No | Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value. | — | | `exception_details.validation_errors[].loc` | `Array` | Yes | Path to the offending value from the request root, e.g. `["body", "filters", 0, "operator"]`. | — | | `exception_details.validation_errors[].msg` | `string` | Yes | What is wrong with the value at `loc`. | — | | `exception_details.validation_errors[].type` | `string` | Yes | Stable machine code for the problem, e.g. `missing` or `string_too_short`. | — | | `exception_details.*` | `any` | No | Additional property. | — | | `reason` | `string` | Yes | Human-readable, actionable error message. | — | | `request_id` | `anyOf(string, null)` | No | Request correlation ID (matches the X-Request-Id response header). | — | ##### Response example ```json { "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example" } ``` ### 422 Request validation failed #### application/json Schema: `ErrorResponse` ##### Attributes | Attribute | Type | Required | Description | Constraints | |---|---|---|---|---| | `exception_details` | `ExceptionDetails` | No | Machine-readable error context; empty object when there is nothing to add. | — | | `exception_details.error_code` | `string` | No | Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. `filter_unknown_field` or `cursor_mismatch`. Safe to branch on; `reason` is not. Absent when the status code says all there is to say. | — | | `exception_details.validation_errors` | `Array` | No | Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value. | — | | `exception_details.validation_errors[].loc` | `Array` | Yes | Path to the offending value from the request root, e.g. `["body", "filters", 0, "operator"]`. | — | | `exception_details.validation_errors[].msg` | `string` | Yes | What is wrong with the value at `loc`. | — | | `exception_details.validation_errors[].type` | `string` | Yes | Stable machine code for the problem, e.g. `missing` or `string_too_short`. | — | | `exception_details.*` | `any` | No | Additional property. | — | | `reason` | `string` | Yes | Human-readable, actionable error message. | — | | `request_id` | `anyOf(string, null)` | No | Request correlation ID (matches the X-Request-Id response header). | — | ##### Response example ```json { "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example" } ``` ### 503 Service temporarily unavailable #### application/json Schema: `ErrorResponse` ##### Attributes | Attribute | Type | Required | Description | Constraints | |---|---|---|---|---| | `exception_details` | `ExceptionDetails` | No | Machine-readable error context; empty object when there is nothing to add. | — | | `exception_details.error_code` | `string` | No | Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. `filter_unknown_field` or `cursor_mismatch`. Safe to branch on; `reason` is not. Absent when the status code says all there is to say. | — | | `exception_details.validation_errors` | `Array` | No | Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value. | — | | `exception_details.validation_errors[].loc` | `Array` | Yes | Path to the offending value from the request root, e.g. `["body", "filters", 0, "operator"]`. | — | | `exception_details.validation_errors[].msg` | `string` | Yes | What is wrong with the value at `loc`. | — | | `exception_details.validation_errors[].type` | `string` | Yes | Stable machine code for the problem, e.g. `missing` or `string_too_short`. | — | | `exception_details.*` | `any` | No | Additional property. | — | | `reason` | `string` | Yes | Human-readable, actionable error message. | — | | `request_id` | `anyOf(string, null)` | No | Request correlation ID (matches the X-Request-Id response header). | — | ##### Response example ```json { "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example" } ```