---
title: "Get run history"
method: GET
path: "/v1/projects/{project_id}/stats/runs-history"
tags: ["stats"]
---

# Get run history

`GET /v1/projects/{project_id}/stats/runs-history`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/stats/runs-history`
- Auth: HTTP bearer

Returns daily run counts by current status, grouped by the UTC date each run started.

Each day counts runs that are now `started`, `completed`, `failed` or `cancelled`.
Days without started runs are omitted. Defaults to the last 30 days.

Required permission: `stats.view`.

## Path parameters

- `project_id` string, uuid, required

## Query parameters

- `environment_id` string, uuid, required: Environment to count runs in.
- `start_date` string, date-time, nullable: Only runs started at or after this time. Defaults to 30 days ago; no offset means UTC.

## Response `200`

Successful Response

- PublicRunHistoryItemResponse[]
  - `date` string, date, required: UTC day the runs started.
  - `started` integer, required: Runs from this day that are still executing.
  - `failed` integer, required: Runs from this day that failed.
  - `completed` integer, required: Runs from this day that completed.
  - `cancelled` integer, required: Runs from this day that were cancelled.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

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