---
title: "Upload Coverage"
method: POST
path: "/snapshots/{snapshot_id}/health/coverage"
tags: ["code-health"]
---

# Upload Coverage

`POST /snapshots/{snapshot_id}/health/coverage`

Ingest an uploaded coverage report (lcov / cobertura / clover /
repowise-json) into the repo's coverage artifact.

Owner-only. The uploaded report's paths are reconciled against the
snapshot's file tree; any that can't be matched come back in
``unmatched_paths`` so a partial upload is visible, never silent.
Stored repo-scoped (not under the snapshot's head prefix) so the report
survives reindexes; reads re-join it onto the then-active snapshot.

## Path parameters

- `snapshot_id` string, required

## Response `200`

Successful Response

- CoverageUploadResponse — Result of ingesting an uploaded coverage report — the matched summary plus the paths that could not be reconciled to the snapshot's file tree, so the uploader sees exactly what did and didn't land.
  - `source_format` string, required
  - `overall_line_coverage_pct` number, nullable
  - `file_count_with_coverage` integer
  - `report_file_count` integer
  - `matched_file_count` integer
  - `unmatched_paths` string[]
  - `ingested_at` string, nullable
  - `has_contexts` boolean
  - `test_map_rows` integer

## Other responses

- `422` — Validation Error

---

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