---
title: "Query change references with their newest test impact analysis"
method: GET
path: "/testImpact/references"
tags: ["AgentSession"]
---

# Query change references with their newest test impact analysis

`GET /testImpact/references`

Lists a workspace's change references of one type that a live test impact analysis names, one row per reference with its newest such analysis, newest first. A page may hold fewer items than limit, or none, and still return a cursor; the list ends only when cursor is absent. Each page continues after the last row of the previous one, so a reference analyzed again while you page moves to the head and shows on a fresh first page, and a reference whose listed analysis is deleted may appear again further down with an older one. Empty when generative AI is not enabled for the workspace.

## Query parameters

- `workspace_id` string, required
- `reference_type` string, required
- `application_id` string
- `limit` integer
- `cursor` string

## Response `200`

Query results

- TestImpactReferenceQueryResult — One page of change references, each with its newest test impact analysis
  - `items` TestImpactReference[], required — The references on this page, newest analysis first
    - `reference` ChangeReference, required — A reference to the change an analysis is about, in the system that owns it. Supply every reference you know (a pull request and the ticket it closes, for example): the more references an analysis carries, the more views it appears in. Normalized by mabl before it is stored.
      - `type` 'pull_request' | 'commit' | 'branch' | 'issue' | 'test_case' | 'release' | 'custom', required — The kind of thing the reference names, which decides how mabl normalizes the id.
      - `id` string — The identifier in the owning system, e.g. "github.com/mablhq/ui#3341", "9f2c1ab", "MABL-21839". For a pull_request the host is part of the canonical key, so a hostless id such as "mablhq/ui#3341" is a different reference from "github.com/mablhq/ui#3341" and the two never group together; supply the pull request url, either here or in url, and mabl derives the host-qualified form. Required unless url is given and parseable. Whitespace and the characters < > " are rejected, as is a backslash: url parsers read one as a path separator, so a value carrying it names a different thing than it reads as.
      - `url` string, uri — Optional link. Rendered, never parsed for meaning, except to derive the canonical id for a pull_request. When both are given and both name a pull request, they must name the same one. Held to http or https, and rejected for whitespace, < > " or a backslash - a backslash is a path separator to a url parser and an ordinary character to a reader, so one url would name two hosts.
    - `reference_key` string, required — The normalized type:id key that groups analyses of this reference. Pass it as reference to queryTestImpactSessions to list every analysis of this reference.
    - `latest_session` TestImpactSessionSummary, required — One test impact analysis session and what it triggered
      - `id` string, required — The id of the test impact analysis session
      - `workspace_id` string, required — The workspace the analysis ran in
      - `application_id` string — The application the analysis was scoped to
      - `created_time` integer, required — When the analysis was requested
      - `last_updated_time` integer — When the session was last written, including by a deployment event recording that it ran the selected tests. Test runs finishing do not move it.
      - `references` ChangeReference[], required — The normalized change references the analysis was requested for, empty when it carried none
        - `type` 'pull_request' | 'commit' | 'branch' | 'issue' | 'test_case' | 'release' | 'custom', required — The kind of thing the reference names, which decides how mabl normalizes the id.
        - `id` string — The identifier in the owning system, e.g. "github.com/mablhq/ui#3341", "9f2c1ab", "MABL-21839". For a pull_request the host is part of the canonical key, so a hostless id such as "mablhq/ui#3341" is a different reference from "github.com/mablhq/ui#3341" and the two never group together; supply the pull request url, either here or in url, and mabl derives the host-qualified form. Required unless url is given and parseable. Whitespace and the characters < > " are rejected, as is a backslash: url parsers read one as a path separator, so a value carrying it names a different thing than it reads as.
        - `url` string, uri — Optional link. Rendered, never parsed for meaning, except to derive the canonical id for a pull_request. When both are given and both name a pull request, they must name the same one. Held to http or https, and rejected for whitespace, < > " or a backslash - a backslash is a path separator to a url parser and an ordinary character to a reader, so one url would name two hosts.
      - `revision` string — The revision the analysis was requested for
      - `deployment_event_ids` string[], required — The deployment events whose test_selection.impact_session_id names this analysis, empty when none do. Found through the link each event records on the session, so an event whose link was not recorded (its response carried a link_warning) is not listed.
      - `test_run_metrics` ExecutionMetrics, required
        - `total` integer — The total number of executions
        - `passed` integer — The number of executions that passed
        - `failed` integer — The number of executions that failed
        - `running` integer — The number of executions that are still running
        - `skipped` integer — The number of executions that were skipped
        - `terminated` integer — The total number of executions that were terminated before completion
  - `cursor` string — Cursor for the next page, absent on the last page

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

## Changes

- **2026-10-07** `488eade0b398` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mabl/apis/mabl-api/changes/testImpact/references/get.md)

---

[API](https://skmtc.dev/mabl/apis/mabl-api.md) · [All operations](https://skmtc.dev/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mabl/apis/mabl-api/revisions/488eade0b398?raw)
