Skip to main content

List Test Case Types (API)

Retrieve the Test Case type names and identifiers configured in a Jira space.

Use this API to retrieve the active Test Case types configured in a Jira space, including each type’s name and identifier. Use these values when preparing integrations, filtering Test Cases, or updating a Test Case type.

These are Vansah Test Case types, such as Functional or Regression. They classify Test Cases within Vansah.

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 you want to read.

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/category/caseTypes

Header

Value

Authorization

Your Vansah API token, without a Bearer prefix.

Accept

application/json

Send query parameters in the URL. No JSON request body is needed.

Query parameters

Parameter

How to use it

projectKey

The Jira space key, for example DEMO. Include it to provide space context when using an API token.

startAt

Optional. Number of records to skip. Defaults to 0. Use a whole number of zero or greater.

limit

Optional page size. Defaults to 100. Use a positive whole number.

Types are sorted by name and deleted types are excluded. This endpoint does not support a type-name search parameter; find the required name in the returned pages.

Example: retrieve Test Case types

curl --request GET --get \
--url "$VANSAH_URL/api/v2/category/caseTypes" \
--header "Authorization: $VANSAH_TOKEN" \
--header "Accept: application/json" \
--data-urlencode "projectKey=DEMO" \
--data-urlencode "startAt=0" \
--data-urlencode "limit=100"

Example successful response:

{
"success": true,
"message": "CaseTypes returned successfully",
"pagination": {
"total": 2,
"startAt": 0,
"limit": 100
},
"data": [
{
"identifier": "446b5362-a167-11ef-99bc-4a527ec72f78",
"name": "Functional"
},
{
"identifier": "8996f147-a20d-11ef-99bc-4a527ec72f78",
"name": "Regression"
}
]
}

Understand the response

Field

Meaning

success and message

Whether the request succeeded and a summary of the outcome.

pagination.total

Total number of active Test Case types in the selected space.

pagination.startAt and pagination.limit

The offset and page size used for the request.

data[].identifier

The type’s UUID. Use the identifier associated with the correct space.

data[].name

The Test Case type name displayed in Vansah.

An empty data array means no records were returned for the selected space and page.

Retrieve more pages

With a page size of 100, request startAt=100 for the second page, then 200, and continue until you have retrieved pagination.total records or receive an empty array. Keep the space and page size unchanged.

Example: filter Test Cases by type

After finding the type’s identifier, use it as caseTypeIdentifier on a supported Test Case list endpoint. This example filters iteration 1 of a Standard Test Plan:

curl --request GET --get \
--url "$VANSAH_URL/api/v2/testPlan/testCases" \
--header "Authorization: $VANSAH_TOKEN" \
--header "Accept: application/json" \
--data-urlencode "projectKey=DEMO" \
--data-urlencode "testPlanKey=DEMO-P12" \
--data-urlencode "iterationNumber=1" \
--data-urlencode "caseTypeIdentifier=446b5362-a167-11ef-99bc-4a527ec72f78" \
--data-urlencode "startAt=0" \
--data-urlencode "limit=50"

Replace the example plan key and type UUID with your values. See List Test Cases in a Standard Test Plan (API) for full details.

To rename a type, use Update a Test Case Type (API). Renaming requires Jira or space administrator permissions.

Troubleshooting

Message or issue

What to check

Please provide space information

Include the correct projectKey in the query string.

One or more validation errors found.

Inspect data.errors. startAt and limit must be numeric.

Authentication or space access error

Check the Vansah URL, API token, Jira space key, and the token account’s space access.

Empty list

Check the space and offset. Retry with startAt=0. Deleted types are not returned.

Something went wrong while Getting CaseTypes.

Retry the request. If the problem 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": "many",
"msg": "limit must be a number.",
"param": "limit",
"location": "query"
}
]
}
}

You can also view this request in the Vansah API collection in Postman.

Did this answer your question?