---
schema_version: "1"
id: 8a41901a4cdc2c5ba238af42b89eb064931aa9ec374e7c3d63746106f7ab1a7c
title: ApexCodeCoverageAggregate
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_apexcodecoverageaggregate.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexcodecoverageaggregate.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e0b6007571dbb42d2d2cfb1e94b4faf9e6411143bc1fd47c376769dbb0b9383d
description: Represents aggregate code coverage test results for an Apex class or trigger. Available in Tooling API version 29.0 and later.
---
# ApexCodeCoverageAggregate

Represents aggregate code coverage test results for an Apex class or trigger. Available in Tooling API version 29.0 and later.

## Supported SOAP API Calls

describeSObjects(), query(), retrieve()

## Supported REST API HTTP Methods

Query, GET, DELETE

## Special Access Rules

In API version 49.0 and later, users must have the View Setup and Configuration permission to access this object.

## Fields

| Field | Details |
| --- | --- |
| ApexClassorTriggerId | 
Type

string

Properties

Filter, Group, Sort

Description

The ID of the class or trigger under test.



 |
| NumLinesCovered | 

Type

int

Properties

Filter, Group, Sort

Description

The number of covered lines.



 |
| NumLinesUncovered | 

Type

int

Properties

Filter, Group, Sort

Description

The number of uncovered lines.



 |
| Coverage | 

Type

complexvalue

Properties

None

Description

Two lists of integers. The first is the covered lines, and the second is the list of uncovered lines. If a line is missing from both lists, the line isn’t executable and doesn’t require coverage.

Coverage includes the following fields:

- coveredLines
- namespace
- uncoveredLines





 |

## Usage

To query for aggregate code coverage, specify an Apex test class. The returned JSON or XML object will contain two lists of integers: one for covered and one for uncovered lines. For examples, see [ApexCodeCoverage](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexcodecoverage.htm "Represents code coverage test results for an Apex class or trigger. Available in Tooling API version 29.0 and later.").