---
title: "Job timeseries data"
method: GET
path: "/insights/time-series/{project-slug}/workflows/{workflow-name}/jobs"
tags: ["Insights"]
---

# Job timeseries data

`GET /insights/time-series/{project-slug}/workflows/{workflow-name}/jobs`

## Request

- Base URL: `https://circleci.com/api/v2`
- URL: `https://circleci.com/api/v2/insights/time-series/{project-slug}/workflows/{workflow-name}/jobs`
- Auth: one of:
  - API key in header `Circle-Token`
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `circle-token`

Get timeseries data for all jobs within a workflow. Hourly granularity data is only retained for 48 hours while daily granularity data is retained for 90 days.

## Path parameters

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

## Query parameters

- `branch` string
- `granularity` 'daily' | 'hourly'
- `start-date` string, date-time
- `end-date` string, date-time

## Response `200`

An array of timeseries data, one entry per job.

- object: Project level timeseries metrics response
  - `next_page_token` string, required: A token to pass as a `page-token` query parameter to return the next page of results.
  - `items` object[], required: Aggregate metrics for a workflow at a time granularity
    - `name` string, required: The name of the workflow.
    - `min_started_at` string, date-time, required: The start time for the earliest execution included in the metrics.
    - `max_ended_at` string, date-time, required: The end time of the last execution included in the metrics.
    - `timestamp` string, date-time, required: The start of the interval for timeseries metrics.
    - `metrics` object, required: Metrics relating to a workflow's runs.
      - `total_runs` integer, required: The total number of runs, including runs that are still on-hold or running.
      - `failed_runs` integer, required: The number of failed runs.
      - `successful_runs` integer, required: The number of successful runs.
      - `throughput` number, float, required: The average number of runs per day.
      - `median_credits_used` integer, required: The median credits consumed over the current timeseries interval.
      - `total_credits_used` integer, required: The total credits consumed over the current timeseries interval.
      - `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.
        - `median` integer, required: The median duration, in seconds, among a group of runs.
        - `max` integer, required: The max duration, in seconds, among a group of runs.
        - `p95` integer, required: The 95th percentile duration, in seconds, among a group of runs.
        - `total` integer, required: The total duration, in seconds, added across a group of runs.

## Other responses

- `default`: Error response.

---

[API](https://skmtc.dev/circleci/apis/circleci-api.md) - [All operations](https://skmtc.dev/circleci/apis/circleci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/circleci/apis/circleci-api/revisions/b9c0e0c24058?raw)
