Skip to main content

List Test Case Types (API)

Retrieve the Test Case types in your Jira space, read their names, and page through the results for your Vansah integration.

Retrieve the active Test Case types in your Jira space. Types such as Functional and Regression classify your Test Cases in Vansah.

Endpoint

Action

Method

Endpoint

List Test Case types in a Jira space

GET

/api/v2/category/caseTypes

Add the endpoint path to your Vansah base URL.

Before you begin

These examples use Bash and cURL. Set VANSAH_URL to your Vansah base URL without a trailing slash and VANSAH_TOKEN to your Vansah API token. Send the token directly in the Authorization header, without a Bearer prefix. Keep it private.

The token account must be able to access the Jira space. Replace DEMO with your space key. The API parameter projectKey refers to the Jira space key. You can find it with List Jira Spaces (API).

1. Retrieve Test Case types

Endpoint: GET /api/v2/category/caseTypes

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"

Send query parameters in the URL. This GET request has no JSON body.

Query parameter

Type

Example value

Use

projectKey

String

DEMO

The Jira space key. Include it when using an API token.

startAt

Number

0

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

limit

Number

100

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

Types are sorted by name. Deleted types are excluded. There is no supported type-name search parameter; find the name in the returned pages.

2. Read the response

Endpoint: GET /api/v2/category/caseTypes

Example successful response, HTTP 200:

{
"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"
}
]
}

Each item in data contains the type’s name and identifier. Match the name you recognize in Vansah. If another endpoint requires a type identifier, copy it from that matching item rather than using a sample value.

JSON path

Meaning

pagination.total

Total number of active types in the selected space.

pagination.startAt

Number of records skipped.

pagination.limit

Requested page size.

An empty data array is a successful response with no records for that space and offset.

3. Retrieve more pages

Endpoint: GET /api/v2/category/caseTypes

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

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=100" \
--data-urlencode "limit=100"

Manage your Test Case types

To change the available types, see Create a Test Case Type (API), Update a Test Case Type (API), or Remove a Test Case Type (API). Follow the permissions and request details in the guide for the action you need.

Troubleshooting

HTTP status or issue

What to check

400 — Please provide space information

Include the correct projectKey and confirm that the token account can access that Jira space.

400 — One or more validation errors found.

Read JSON path data.errors. startAt and limit must be numeric.

401 — authentication failed

Check the base URL, raw API token, expiry, and connected Jira access.

403 — account blocked

Ask your administrator to review the account’s Vansah access.

Empty list

Check the space and restart at startAt=0. Deleted types are not listed.

400 — Something went wrong while Getting CaseTypes.

Retry. If the problem continues, contact Vansah Support with the endpoint and response, without your token.

Example HTTP 400 response:

{
"success": false,
"message": "Something went wrong while Getting CaseTypes.",
"data": [],
"errorCode": 1390
}
Did this answer your question?