---
title: "List disruptive (flaky) tests for a repository."
method: GET
path: "/api/repos/{owner}/{name}/tests"
tags: ["Tests"]
---

# List disruptive (flaky) tests for a repository.

`GET /api/repos/{owner}/{name}/tests`

## Request

- Base URL: `https://platform.buildpulse.io`
- URL: `https://platform.buildpulse.io/api/repos/{owner}/{name}/tests`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Returns tests with a disruptiveness ratio above 0, sorted by
disruptiveness ratio (default) or by recency. This endpoint is not
time-windowed.

The `q` parameter accepts a structured query string. Terms are
space-separated and AND'd together. Supported terms:

- `first-seen:[op]YYYY-MM-DD` — operators `<`, `<=`, `>`, `>=`
  (no operator = exact day match).
- `last-seen:[op]YYYY-MM-DD` — same operator set.
- `tags:foo,bar` — matches any listed tag.
- bare text — partial, case-insensitive match against
  `suite`, `name`, `file`, and `classname`.

Example: `q=last-seen:>=2026-05-01 tags:auth login`.

## Path parameters

- `owner` string, required
- `name` string, required

## Query parameters

- `limit` integer
- `after` string
- `sort` 'disruptivenessRatio' | 'recency'
- `q` string

## Response `200`

Paginated disruptive tests.

- TestsResponse
  - `count` integer, required
  - `tests` Test[], required
    - `id` string, required: 24-character MongoDB ObjectID hex.
    - `name` string, required
    - `suite` string, required
    - `class` string, required
    - `file` string, required
    - `disruptiveness` number, float, required: Disruptiveness ratio, truncated to 3 decimal places. Ranges from 0.0 (deterministic) to 1.0 (always flakes).
    - `nondeterministic_negative_result_count` integer, required
    - `nondeterminism_first_recorded_at` string, date-time, required
    - `latest_nondeterministic_commit_oid` string, required
    - `latest_nondeterministic_negative_result` Result, required
      - `recorded_at` string, date-time, required
      - `build_url` string, uri, required
      - `message` string, nullable, required: Failure message (negative result) or always `null` (positive result, to match legacy behavior).
    - `latest_nondeterministic_positive_result` Result, required
      - `recorded_at` string, date-time, required
      - `build_url` string, uri, required
      - `message` string, nullable, required: Failure message (negative result) or always `null` (positive result, to match legacy behavior).
  - `metadata` Metadata, required
    - `after` string, nullable, required: Opaque cursor for the next page; `null` if there is no next page.
    - `limit` integer, required

## Other responses

- `400`: Cursor failed to decode.
- `401`: Missing, malformed, or invalid token; or — for legacy 40-hex tokens only — the organization has no active plan (`marketplacePurchases.unitCount > 0`). The new `bp_<64-hex>` path has no plan gate, so a 401 there means the token shape was wrong, the hash didn't match, or the token has expired. Response body is empty (matches legacy Rails).
- `402`: The organization is over its plan's monthly test-result limit and data-read access is restricted (staged-overage stage `soft` or `hard`). At `soft` the data is locked but safe — ingestion keeps recording. At `hard` ingestion is also paused (raw retained ~30 days) and an upgrade resumes processing. Read `GET /api/v1/usage` for the current stage and usage, and visit `upgradeUrl` to restore access. Only returned for organizations positively identified as over the enforced limit while enforcement is enabled.
- `404`: Resource not found.

---

[API](https://skmtc.dev/buildpulse/apis/buildpulse-platform-api.md) · [All operations](https://skmtc.dev/buildpulse/apis/buildpulse-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/buildpulse/apis/buildpulse-platform-api/revisions/2e68b4b2df6a?raw)
