test_insights

List test states

Changed on

List the states the repository's tests are put in, ordered by sort and direction (creation time ascending by default). A state applies to the branch, pipeline and job it names, or to every one of them when null.

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

Request

  • Base URL: https://api.mergify.com/v1
  • URL: https://api.mergify.com/v1/ci/{owner}/repositories/{repository}/test-states
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • 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.

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.

cursorstring nullable

The opaque cursor of the current page. Must be extracted from RFC 5988 pagination links to get the previous/next pages

per_pageinteger

The number of items per page

sort'created_at' | 'test_name' | 'pipeline_name' | 'job_name' | 'health_status' | 'source'

Sort field

direction'asc' | 'desc'

Sort direction

Response

Successful Response

sizeinteger required

The number of items in this page

per_pageinteger required

The number of items per page

totalinteger required

Total number of test states matching the filters, across all pages.

Changes