ai.v1.AssistantService
CancelRun
CancelRun asks an active run to stop. It returns once the request is recorded; the run then ends with RunFailed and category CANCELLED, and its subagents stop too. A pending approval of the run expires. Cancelling a run that already ended changes nothing and succeeds. Errors: - INVALID_ARGUMENT: malformed request. - NOT_FOUND: RUN_NOT_FOUND. - UNAVAILABLE: SERVICE_UNAVAILABLE; retry the same request. - UNAUTHENTICATED: missing or invalid credentials.
Method
POST
Path
ai.v1.AssistantService/CancelRun
Service
ai.v1.AssistantService
Visibility
Authentication
Session token
MFA Requirement
Not required
POST
ai.v1.AssistantService/CancelRun Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/ai.v1.AssistantService/CancelRun' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"runId": "1"
}'Responses
{}Request
ai.v1.CancelRunRequestResponse
ai.v1.CancelRunResponse runId string (fixed64)
Run to cancel.
No response fields documented for this type.
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |