---
title: "Query test impact analysis sessions"
method: GET
path: "/testImpact"
tags: ["AgentSession"]
---

# Query test impact analysis sessions

`GET /testImpact`

Lists a workspace's test impact analysis sessions, newest first, with the change references each was requested for and the outcome of the test runs it triggered. Sessions are listed whether or not they carry a change reference. Empty when generative AI is not enabled for the workspace.

## Query parameters

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

## Response `200`

Query results

- TestImpactSessionQueryResult — Result of querying test impact analysis sessions
  - `items` TestImpactSessionSummary[], required — The analyses matching the query, newest first
    - `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 of results

## Other responses

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

## Changes

- **2026-09-30** `598f76d12bd1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mabl/apis/mabl-api/changes/testImpact/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/f841ef0a3bc7?raw)
