# list_test_runs

`tools/call` · `POST /clanker/v1/test-runs:list`

List published test runs, newest first, 50 at a time: each run's number, product, environment, commit, branch, result and counts. Filter to find the run for a change, then read it with get_test_run. Send nextCursor as cursor for the next page. Needs read access.

- Area: Test runs
- Needs the read grant. Read-only. Idempotent.

## Inputs

- `product` (string): Only this product's runs, by slug, such as storefront.
- `environment` (string): Only runs against this environment, by slug, such as staging.
- `result` (string, one of: `passed`, `failed`, `flaky`): Only runs with this result; flaky runs passed after retries.
- `query` (string): Words in the branch or commit subject, or the start of a commit SHA.
- `commit` (string): Only runs of this exact commit SHA.
- `mine` (boolean): Only runs your person published.
- `cursor` (integer): The previous page's nextCursor: runs numbered below it. From -9,007,199,254,740,991 to 9,007,199,254,740,991.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_test_runs",
    "arguments": {
      "product": "storefront",
      "result": "failed"
    }
  }
}
```

## HTTP request

The same call over the clanker HTTP API, with a clanker OAuth access token:

```bash
curl -X POST https://api.clankership.com/clanker/v1/test-runs:list \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "product": "storefront",
    "result": "failed"
  }'
```
