test_insights

Search tests in a repository.

get/ci/{owner}/repositories/{repository}/search/tests

Request

  • Base URL: https://api.mergify.com/v1
  • URL: https://api.mergify.com/v1/ci/{owner}/repositories/{repository}/search/tests
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Path parameters

repositorystring required

The name of the repository

ownerstring required

The owner of the repository

Query parameters

test_namestring[] nullable

Filter by test name. Pass multiple times to combine matches. Supports glob patterns (*, ?). Omit to return all test identities.

test_name_excludestring[] nullable

The test name to exclude

pipeline_namestring[] nullable

The pipeline name to filter on

pipeline_name_excludestring[] nullable

The pipeline name to exclude

job_namestring[] nullable

The job name to filter on

job_name_excludestring[] nullable

The job name to exclude

health_statusHealthStatus[] nullable

The health status to filter on

health_status_excludeHealthStatus[] nullable

The health status to exclude

failed_executions_impactstring[] nullable

The failed executions impact to filter on

failed_executions_impact_excludestring[] nullable

The failed executions impact to exclude

stateTestStateValue[] nullable

The states to filter on.

state_excludeTestStateValue[] nullable

The states to exclude.

is_quarantinedboolean nullable

Deprecated: use state=quarantined or state_exclude=quarantined instead. Only return tests whose branch, pipeline and job a quarantine covers (true) or does not (false). Omit to return both.

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'executions_count' | 'test_name' | 'pipeline_name' | 'job_name' | 'health_status' | 'failed_executions_impact' | 'failed_executions_ratio'

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 identities matching the search query, across all pages.

Changes

    • info

      added the new optional query request parameter state

    • info

      added the new optional query request parameter state_exclude

    • info

      query request parameter is_quarantined was deprecated

    • info

      response property tests/items/is_quarantined deprecated

    • info

      added the required property // to the response with the status

    • info

      added the new optional query request parameter is_quarantined

    • info

      added the required property // to the response with the status