Forum Discussion

Testing101's avatar
Testing101
Visitor
4 months ago

Is there a way to search for a specific TestCase by name using the REST API?

I'm looking for a way to search for a TestCase by name (or partial name) using the REST API.  I expected to find an endpoint like `v2/testcases/search`, but no such endpoint exists.  Is it possible to use the REST API to search for a TestCase, or do I have to get all the TestCases and search on the client side?

1 Reply

  •  

    Currently, Zephyr does not provide a specific REST API endpoint to search for a TestCase by name or partial name directly on the server. However, there are alternative approaches you can use:

    1. Paginated Retrieval: Use the `GET URL_Redacted endpoint. This endpoint allows you to paginate through the list of TestCases, making it easier to manage the data volume when performing client-side searches.
    2. Client-Side Filtering: After retrieving the paginated list of TestCases, you can implement a search mechanism on the client side to filter by name or partial name.
    3. Feature Request: If server-side search functionality is critical for your workflow, consider submitting a feature request through the product feedback portal.

    Sources

    • Zephyr Enterprise REST API - Search API (https://support.smartbear.com/zephyr-enterprise/docs/en/zephyr-enterprise/zephyr-rest-api/search-api.html)