v1

latestOpenAPI 3.0.3MIT2026-07-1411163326.7 KB
Insights

Get test metrics for a project's workflows

Get test metrics for a project's workflows. Currently tests metrics are calculated based on 10 most recent workflow runs.

get/insights/{project-slug}/workflows/{workflow-name}/test-metrics

Path parameters

project-slugstring required

Project slug in the form vcs-slug/org-name/repo-name. The / characters may be URL-escaped. For projects that use GitLab or GitHub App, use circleci as the vcs-slug, replace org-name with the organization ID (found in Organization Settings), and replace repo-name with the project ID (found in Project Settings).

workflow-namestring required

The name of the workflow.

Query parameters

branchstring

The name of a vcs branch. If not passed we will scope the API call to the default branch.

all-branchesboolean

Whether to retrieve data for all branches combined. Use either this parameter OR the branch name parameter.

Response

A list of test metrics by workflow

average_test_countinteger required

The average number of tests executed per run

most_failed_tests_extrainteger required

The number of tests with the same success rate being omitted from most_failed_tests

slowest_tests_extrainteger required

The number of tests with the same duration rate being omitted from slowest_tests

total_test_runsinteger required

The total number of test runs