Austin Weisgrau
07/09/2025, 7:42 PMMarvin
07/09/2025, 7:42 PMMarvin
07/09/2025, 7:42 PMPOST /flow_runs/{id}/resume
endpoint. This endpoint is specifically designed for resuming/restarting flow runs that have failed or are in a paused state.
Here's a quick example using `curl`:
bash
curl -X POST '<https://api.prefect.cloud/api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{flow_run_id}/resume>' \
-H 'Authorization: Bearer YOUR_API_KEY'
Or if you're using Python with the requests
library:
python
import requests
response = <http://requests.post|requests.post>(
f"<https://api.prefect.cloud/api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{flow_run_id}/resume>",
headers={"Authorization": f"Bearer {api_key}"}
)
This means you don't need to create a new flow run from the parent deployment - you can directly restart the failed run. The endpoint is documented in detail at: https://docs-3.prefect.io/v3/api-ref/rest-api/server/flow-runs/resume-flow-run
Do note that this will restart the flow run with the same parameters and configuration as the original run. If you need to modify any parameters or configuration, you would indeed need to create a new flow run from the deployment instead.