Statuses

Use the following API methods to request details about test statuses.

get_case_statuses

 

This endpoint requires TestRail Enterprise 7.3 or later.

Returns a list of available test case statuses.

GET index.php?/api/v2/get_case_statuses

Response content

The returned response includes all test case statuses in the following format:

[
    {
        "case_status_id": 1,
        "name": "Approved",
        "abbreviation": null,
        "is_default": false,
        "is_approved": true
    },
    {
        "case_status_id": 2,
        "name": "Draft",
        "abbreviation": null,
        "is_default": true,
        "is_approved": false
    }
]

The following fields are included in the response:

Name Type Description
offset integer Where to start counting the step history from
limit integer The maximum number of records to return
size integer The number of records returned
links object An object containing URIs to the next and previous sets of values, if available
case_statuses object An array of case status information

case_status fields

Name Type Description
case_status_id integer Unique ID of the status
name string The system name of the status
abbreviation string An alternate label for the status
is_default boolean True if the status is the default status for test cases
is_approved boolean True if the status is an approved status

Response codes

Status Code Description
200 Success (the available case statuses are returned as part of the response)

get_statuses

Returns a list of available test statuses.

GET index.php?/api/v2/get_statuses

Response content

The returned response includes all system and custom statuses in the following format:

[
    {
        "color_bright": 12709313,
        "color_dark": 6667107,
        "color_medium": 9820525,
        "id": 1,
        "is_final": true,
        "is_system": true,
        "is_untested": false,
        "label": "Passed",
        "name": "passed"
    },
    {
        "color_bright": 16631751,
        "color_dark": 14250867,
        "color_medium": 15829135,
        "id": 5,
        "is_final": true,
        "is_system": true,
        "is_untested": false,
        "label": "Failed",
        "name": "failed"
    },
    {
        "color_bright": 13684944,
        "color_dark": 0,
        "color_medium": 10526880,
        "id": 6,
        "is_final": false,
        "is_system": false,
        "is_untested": false,
        "label": "Custom",
        "name": "custom_status1"
    }
]

Each status has a unique ID, a name (system name) as well as a label (display name). The color-related fields specify the different colors used for status and are RGB colors. The following system statuses are available by default. You can add additional custom statuses under Administration > Customizations in TestRail.

ID Name
1 Passed
2 Blocked
3 Untested
4 Retest
5 Failed

Response codes

Status Code Description
200 Success (the available statuses are returned as part of the response)
Was this article helpful?
1 out of 2 found this helpful