Cancels the assistant session's in-flight turn, if any: the explicit user stop for a turn running detached from any stream. A cancel landing on a task that does not host the turn preempts it through the session turn epoch instead, ending it within one lease renewal.
HTTP request
POST https://ces.googleapis.com/v1beta/{name=projects/*/locations/*/apps/*/assistantSessions/*}:cancelAssistantTurn
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The assistant session whose in-flight turn to cancel. |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "turnId": string } |
| Fields | |
|---|---|
turnId |
Optional. The turn to cancel; empty cancels whichever turn is running. A cancel naming a turn that is no longer the running one is a no-op. |
Response body
Response for assistantSessions.cancelAssistantTurn.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "cancelled": boolean } |
| Fields | |
|---|---|
cancelled |
Whether an in-flight turn was found and asked to stop (directly on this task, or through an epoch preemption for a turn hosted elsewhere). |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/ces
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name resource:
ces.assistantSessions.get
For more information, see the IAM documentation.