Skip to main content

List Test Case Priorities (API)

Look up the Jira priority names available to Vansah Test Cases and find the matching value for your integration.

Look up the Jira priorities used by Vansah Test Cases. Find the priority by the name your team recognizes, such as High or Medium.

Endpoint

Action

Method

Endpoint

List available Jira priorities

GET

/api/v2/jira/priorities

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 Jira. Use the token for the Jira site whose priorities you want to read.

1. Retrieve the priorities

Endpoint: GET /api/v2/jira/priorities

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

No query parameters or JSON body are needed. The response is the site-wide priority list from Jira; it has no pagination. This endpoint does not filter by name or a Jira space’s priority scheme.

2. Find the priority by name

Endpoint: GET /api/v2/jira/priorities

Example HTTP 200 response excerpt, showing only the name and ID from two priority objects:

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

JSON path

Type

Meaning

data[].name

String

The priority name displayed in Jira. Match this to the priority you need.

data[].id

String

The Jira priority ID for that name. Copy it only when the next endpoint requires an ID.

For example, if the next endpoint requires priorityJiraID, find High in your response and use that item’s id. Do not assume the synthetic ID 2 matches your site.

Priority objects can also contain description, iconUrl, self, and statusColor. Vansah returns the objects supplied by Jira. Names and IDs depend on your Jira configuration.

Follow the target endpoint’s guide for the exact request field and nesting. Use a readable name when that endpoint supports it.

Troubleshooting

HTTP status or issue

What to check

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.

400 — Something went wrong while Getting Priorities

The request to Jira failed. Check the token account’s Jira access and retry. If it continues, share the endpoint and response with Vansah Support, without your token.

A priority value gives an unexpected result

Read the priorities again, match the correct name, and copy its current value. Check the target endpoint’s field name and the Jira site selected by your token.

Example HTTP 400 response:

{
"success": false,
"errorCode": 1390,
"message": "Something went wrong while Getting Priorities",
"data": []
}

A failure while reading priorities from Jira is returned with this HTTP 400 error, even when the underlying Jira request failed because of authorization. An HTTP 401 from Vansah can instead occur before the priority lookup when your API authentication fails.

Did this answer your question?