Skip to main content

List Test Case Priorities (API)

Get the priority names and IDs you need to create, update, or filter Vansah Test Cases.

Use this API to look up the Jira priority names and IDs used by Vansah Test Cases. Use the returned ID when another Vansah endpoint asks for priorityJiraID.

Before you begin

Create a Vansah API token and use the Vansah URL supplied for your workspace. The account associated with the token must be able to access Jira.

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 a space you can access. Keep your token private.

Endpoint and headers

GET /api/v2/jira/priorities

Header

Value

Authorization

Your Vansah API token, without a Bearer prefix.

Accept

application/json

No JSON request body is needed. The endpoint returns Jira’s workspace priority list. It does not support priority-name filtering, startAt, or limit, and there is no pagination object in the response.

You can supply projectKey for space authentication context, as in the example below. It does not filter the returned list to that space’s priority scheme.

Example: retrieve priorities

curl --request GET --get \
--url "$VANSAH_URL/api/v2/jira/priorities" \
--header "Authorization: $VANSAH_TOKEN" \
--header "Accept: application/json" \
--data-urlencode "projectKey=DEMO"

Example response showing selected fields from two priority objects:

{
"success": true,
"message": "Priorities returned successfully",
"data": [
{
"id": "2",
"name": "High"
},
{
"id": "3",
"name": "Medium"
}
]
}

Understand the response

Field

Meaning

success

true when the request succeeds.

message

A summary of the result.

data

The array of priority objects returned by Jira.

data[].id

The Jira priority ID, returned as a string. Use this value for priorityJiraID where supported.

data[].name

The priority name displayed to users.

Priority objects can also contain Jira fields such as description, iconUrl, self, and statusColor. Priority names and IDs depend on your Jira configuration; do not assume the example IDs match your workspace.

Example: use a priority ID in a Test Case filter

After looking up the required priority, use its id with a supported Test Case endpoint. For example, this request lists matching Test Cases in 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 "priorityJiraID=2" \
--data-urlencode "startAt=0" \
--data-urlencode "limit=50"

Replace DEMO-P12 and 2 with your plan key and returned priority ID. See List Test Cases in a Standard Test Plan (API) for the full parameter and response details.

Troubleshooting

Issue

What to check

Endpoint not found

Check your Vansah base URL and use /api/v2/jira/priorities.

Authentication error

Check the Vansah URL and token, and confirm that the token’s Jira authorization is still valid.

This project is disabled

Use an enabled space you can access for projectKey if your workspace limits Vansah to selected spaces.

A priority ID does not give the expected result

Read the priorities again and use the current id. Check the target endpoint’s parameter name and the space’s Jira configuration.

Something went wrong while Getting Priorities

Check that the token account can access Jira. Retry, and contact Vansah Support if the issue continues. Share the endpoint and error response without your token.

Example error response:

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