Set state of a session

put/sessions/{sessionId}/state
Internal-Use Only

Sets the current state of a session. Use this method to cancel running code by setting the state to canceled.

Request Samples

1

Response Samples

1canceled

Path Parameters

NameTypeRequiredDescription
sessionId
string<object-id>
true

Specifies the ID of the session.

Query Parameters

NameTypeRequiredDescription
value
string
true

Specifies the new session state, such as canceled.

Allowed values:
canceleddeleted

Header Parameters

NameTypeRequiredDescription
If-Match
string
true

Specifies the ETag of the session that you are updating.

Responses

StatusMeaningDescription
200OKThe request succeeded. The updated state was returned.HeadersSchema
400Bad RequestThe request was invalid. An invalid state was provided for this session.Schema
404Not FoundNo session exists at the requested path.Schema
412Precondition FailedThe `If-Match` request header did not match the resource's entity tag, or the `If-Unmodified-Since` request header did not match the resources last modified timestamp.Schema
428Precondition RequiredThe request headers did not include an `If-Match` or `If-Unmodified-Since` precondition.Schema