Use this API to find Vansah Test Cases in a Jira space, or retrieve Test Cases linked to a Jira work item or Test Folder. Filter the results for your automation or reporting workflow and read them a page at a time.
Before you begin
Create a Vansah API token and use the Vansah URL supplied for your workspace. The token account must be able to access the Jira space.
The examples use Bash and cURL. Set VANSAH_URL to your Vansah base URL without a trailing slash and VANSAH_TOKEN to your API token. Replace DEMO with your Jira space key. Keep your token private.
Endpoint and headers
GET /api/v2/testCases
Header | Value |
| Your Vansah API token, without a |
|
|
Send the parameters in the query string. No JSON request body is needed. The API parameter projectKey refers to the Jira space key.
1. Choose the Test Cases to retrieve
Parameter | How to use it |
| The Jira space key, for example |
| Optional. Retrieve Test Cases linked to a Jira work item, for example |
| Optional. Retrieve Test Cases linked to a Test Folder using its UUID. Supply the identifier, not the folder name or path. |
| Optional. One exact Test Case key, for example |
| Optional. Filter by a Test Case UUID. |
| Optional. Select a version when retrieving Test Cases without a folder or work item scope. The default is each Test Case’s current version. With a linked folder or work item, the linked version is used. |
Without a work item, folder, or Test Case selector, the request lists Test Cases in the selected Jira space. For a Standard Test Plan and its iterations, use List Test Cases in a Standard Test Plan (API).
Example: list Test Cases in a Jira space
curl --request GET --get \
--url "$VANSAH_URL/api/v2/testCases" \
--header "Authorization: $VANSAH_TOKEN" \
--header "Accept: application/json" \
--data-urlencode "projectKey=DEMO" \
--data-urlencode "startAt=0" \
--data-urlencode "limit=50" \
--data-urlencode "sortBy=caseKey" \
--data-urlencode "sortOrder=asc"
Example: list Test Cases linked to a work item
Replace DEMO-123 with the Jira work item key:
curl --request GET --get \
--url "$VANSAH_URL/api/v2/testCases" \
--header "Authorization: $VANSAH_TOKEN" \
--header "Accept: application/json" \
--data-urlencode "projectKey=DEMO" \
--data-urlencode "issueKey=DEMO-123" \
--data-urlencode "startAt=0" \
--data-urlencode "limit=50"
To retrieve a folder’s linked Test Cases instead, replace issueKey=DEMO-123 with testFolderIdentifier=YOUR_FOLDER_UUID, using the folder’s actual UUID.
2. Add filters when needed
All filters below are optional. Add them using --data-urlencode so spaces and other characters are encoded correctly.
Filter | What it selects |
| Text within the Test Case key or headline. |
| Test Case type name or UUID. Look up values with List Test Case Types. |
| Test Case status UUID. |
| A label name, or comma-separated label names. Look up names with List Test Case Labels. |
| Jira priority or component IDs. Look up priorities with List Test Case Priorities. |
| Jira account IDs for the assignee, owner, creator, last editor, or tester. |
| Use |
| Script format: |
| One or more result codes, comma-separated. See the table below. |
| Narrow the execution results considered using an environment UUID, Jira version ID, or Jira sprint ID. |
|
|
| Creation date range. Supply both dates. |
| Modification date range. Supply both dates. |
| Execution date range. Supply both dates. |
| Timezone for date filters, for example |
|
|
| Use |
Use YYYY-MM-DD for date filters, for example 2026-11-01 through 2026-11-13. Execution filters determine the latest matching result displayed; a linked Test Case without a matching execution can still appear as untested unless another filter excludes it.
Result filter codes
Code | Result |
| N/A |
| Failed |
| Passed |
| Untested |
| N/A in progress |
| Failed in progress |
| Passed in progress |
| Blocked |
Example: failed Test Cases with a label
curl --request GET --get \
--url "$VANSAH_URL/api/v2/testCases" \
--header "Authorization: $VANSAH_TOKEN" \
--header "Accept: application/json" \
--data-urlencode "projectKey=DEMO" \
--data-urlencode "labelName=Smoke" \
--data-urlencode "resultID=1" \
--data-urlencode "startAt=0" \
--data-urlencode "limit=50"
3. Read the response
Example response, showing selected fields from one Test Case row:
{
"success": true,
"message": "Test Cases returned successfully",
"data": {
"pagination": {
"total": 1,
"startAt": 0,
"limit": 50
},
"data": [
{
"caseIdentifier": "b90295bd-2725-4f44-98e5-e55c671f39c8",
"caseKey": "DEMO-C42",
"headline": "Sign in with a valid account",
"testCaseVersion": 1,
"caseTypeName": "Functional",
"priorityName": "Medium",
"statusName": "Active",
"resultName": "PASSED",
"resultID": 2,
"labelName": "Smoke"
}
]
}
}
Field | Meaning |
| The total matching count, page offset, and page size. |
| The array of Test Case rows. |
| The Test Case UUID and readable key. |
| The version represented by this row. |
| The Test Case’s title, type, priority, and status. |
| The latest matching execution result. Result names can reflect your configured result labels. |
Rows can also contain descriptions and preconditions, rich-text values in descriptionAdf and preconditionAdf, account IDs, timestamps, labels, environment and release names, counts, and Test Run identifiers. The response is a summary rather than the full Test Script or execution log. Some missing or zero-valued fields are returned as "", so handle empty strings when reading optional values.
4. Retrieve the remaining pages
Parameter | How to use it |
| Record offset. Defaults to |
| Page size. Defaults to |
| Defaults to |
|
|
With limit=50, request startAt=50 for the second page, then 100, and continue until you have retrieved the matching records or receive an empty data.data array. Keep the space, selectors, filters, and sorting unchanged on each page.
Results in a work item or folder
When the request is scoped to a work item or folder, ignoreChildResult=1 restricts results to Test Runs executed directly in that context. Use ignoreChildResult=0, or leave it out, to also consider related Test Plan execution results. This controls the displayed result; it does not add Test Cases from subfolders.
Requests scoped to a work item or folder can also refresh its configured Vansah TR Status custom field in Jira.
Troubleshooting
Message or issue | What to check |
| Include a valid |
| Inspect |
Folder lookup fails | Use a UUID for |
No results for | Use one exact key, such as |
Empty list | Check the space, selected work item or folder, filters, and page offset. Retry the first page with fewer filters. |
Authentication or access error | Check the Vansah URL, token, Jira space key, and the token account’s access. |
| Retry with a simple request. If the issue continues, contact Vansah Support with the endpoint and response, without your token. |
Example validation error:
{
"success": false,
"message": "One or more validation errors found.",
"data": {
"errors": [
{
"value": "Login/Smoke/",
"msg": "Please provide a valid testFolderIdentifier.",
"param": "testFolderIdentifier",
"location": "query"
}
]
}
}
You can also view this request in the Vansah API collection in Postman.
