v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Code Coverage

Get code coverage summary for a branch

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

post/api/v2/code-coverage/branch/summary

Request body

Example request

{
  "data": {
    "attributes": {
      "branch": "prod",
      "repository_id": "github.com/datadog/shopist",
      "repository_url": "https://github.com/datadog/shopist"
    },
    "type": "ci_app_coverage_branch_summary_request"
  }
}

Response

OK

Example response

{
  "data": {
    "attributes": {
      "evaluated_flags_count": 8,
      "evaluated_reports_count": 12,
      "patch_coverage": 70.1,
      "total_coverage": 82.4
    },
    "id": "ZGQxMjM0NV9tYWluXzE3MDk1NjQwMDA=",
    "type": "ci_app_coverage_summary"
  }
}