---
title: "Get flaky tests for a project"
method: GET
path: "/insights/{project-slug}/flaky-tests"
tags: ["Insights"]
---

# Get flaky tests for a project

`GET /insights/{project-slug}/flaky-tests`

Get a list of flaky tests for a given project. Flaky tests are branch agnostic.
             A flaky test is a test that passed and failed in the same commit.

## Path parameters

- `project-slug` string, required

## Response `200`

A list of flaky tests for a project

- object — Flaky tests response
  - `flaky-tests` object[], required — A list of all instances of flakes. Note that a test is no longer considered flaky after 2 weeks have passed without a flake. Each flake resets this timer.
    - `time-wasted` integer
    - `workflow-created-at` string, required — The date and time when workflow was created.
    - `workflow-id` unknown, required
    - `classname` string, required — The class the test belongs to.
    - `pipeline-number` integer, required — The number of the pipeline.
    - `workflow-name` string, required — The name of the workflow.
    - `test-name` string, required — The name of the test.
    - `job-name` string, required — The name of the job.
    - `job-number` integer, required — The number of the job.
    - `times-flaked` integer, required — The number of times the test flaked.
    - `source` string, required — The source of the test.
    - `file` string, required — The file the test belongs to.
  - `total-flaky-tests` number, double, required — A count of unique tests that have failed. If your project has N tests that have flaked multiple times each, this will be equal to N.

## Other responses

- `default` — Error response.

---

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