CI Insights

Access data from CI Insights.


List quarantined tests

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

List the tests currently quarantined in the repository, ordered by quarantine creation time ascending. A quarantine applies to a specific branch or to all branches when `branch` is `null`.

Application Key GitHub Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

repository string required

The name of the repository

min length: 1 · pattern: ^[\w\-\.]+$

branch string
test_id string <uuid>
source "manual" | "auto"
200 Successful Response
quarantined_testsQuarantinedTest[]required
idstring <uuid>required

Unique identifier of the quarantine record.

test_namestringrequired

Fully qualified name of the quarantined test.

reasonstringrequired

Free-form reason recorded when the test was quarantined.

branchstring | nullrequired

Branch name or pattern this quarantine applies to. `null` means the test is quarantined on every branch.

created_atstring <date-time>required

UTC timestamp when the test was added to quarantine.

source"manual" | "auto"

How the test got quarantined: `manual` (user action) or `auto` (auto-quarantined).

Enum: manual auto
is_recoveredbooleanrequired

True when recent runs of this test are healthy, suggesting the quarantine could be removed.

Example Response

                          {
  "quarantined_tests": [
    {
      "id": "string",
      "test_name": "string",
      "reason": "string",
      "branch": "string",
      "created_at": "2024-01-15T09:00:00Z",
      "source": "manual",
      "is_recovered": true
    }
  ]
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/ci/:owner/repositories/:repository/quarantines" \
  -H "Authorization: Bearer <token>"

Get a quarantined test

GET /ci/{owner}/repositories/{repository}/quarantines/{quarantine_id}

Retrieve a single quarantined test by its quarantine ID.

Application Key GitHub Token
quarantine_id string <uuid> required
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

repository string required

The name of the repository

min length: 1 · pattern: ^[\w\-\.]+$

200 Successful Response
idstring <uuid>required

Unique identifier of the quarantine record.

test_namestringrequired

Fully qualified name of the quarantined test.

reasonstringrequired

Free-form reason recorded when the test was quarantined.

branchstring | nullrequired

Branch name or pattern this quarantine applies to. `null` means the test is quarantined on every branch.

created_atstring <date-time>required

UTC timestamp when the test was added to quarantine.

source"manual" | "auto"

How the test got quarantined: `manual` (user action) or `auto` (auto-quarantined).

Enum: manual auto
is_recoveredbooleanrequired

True when recent runs of this test are healthy, suggesting the quarantine could be removed.

Example Response

                          {
  "id": "string",
  "test_name": "string",
  "reason": "string",
  "branch": "string",
  "created_at": "2024-01-15T09:00:00Z",
  "source": "manual",
  "is_recovered": true
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/ci/:owner/repositories/:repository/quarantines/:quarantine_id" \
  -H "Authorization: Bearer <token>"

Was this page helpful?