---
title: "Get project health"
method: GET
path: "/api/v1/user/projects/{projectId}/health"
tags: ["User Projects"]
---

# Get project health

`GET /api/v1/user/projects/{projectId}/health`

## Request

- Base URL: `https://app.gaffer.sh`
- URL: `https://app.gaffer.sh/api/v1/user/projects/{projectId}/health`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `X-API-Key`
  - HTTP bearer

Returns analytics overview for a project including health score,
pass rate, test run count, trend direction, and flaky test count.
The analysis period is clamped by your plan tier.

## Path parameters

- `projectId` string, required

## Query parameters

- `days` integer

## Response `200`

Health analytics for the project

- object
  - `analytics` HealthSummary: Project health analytics summary.
    - `projectId` string, required
    - `projectName` string, required
    - `period` object, required
      - `days` integer, required
      - `start` string, date-time, required
      - `end` string, date-time, required
    - `healthScore` integer, required: Overall health score (0-100)
    - `passRate` number, nullable: Average pass rate as percentage
    - `testRunCount` integer, required: Number of test runs in the period
    - `totalTests` integer, required: Total test executions
    - `flakyTestCount` integer, required: Number of flaky tests detected
    - `trend` 'up' | 'down' | 'stable', required: Pass rate trend direction
    - `computedAt` string, date-time, required
  - `meta` Meta, nullable: Present when query parameters were clamped by plan tier limits. Only included in the response when clamping actually occurred.
    - `appliedDays` integer: The actual days value used after clamping
    - `requestedDays` integer: The days value originally requested
    - `appliedLimit` integer: The actual limit value used after clamping
    - `requestedLimit` integer: The limit value originally requested
    - `clampedByPlan` boolean: Always true when this object is present

## Other responses

- `400`: Invalid request parameters
- `401`: Missing or invalid API key
- `404`: Resource not found

---

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