---
title: "Get analytics (project-scoped)"
method: GET
path: "/api/v1/project/analytics"
tags: ["Project"]
---

# Get analytics (project-scoped)

`GET /api/v1/project/analytics`

## Request

- Base URL: `https://app.gaffer.sh`
- URL: `https://app.gaffer.sh/api/v1/project/analytics`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Returns analytics summary including health score, pass rate, and flaky test count.
The analysis period is clamped by your plan tier.

## Query parameters

- `days` integer

## Response `200`

Analytics summary

- 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

## Other responses

- `400`: Invalid request parameters
- `401`: Missing or invalid API key

---

[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)
