---
title: "Rerun runs in bulk"
method: POST
path: "/v1/projects/{project_id}/runs/bulk-rerun"
tags: ["runs"]
---

# Rerun runs in bulk

`POST /v1/projects/{project_id}/runs/bulk-rerun`

## Request

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

Reruns up to 100 runs in one environment, each as a new run of the same agent with its original payload.

Supports two modes:
- **By IDs**: provide `run_ids` in the request body to rerun specific runs. Query filters are ignored.
- **By filter**: omit `run_ids` and use the query parameters to match runs.

Deleted runs are skipped. A selection of more than 100 runs returns 422.

Required permission: `runs.rerun`.

## Path parameters

- `project_id` string, uuid, required

## Query parameters

- `environment_id` string, uuid, required: Environment to rerun runs in; only its runs are selected.
- `deployment_id` string, uuid, nullable: Only runs executed by this deployment.
- `start_date` string, date-time, nullable: Only runs queued at or after this time; applies only together with `end_date`.
- `end_date` string, date-time, nullable: Only runs queued at or before this time; applies only together with `start_date`.
- `status_filter` RunStatus[], nullable: Only runs in these statuses.
- `guardrail_outcome` string[], nullable: Only runs with at least one guardrail intervention of these outcomes.
- `agent_name` string, nullable: Only runs of this agent.
- `test_name` string[], nullable: Filter by A/B test variant names; use __base__ for runs without a variant
- `exclude_test_runs` boolean: Exclude runs with a test name
- `search` string, nullable: Run search text or filter expression, as in `GET /runs`.

## Request body

- BulkRerunBody: Runs to rerun.
  - `run_ids` string[], nullable: IDs of the runs to rerun, at most 100. Omit or send null to select runs with the query filters instead; an empty list is rejected.

## Response `200`

Successful Response

- PublicBulkRerunResponse
  - `ok` boolean, required: Whether the operation succeeded.
  - `rerun_count` integer, required: Number of runs triggered again.
  - `new_run_ids` string[], required: IDs of the new runs.

## 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)
