API: Priorities - TestRail

API: Priorities

Use the following API methods to request details about priorities.

On this page:

    API Rate Limit

    Please note that the API is rate-limited on TestRail Cloud to ensure optimal performance for all users and may throttle requests. TestRail might also return a 429 Too Many Requests response, which you are expected to handle. Such a response also includes a Retry-After header indicating how many seconds to wait before you are allowed to submit the next request.

    To avoid rate limits on TestRail Cloud, try using bulk API endpoints (e.g. using as add_results_for_cases instead of add_results_for case), build a time delay into your API calls, or upgrade to TestRail Enterprise Cloud.

    Rate limits for TestRail Cloud are as follows:

    • 180 Requests per instance, per minute for TestRail Cloud Professional subscriptions.
    • 300 Requests per instance, per minute for TestRail Cloud Enterprise subscriptions.

    No API rate limits are built into TestRail Server installations.

    get_priorities

    Returns a list of available priorities.

    GET index.php?/api/v2/get_priorities

    Response content

    The response include an array of priorities. Each priority has a unique ID, a name and a short version of the name. The priority field determines the order of the priorities. The is_default field is true for the default priority and false otherwise.

    [
    	{
    		"id": 1,
    		"is_default": false,
    		"name": "1 - Don't Test",
    		"priority": 1,
    		"short_name": "1 - Don't"
    	},
    	..
    	{
    		"id": 4,
    		"is_default": true,
    		"name": "4 - Must Test",
    		"priority": 4,
    		"short_name": "4 - Must"
    	},
    	..
    ]
    

    Response codes

    200 Success, the available priorities are returned as part of the response