search_test_plans
Search Zephyr Scale test plans using TQL to filter by project, folder, status, owner, key, or labels. Use exact folder paths and paginate results when needed.
Instructions
Search test plans with a TQL query (GET /testplan/search). For test plans the searchable fields include projectKey, folder, name, status, key, owner and labels (verified live) — the exact set varies by Zephyr Scale version, and an unsupported field fails with 400 "Unrecognized field: ".
folder matches EXACTLY: plans in a subfolder of the given path are NOT returned. A folder path that does not exist is not an error here — it comes back as an empty page (count 0), unlike search_test_cases and search_test_runs, which answer 400 for the same path.
TQL quick reference:
Test case fields: projectKey, key, name, status, priority, component, folder, estimatedTime, labels, owner, issueKeys + custom fields (field name in double quotes).
Test run (cycle) fields: ONLY projectKey and folder.
Operators: =, >, >=, <, <=, IN; the only logical connector is AND (no OR).
Syntax is strict: spaces around operators are mandatory, string values in double quotes. Folder paths start with "/" ("/" is the root). For single/multi-choice custom fields '=' does not work — use IN.
Examples: projectKey = "PROJ" AND status = "Draft" AND priority = "High" projectKey = "PROJ" AND folder = "/Regression/Payments" projectKey = "PROJ" AND labels IN ("smoke", "ui") projectKey = "PROJ" AND "My Field" IN ("Value") key IN ("PROJ-T50", "PROJ-T90") projectKey = "PROJ" AND issueKeys IN ("PROJ-5")
Returns { startAt, maxResults, count, isLast, values }; isLast is the heuristic count < maxResults. Paginate with startAt (default 0) and maxResults (default 50; the API server-side default is 200).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | TQL query, e.g. projectKey = "PROJ" AND folder = "/Releases" | |
| fields | No | Return only these fields, e.g. ["key","name","status"]; sent to the API as one comma-separated parameter | |
| startAt | No | 0-based index of the first result to return (default 0) | |
| maxResults | No | Maximum number of results to return (default 50; the API server-side default is 200) |