---
title: "RerunWorkflow"
method: POST
path: "/depot.ci.v1.CIService/RerunWorkflow"
tags: ["CIService"]
---

# RerunWorkflow

`POST /depot.ci.v1.CIService/RerunWorkflow`

## Request

- Base URL: `https://api.depot.dev`
- URL: `https://api.depot.dev/depot.ci.v1.CIService/RerunWorkflow`
- Auth: HTTP bearer

Resets every job in a workflow that's in a terminal state (finished, failed, or cancelled) to queued and runs them all again. Cancel the workflow first if it's still running.

## Headers

- `Connect-Protocol-Version` 1, required: Define the version of the Connect protocol
- `Connect-Timeout-Ms` number: Define the timeout, in ms

## Request body

- DepotCiV1RerunWorkflowRequest
  - `workflowId` string, required: Unique identifier for the workflow to re-run. Returned by `GetRunStatus` and `ListWorkflows`.

## Response `200`

Success

- DepotCiV1RerunWorkflowResponse
  - `workflowId` string: Unique identifier for the workflow. Matches the request `workflowId`. A re-run creates a new workflow execution rather than a new workflow.
  - `jobCount` integer: Number of jobs reset to queued. A re-run resets every job in the workflow, so this is the workflow's total job count.

## Other responses

- `default`: Error

---

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