---
title: "Retrieve last 10 test runs for each test in a workspace"
method: GET
path: "/testRuns/workspace/{workspace_id}/byTest"
tags: ["TestRun"]
---

# Retrieve last 10 test runs for each test in a workspace

`GET /testRuns/workspace/{workspace_id}/byTest`

Used to retrieve last n test runs for each test in a workspace

## Path parameters

- `workspace_id` string, required

## Query parameters

- `maxRunsPerTest` integer, required
- `limit` integer
- `cursor` string

## Response `200`

History of test runs by tests in the specified workspace

- TestHistoryQueryResult — Contains map of test to most recent test run
  - `cursor` string — The cursor to use to continue paging
  - `tests` TestHistory[] — Test ids with recent test runs of that test
    - `test_id` string
    - `test_runs` TestRunStatusSummary[]
      - `journey_run_id` string
      - `status` string
      - `started_time` integer
      - `completed_time` integer

## Other responses

- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
