---
schema_version: "1"
id: 87d24b56c38cd8c74e80fe66c3c695831446ff33d79193ed82e50def948d37f0
title: Filter Test Discovery API Results by Test Category
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/260-0-0/rn_apex_unified_testing_category.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_unified_testing_category.htm&release=260&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 23cb9da71088d278a3a72380f77d31127cc9a2d8b93155ff674ebaf42708f728
description: To retrieve only flow tests or only Apex tests, use the new category query parameter in calls to the Test Discovery API endpoint. Previously, you could filter tests only by namespace prefix and test method visibility. Filtering by test category is helpful in orgs with large test suites across different namespaces.
products:
  - Cross Cloud Packages Solutions
release: "260"
---
# Filter Test Discovery API Results by Test Category

To retrieve only flow tests or only Apex tests, use the new `category` query parameter in calls to the Test Discovery API endpoint. Previously, you could filter tests only by namespace prefix and test method visibility. Filtering by test category is helpful in orgs with large test suites across different namespaces.

**Where:** This feature is available in API version 66.0 and later. This feature is available in Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.

**How:** To retrieve tests in a specific test category, make a GET request to the Test Discovery API endpoint, which is a Tooling API resource. Set the `category` query parameter to either `flow` or `apex`. For example, this call returns only Apex tests.

```
https://MyDomain.my.salesforce.com/services/data/v66.0/tooling/tests?category=apex
```

You can’t specify multiple categories in the same call. However, you can combine the `category` query parameter with other query parameters. For example, this call returns only automated flow tests from the ourManagedPackage namespace.

```
https://MyDomain.my.salesforce.com/services/data/v66.0/tooling/tests?category=flow&namespacePrefix=ourManagedPackage
```

#### See Also

- [_Tooling API_: Retrieve Unit Tests](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/intro_rest_resources_testing_discovery.htm)
- [_Apex Developer Guide_: Testing Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing.htm)
- [_Salesforce Help_: Automatically Test Record-Triggered and Data Cloud-Triggered Flows](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_record_data_cloud_triggered.htm&type=5&language=en_US)