---
title: "Coverage report tree"
method: GET
path: "/{service}/{owner_username}/repos/{repo_name}/report/tree"
tags: ["Coverage"]
---

# Coverage report tree

`GET /{service}/{owner_username}/repos/{repo_name}/report/tree`

Returns a hierarchical view of the report that matches the file structure of the covered files
with coverage info rollups at each level.

Returns only top-level data by default but the depth of the traversal can be controlled via
the `depth` parameter.

* `depth` - how deep in the tree to traverse (default=1)
* `path` - path in the tree from which to start the traversal (default is the root)

## Path parameters

- `owner_username` string, required
- `repo_name` string, required
- `service` 'bitbucket' | 'bitbucket_server' | 'github' | 'github_enterprise' | 'gitlab' | 'gitlab_enterprise', required

## Query parameters

- `branch` string
- `component_id` string
- `depth` string
- `flag` string
- `path` string
- `sha` string

## Response `200`

- Tree
  - `name` string, required
  - `full_path` string, required
  - `coverage` number, double, required
  - `lines` integer, required
  - `hits` integer, required
  - `partials` integer, required
  - `misses` integer, required

---

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