Agents
Cancel an Agent run
Cancel an Agent run. The request enforces Agent roles, ownership, workspace boundaries, and lifecycle state.
POST
/
api
/
v1
/
agents
/
runs
/
{agentRunId}
/
cancel
Cancel an Agent run
curl --request POST \
--url https://api.revoengine.com/api/v1/agents/runs/{agentRunId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Operator stopped the run after the incident was resolved."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Operator stopped the run after the incident was resolved.'})
};
fetch('https://api.revoengine.com/api/v1/agents/runs/{agentRunId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/agents/runs/{agentRunId}/cancel"
payload = { "reason": "Operator stopped the run after the incident was resolved." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)⌘I
Cancel an Agent run
curl --request POST \
--url https://api.revoengine.com/api/v1/agents/runs/{agentRunId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Operator stopped the run after the incident was resolved."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Operator stopped the run after the incident was resolved.'})
};
fetch('https://api.revoengine.com/api/v1/agents/runs/{agentRunId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/agents/runs/{agentRunId}/cancel"
payload = { "reason": "Operator stopped the run after the incident was resolved." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
