---
schema_version: "1"
id: 8a2e4de278b3aa1769691b674c70c2c8f2b0d51ad938a845a7e0941af3e729b9
title: Filter Test Discovery API Results with the testLevel Parameter
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/264-0-0/rn_apex_discovery_api_testlevel.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_discovery_api_testlevel.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f565b58afbfdb5ff5cac604203a7b25598c68fc5c2afe37deaacdcda2c813893
description: Use the testLevel query parameter in the Test Discovery API to filter which test methods are returned based on their test level. The testLevel parameter replaces the showAllMethods parameter in API version 68.0 and later. The deprecated showAllMethods parameter is available only in API version 67.0 and earlier.
products:
  - Cross Cloud
release: "264"
---
# Filter Test Discovery API Results with the testLevel Parameter

Use the `testLevel` query parameter in the Test Discovery API to filter which test methods are returned based on their test level. The `testLevel` parameter replaces the `showAllMethods` parameter in API version 68.0 and later. The deprecated `showAllMethods` parameter is available only in API version 67.0 and earlier.

**Where:** This parameter is available in API version 68.0 and later. The Test Discovery API is available in Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.

**Why:** The `testLevel` query parameter aligns with the `testLevel` request body parameter for the Test Runner API. To return all tests in the org regardless of namespace, set the value to `RunAllTestsInOrg`. To return tests in the org’s namespace, as well as flow tests, set the value to `RunLocalTests`. If the parameter isn’t specified, the test level defaults to `RunAllTestsInOrg`.

**How:** Make a GET request to the /services/data/v68.0/tooling/tests Tooling API endpoint, and specify the `testLevel` as a request query parameter.

For example, this request queries for unit tests in the org’s namespace and the `FlowTesting` namespace. It excludes tests that originate from installed managed packages.

```
/services/data/v68.0/tooling/tests?testLevel=RunLocalTests
```

#### See Also

- [_Tooling API Developer Guide_: Retrieve Unit Tests](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_tooling.meta/api_tooling/intro_rest_resources_testing_discovery.htm)
- [_Tooling API Developer Guide_: Run Unit Tests Asynchronously](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_tooling.meta/api_tooling/intro_rest_resources_testing_runner_async.htm)