Stop every in-flight run of a workflow
curl --request POST \
--url https://api.pineyard.ai/workflows/{id}/runs/cancel \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/workflows/{id}/runs/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/workflows/{id}/runs/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"cancelled": 123,
"failed": 123
}{
"error": "not_found"
}Workflows
Stop every in-flight run of a workflow
Stops every RUNNING, WAITING and NEEDS_ATTENTION run of this workflow, one run at a time with the same semantics as stopping a single run. It does not prevent new runs from starting — archive the workflow for that. A call or action already in progress is not undone. Idempotent: a repeat finds nothing left to stop.
POST
/
workflows
/
{id}
/
runs
/
cancel
Stop every in-flight run of a workflow
curl --request POST \
--url https://api.pineyard.ai/workflows/{id}/runs/cancel \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/workflows/{id}/runs/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/workflows/{id}/runs/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"cancelled": 123,
"failed": 123
}{
"error": "not_found"
}Required scope:
workflows.run
Requires workflows enabled for your workspace. Otherwise the request is refused; see Errors.
Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.

