test_insights

Count test states

Changed on

Count the test states the list returns for the same filters, across every page.

Application key permission: quarantines: read.

get/ci/{owner}/repositories/{repository}/test-states/count

Request

  • Base URL
    https://api.mergify.com/v1
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

repositorystring required

The name of the repository

ownerstring required

The owner of the repository

Query parameters

stateTestStateValue[] nullable

The states to filter on.

state_excludeTestStateValue[] nullable

The states to exclude.

test_idstring[] nullable

The test identifier to filter on

sourceQuarantineSource[] nullable

The sources to filter on.

branch_namestring[] nullable

The branch name to filter on. Test states applying to every branch always match.

branch_name_excludestring[] nullable

The branch name to exclude. Test states applying to every branch are kept.

pipeline_namestring[] nullable

The pipeline name to filter on. Test states applying to every pipeline always match.

pipeline_name_excludestring[] nullable

The pipeline name to exclude. Test states applying to every pipeline are kept.

job_namestring[] nullable

The job name to filter on. Test states applying to every job always match.

job_name_excludestring[] nullable

The job name to exclude. Test states applying to every job are kept.

test_namestring[] nullable

The test name to filter on

test_name_excludestring[] nullable

The test name to exclude

health_statusHealthStatus[] nullable

The health status to filter on. Tests with no recent runs are left out.

health_status_excludeHealthStatus[] nullable

The health status to exclude. Tests with no recent runs are kept.

Headers

Mergify-Versionstring nullable

The API version the request is written against, a date (YYYY-MM-DD). Without it, the request is served 2026-11-16. A version this server does not serve is refused with a 400, the error code API_VERSION_UNKNOWN and the versions it serves in served_versions.

Example:2026-11-16

Response

Successful Response

countinteger required

Number of test states matching the filters.

Changes

    • warning

      added the new GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT enum value to the response property for the response status

    • warning

      added the new GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT enum value to the response property for the response status

    • warning

      added the new STATISTICS_SCOPE_PERIOD_TOO_LARGE enum value to the response property for the response status

    • warning

      added the new STATISTICS_SCOPE_PERIOD_TOO_LARGE enum value to the response property for the response status