---
title: "Get coverage summary"
method: GET
path: "/api/v1/user/projects/{projectId}/coverage-summary"
tags: ["Coverage"]
---

# Get coverage summary

`GET /api/v1/user/projects/{projectId}/coverage-summary`

## Request

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

Returns coverage summary for a project including current line/branch/function
coverage percentages, trend direction, and the lowest-covered files.
The analysis period is clamped by your plan tier.

## Path parameters

- `projectId` string, required

## Query parameters

- `days` integer

## Response `200`

Coverage summary with trend data

- CoverageSummaryResponse: Coverage summary with trend data. When `hasCoverage` is false, only `message` and `totalReports` are present.
  - `hasCoverage` boolean, required: Whether the project has any coverage data
  - `current` object: Current coverage percentages (present when hasCoverage is true)
    - `lines` number, required
    - `branches` number, required
    - `functions` number, required
  - `trend` object: Coverage trend over the analysis period
    - `direction` 'up' | 'down' | 'stable', required
    - `change` number, required: Percentage point change
  - `totalReports` integer, required
  - `latestReportDate` string, date-time, nullable
  - `lowestCoverageFiles` object[]: Up to 5 files with lowest coverage
    - `path` string, required
    - `coverage` integer, required: Line coverage percentage (0-100)
  - `message` string, nullable: Human-readable message (present when no coverage data exists)
  - `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)
