---
title: "Get code coverage summary for a commit"
method: POST
path: "/api/v2/code-coverage/commit/summary"
tags: ["Code Coverage"]
---

# Get code coverage summary for a commit

`POST /api/v2/code-coverage/commit/summary`

Retrieve aggregated code coverage statistics for a specific commit in a repository.
This endpoint provides overall coverage metrics as well as breakdowns by service
and code owner.

The commit SHA must be a 40-character hexadecimal string (SHA-1 hash).

## Request body

- CommitCoverageSummaryRequest — Request object for getting code coverage summary for a commit.
  - `data` CommitCoverageSummaryRequestData, required — Data object for commit summary request.
    - `attributes` CommitCoverageSummaryRequestAttributes, required — Attributes for requesting code coverage summary for a commit.
      - `commit_sha` string, required — The commit SHA (40-character hexadecimal string).
      - `repository_id` string — Deprecated: use `repository_url` instead. The repository URL.
      - `repository_url` string — The repository URL. Accepts a full URL with or without a scheme (for example, `https://github.com/org/repo` or `github.com/org/repo`).
    - `type` 'ci_app_coverage_commit_summary_request', required — JSON:API type for commit coverage summary request. The value must always be `ci_app_coverage_commit_summary_request`.

## Response `200`

OK

- CoverageSummaryResponse — Response object containing code coverage summary.
  - `data` CoverageSummaryData — Data object for coverage summary response.
    - `attributes` CoverageSummaryAttributes — Attributes object for code coverage summary response.
      - `codeowners` object, nullable — Coverage statistics broken down by code owner.
      - `evaluated_flags_count` integer — Total number of coverage flags evaluated.
      - `evaluated_reports_count` integer — Total number of coverage reports evaluated.
      - `patch_coverage` number, double, nullable — Overall patch coverage percentage.
      - `services` object, nullable — Coverage statistics broken down by service.
      - `total_coverage` number, double, nullable — Overall total coverage percentage.
    - `id` string — Unique identifier for the coverage summary (base64-hashed).
    - `type` 'ci_app_coverage_summary' — JSON:API type for coverage summary response. The value must always be `ci_app_coverage_summary`.

## Other responses

- `400` — Bad Request
- `403` — Not Authorized
- `404` — Not Found
- `429` — Too many requests
- `500` — Internal server error

---

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