Skip to contentSkip to page list

Docs

Retry a stop

Applies the stop again to every target it has not stopped: the ones that failed, the ones a restore turned back on, and plan targets added since the stop was requested. Targets already stopped are left alone. Only a quarantined, stop_failed or restore_failed stop can be retried (409 agent_stop_not_retryable). The stop goes back to stopping and announces its new outcome.

POST/api/v1/governance/agent-stops/{stopId}/retry
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/governance/agent-stops/<stopId>/retry"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "Authorization": "Bearer " + api_key,}​response = requests.post(    origin + path,    headers=headers,)print(response.json())

Success

application/json · Generated from schema

{  "data": {    "id": "string",    "agentId": "string",    "agentName": "string",    "status": "pending_approval",    "severity": "low",    "approval": "immediate",    "trigger": "user",    "reason": "string",    "requestedBy": {      "userId": "string",      "apiKeyId": "string"    },    "decidedByUserId": "string",    "restoredByUserId": "string",    "targets": [      {        "id": "string",        "label": "string",        "target": {          "kind": null,          "ingestionSourceId": null,          "endpointName": null        },        "state": "pending",        "errorCode": "string",        "appliedAt": "string",        "revertedAt": "string",        "alreadyStopped": false,        "gone": false,        "keptDisabled": false,        "dropped": false,        "dropId": "string"      }    ],    "requestedAt": "string",    "decidedAt": "string",    "quarantinedAt": "string",    "restoreRequestedAt": "string",    "restoredAt": "string",    "lastRequestId": "string"  }}
api-reference/governance-kill-switch/retry-a-stop

Authorization

Authorizationstringheaderrequired

Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.

Path parameters

stopIdstringrequired
At least 1 character

Responses

202

Success

application/json

dataobjectrequired
idstringrequired
agentIdstringrequired
agentNamestringrequired
statusstringrequired
One of"pending_approval""denied""stopping""quarantined""stop_failed""restoring""restored""restore_failed"
severitystringrequired
One of"low""medium""high""critical"
approvalstringrequired
One of"immediate""required"
triggerstringrequired
One of"user""api_key"
reasonstringrequired
requestedByobjectrequired
decidedByUserIdstring | nullrequired
restoredByUserIdstring | nullrequired
targetsobject[]required
requestedAtstringrequired
decidedAtstring | nullrequired
quarantinedAtstring | nullrequired
restoreRequestedAtstring | nullrequired
restoredAtstring | nullrequired
lastRequestIdstring
400

Bad Request

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
401

Unauthorized

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
403

Forbidden

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
404

Not Found

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
409

The stop or its plan is not in a state that allows this

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
422

Unprocessable Entity

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
500

Internal Server Error

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]

Documentation