Skip to main content

Rename a Test Case Type (API)

Rename a Test Case type in your Jira space. Find the type by name, prepare the JSON request, and verify the saved change.

Rename an existing Test Case type, such as changing Functional to Integration. The request updates the same type record; it does not create a new type or change which type is assigned to your Test Cases.

Endpoints

Action

Method

Endpoint

Find the Test Case type by name

GET

/api/v2/category/caseTypes

Rename the selected Test Case type

PUT

/api/v2/category/caseType/{caseTypeIdentifier}

Add the endpoint path to your Vansah base URL. Any value in braces, such as {identifier}, is a placeholder; the steps below show how to obtain and supply it.

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 needs Jira administrator or Jira space administrator permission for the target space. Replace DEMO with your Jira space key.

This endpoint requires the type’s identifier in the URL. First find the type by its familiar name, then copy the identifier from the response as shown below.

1. Find the type by name

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"

Example HTTP 200 response:

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

Find the item named Functional and copy its identifier. Set the following variable to the value from your response; the value below is synthetic:

CASE_TYPE_IDENTIFIER="446b5362-a167-11ef-99bc-4a527ec72f78"

If the type is not on the first page, follow the pagination in List Test Case Types (API). Use an active type from the same Jira space you will update.

2. Prepare the new name

Endpoint: PUT /api/v2/category/caseType/{caseTypeIdentifier}

Save this complete JSON body as type.json. Replace the name and Jira space key with your values:

{
"name": "Integration",
"project": {
"key": "DEMO"
}
}

Parent object

JSON field

Type

Example value

Use

Request body

name

String

"Integration"

Required. New plain-text name, 1–55 characters. Choose a name not used by another active type in this space.

project

key

String

"DEMO"

The Jira space key. Include it to select the space for the API-token request.

The project object contains key; JSON path project.key means the Jira space key. Keep those JSON keys unchanged.

Use a clear plain-text name. HTML tags are removed, surrounding whitespace is trimmed, and repeated spaces are collapsed before saving.

3. Send the rename request

Endpoint: PUT /api/v2/category/caseType/{caseTypeIdentifier}

The URL parameter caseTypeIdentifier is the value you copied in step 1. The cURL command uses CASE_TYPE_IDENTIFIER for it and sends the JSON file from step 2:

curl --request PUT \
--url "$VANSAH_URL/api/v2/category/caseType/$CASE_TYPE_IDENTIFIER" \
--header "Authorization: $VANSAH_TOKEN" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data-binary @type.json

Example successful response, HTTP 200:

{
"success": true,
"message": "Updated successfully",
"data": {
"identifier": "446b5362-a167-11ef-99bc-4a527ec72f78",
"name": "Integration"
}
}

The response contains the same identifier and the saved name. Repeat the list request to verify the change. The update is limited to the selected active type in the selected Jira space; deleted types and types from another space are rejected.

Troubleshooting

If another active type is already named Integration, the API returns HTTP 400:

{
"success": false,
"errorCode": 1390,
"message": "Duplicate Case Type(Integration)",
"data": []
}

HTTP status or message

What to check

400 — Duplicate Case Type(...)

Choose a name not used by another active type in the space.

400 — Invalid caseType identifier(...)

List the types again and copy the identifier for the correct active type and space.

400 — One or more validation errors found.

Read JSON path data.errors. Check the required name and the identifier copied into the URL.

400 — Case Type should be max 55 characters long

Use a name of 55 characters or fewer.

400 — Please provide space information

Check the nested project/key object and the account’s access to the Jira space.

401 — authentication failed

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

403 — access denied

Confirm Jira administrator or Jira space administrator permission. A blocked Vansah account is also denied.

503 — permission lookup unavailable

Retry after a short wait. The service could not verify Jira permissions.

400 — Something went wrong while Updating CaseType

List the type again to check its current name before retrying. Contact Vansah Support if the issue continues.

Permission lookup failures use error code 1400 and the message Something went wrong while validating user permissions. A Jira authentication or access failure during that lookup can return HTTP 401 or 403. Share the response with support when needed, but do not share your token.

Did this answer your question?