---
title: "Get metrics and trends for workflows"
method: GET
path: "/insights/{project-slug}/workflows/{workflow-name}/summary"
tags: ["Insights"]
---

# Get metrics and trends for workflows

`GET /insights/{project-slug}/workflows/{workflow-name}/summary`

Get the metrics and trends for a particular workflow on a single branch or all branches

## Path parameters

- `project-slug` string, required
- `workflow-name` string, required

## Query parameters

- `all-branches` boolean
- `branch` string

## Response `200`

Metrics and trends for a workflow

- object — Workflow level aggregated metrics and trends response
  - `metrics` object, required — Metrics aggregated across a workflow for a given time window.
    - `total_runs` integer, required — The total number of runs, including runs that are still on-hold or running.
    - `successful_runs` integer, required — The number of successful runs.
    - `mttr` integer, required — The mean time to recovery (mean time between failures and their next success) in seconds.
    - `total_credits_used` integer, required — The total credits consumed by the workflow in the aggregation window. Note that Insights is not a real time financial reporting tool and should not be used for credit reporting.
    - `failed_runs` integer, required — The number of failed runs.
    - `success_rate` number, float, required
    - `completed_runs` integer, required — The number of runs that ran to completion within the aggregation window
    - `window_start` string, date-time, required — The timestamp of the first build within the requested reporting window.
    - `duration_metrics` object, required — Metrics relating to the duration of runs for a workflow.
      - `min` integer, required — The minimum duration, in seconds, among a group of runs.
      - `mean` integer, required — The mean duration, in seconds, among a group of runs.
      - `median` integer, required — The median duration, in seconds, among a group of runs.
      - `p95` integer, required — The 95th percentile duration, in seconds, among a group of runs.
      - `max` integer, required — The max duration, in seconds, among a group of runs.
      - `standard_deviation` number, float, required — The standard deviation, in seconds, among a group of runs.
    - `window_end` string, date-time, required — The timestamp of the last build within the requested reporting window.
    - `throughput` number, float, required — The average number of runs per day.
  - `trends` object, required — Trends for aggregated metrics across a workflow for a given time window.
    - `total_runs` number, float, required — The trend value for total number of runs.
    - `failed_runs` number, float, required — The trend value for number of failed runs.
    - `success_rate` number, float, required — The trend value for the success rate.
    - `p95_duration_secs` number, float, required — Trend value for the 95th percentile duration for a workflow for a given time window.
    - `median_duration_secs` number, float, required — Trend value for the 50th percentile duration for a workflow for a given time window.
    - `total_credits_used` number, float, required — The trend value for total credits consumed.
    - `mttr` number, float, required — trend for mean time to recovery (mean time between failures and their next success).
    - `throughput` number, float, required — Trend value for the average number of runs per day.
  - `workflow_names` string[], required — A list of all the workflow names for a given project.

## Other responses

- `default` — Error response.

---

[API](https://skmtc.net/circleci/apis/api-v2.md) · [All operations](https://skmtc.net/circleci/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/circleci/api-v2/revisions/b9c0e0c24058/schema)
