---
title: "Get a single test stat as a time series"
method: GET
path: "/ci/{owner}/repositories/{repository}/tests/stats/{stat}"
tags: ["test_insights"]
---

# Get a single test stat as a time series

`GET /ci/{owner}/repositories/{repository}/tests/stats/{stat}`

Return one test stat with a window summary `value` and a per-day `value_over_time` series of failed executions.

## Path parameters

- `stat` 'total_tests' | 'healthy_tests' | 'broken_tests' | 'flaky_tests' | 'failed_executions', required
- `owner` string, required — The owner of the repository
- `repository` string, required — The name of the repository

## Query parameters

- `test_name` string[], nullable — The test name to filter on
- `test_name_exclude` string[], nullable — The test name to exclude
- `job_name` string[], nullable — The job name to filter on
- `job_name_exclude` string[], nullable — The job name to exclude
- `pipeline_name` string[], nullable — The pipeline name to filter on
- `pipeline_name_exclude` string[], nullable — The pipeline name to exclude
- `health_confidence` HealthConfidence[], nullable — The health confidence to filter on
- `health_confidence_exclude` HealthConfidence[], nullable — The health confidence to exclude
- `failed_executions_impact` string[], nullable — The failed executions impact to filter on
- `failed_executions_impact_exclude` string[], nullable — The failed executions impact to exclude

## Response `200`

Successful Response

- GetTestStatResponse
  - `stat` 'total_tests' | 'healthy_tests' | 'broken_tests' | 'flaky_tests' | 'failed_executions', required
  - `value` integer, required
  - `value_over_time` TestStatBucket[], required
    - `start` string, date-time, required
    - `end` string, date-time, required
    - `value` integer, required

## Other responses

- `403` — Forbidden
- `404` — Not found
- `409` — Conflict
- `422` — Unprocessable entity

---

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