Set state of a session
put/sessions/{sessionId}/state
Sets the current state of a session. Use this method to cancel running code by setting the state to canceled.
| Name | Type | Required | Description |
|---|---|---|---|
sessionId | string<object-id> | true | Specifies the ID of the session. |
| Name | Type | Required | Description |
|---|---|---|---|
value | string | true | Specifies the new session state, such as canceled. Allowed values: canceleddeleted |
| Status | Meaning | Description | ||
|---|---|---|---|---|
| 200 | OK | The request succeeded. The updated state was returned. | Headers | Schema |
| 400 | Bad Request | The request was invalid. An invalid state was provided for this session. | Schema | |
| 404 | Not Found | No session exists at the requested path. | Schema | |
| 412 | Precondition Failed | The | Schema | |
| 428 | Precondition Required | The request headers did not include an | Schema |