Skip to content

    Pre-launch API. The concepts described here are settled, but the API shape is not: request and response fields, parameters and defaults can still change. Build against it, and talk to your Luigi's Box contact before you put an integration into production.

    Get a test run

    View source
    GET
    /distribution/v1/runs/{run_id}
    curl --request GET \
    --url https://api.eu1.luigisbox.ai/distribution/v1/runs/example \
    --header 'Authorization: Bearer <token>'

    Return a single test run: what it was asked to exercise, and what it found.

    run_id
    required
    Run Id

    Test run to read, e.g. lbtr_3n8q1v.

    string

    Test run to read, e.g. lbtr_3n8q1v.

    Successful Response

    Media typeapplication/json
    TestRunView

    One execution of the AI testing agent against one origin and channel.

    object
    artifact_schema_version
    Artifact Schema Version

    Version of the artifact shape these summarized fields were read from. The report’s version, not this endpoint’s — the two are unrelated.

    Any of:
    integer
    attribution_status
    Attribution Status

    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.

    Any of:
    string
    branch
    Branch

    The branch pushed to, when there was one.

    Any of:
    string
    build_selector
    Build Selector

    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.

    Any of:
    string
    channel_id
    required
    Channel Id

    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.

    string
    commit_sha
    Commit Sha

    The commit built and tested, when there was one.

    Any of:
    string
    completed_at
    Completed At

    When the run reached a terminal status.

    Any of:
    string format: date-time
    created_at
    required
    Created At

    When the run was recorded.

    string format: date-time
    document_status
    Document Status

    HTTP status of the first document served. A non-2xx is why a run errors.

    Any of:
    integer
    error_message
    Error Message

    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.

    Any of:
    string
    failed_count
    Failed Count

    How many scenarios failed.

    Any of:
    integer
    failing_assertions
    Failing Assertions

    Names of the assertions that failed, across every scenario.

    Any of:
    Array<string>
    flags
    Flags

    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.

    Array<string>
    loader_tag_present
    Loader Tag Present

    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.

    Any of:
    boolean
    observed_channel_ids
    Observed Channel Ids

    Every channel id the page was seen identifying itself as.

    Any of:
    Array<string>
    organization_id
    Organization Id

    Organization the run was performed for.

    Any of:
    string
    origin
    required
    Origin

    The single origin the browser opened.

    string
    report_uri
    Report Uri

    Where the run’s report was published. null when no report was ever read, and once it has expired.

    Any of:
    string
    repository_id
    Repository Id

    Repository whose push caused the run. Absent for a run with no repository.

    Any of:
    string
    run_id
    required
    Run Id

    Assigned run id, e.g. lbtr_3n8q1v. Also names the run’s artifact prefix.

    string
    scenario_source
    Scenario Source

    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.

    Any of:
    string
    status
    required
    TestRunStatus

    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.

    string
    Allowed values: queued pass fail warning error skipped
    transcripts_prefix
    Transcripts Prefix

    Where the run’s transcripts were published. Null on the same terms as report_uri.

    Any of:
    string
    trigger_kind
    required
    TriggerKind

    What caused the run to happen.

    string
    Allowed values: pipeline rerun scheduled manual-qa
    updated_at
    required
    Updated At

    When the run record last changed.

    string format: date-time
    warning_count
    Warning Count

    How many scenarios warned.

    Any of:
    integer

    Example

    {
    "status": "queued",
    "trigger_kind": "pipeline"
    }

    Missing or invalid credentials

    Media typeapplication/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    error_code
    Error Code

    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.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Request Id

    Request correlation ID (matches the X-Request-Id response header).

    Any of:
    string

    Example generated

    {
    "exception_details": {
    "error_code": "example",
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Authenticated but not permitted

    Media typeapplication/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    error_code
    Error Code

    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.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Request Id

    Request correlation ID (matches the X-Request-Id response header).

    Any of:
    string

    Example generated

    {
    "exception_details": {
    "error_code": "example",
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Resource not found

    Media typeapplication/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    error_code
    Error Code

    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.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Request Id

    Request correlation ID (matches the X-Request-Id response header).

    Any of:
    string

    Example generated

    {
    "exception_details": {
    "error_code": "example",
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Request validation failed

    Media typeapplication/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    error_code
    Error Code

    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.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Request Id

    Request correlation ID (matches the X-Request-Id response header).

    Any of:
    string

    Example generated

    {
    "exception_details": {
    "error_code": "example",
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Service temporarily unavailable

    Media typeapplication/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    error_code
    Error Code

    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.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Request Id

    Request correlation ID (matches the X-Request-Id response header).

    Any of:
    string

    Example generated

    {
    "exception_details": {
    "error_code": "example",
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }