test_insights

List quarantined tests

Changed on

Deprecated: use the test states API, /ci/{owner}/repositories/{repository}/test-states.

List the tests currently quarantined in the repository, ordered by sort and direction (quarantine creation time ascending by default). A quarantine applies to a specific branch or to all branches when branch is null.

Pass per_page (and optionally cursor) to receive a bounded page with RFC 5988 navigation links. Omitting per_page is deprecated: it returns the full list in a single response, flagged with a Deprecation header. A future release will return the first page of 10 quarantines instead.

get/ci/{owner}/repositories/{repository}/quarantines

Request

  • Base URL: https://api.mergify.com/v1
  • URL: https://api.mergify.com/v1/ci/{owner}/repositories/{repository}/quarantines
  • 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

branchstring nullable

Deprecated: use branch_name.

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. Quarantines applying to every branch always match.

branch_name_excludestring[] nullable

The branch name to exclude. Quarantines applying to every branch are kept.

pipeline_namestring[] nullable

The pipeline name to filter on. Quarantines applying to every pipeline always match.

pipeline_name_excludestring[] nullable

The pipeline name to exclude. Quarantines applying to every pipeline are kept.

job_namestring[] nullable

The job name to filter on. Quarantines applying to every job always match.

job_name_excludestring[] nullable

The job name to exclude. Quarantines 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 nullable

The number of items per page, with RFC 5988 cursor pagination. Omitting it is deprecated: it returns the full list in a single response, and will default to 10 in a future release.

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

Sort field. test_name orders by the first 255 characters of the name: names sharing them come back in a stable but arbitrary order.

direction'asc' | 'desc'

Sort direction. Ascending created_at is oldest first; ascending health_status is broken, flaky, healthy, then tests with no recent runs. pipeline_name and job_name put quarantines applying to every pipeline or job first.

Response

Successful Response

sizeinteger required

The number of items in this page

per_pageinteger nullable required

The number of items per page, or null when the endpoint was called without per_page and returned the full list in a single response.

totalinteger required

Total number of quarantines matching the filters, across all pages.

Changes