Set current state of a job

put/sessions/{sessionId}/jobs/{jobId}/state

Sets the current state of the specified job. For example, you can use this method to set the state to canceled.

Request Samples

1

Response Samples

1canceled

Path Parameters

NameTypeRequiredDescription
jobId
string
true

Specifies the ID of the job whose state you want to update.

sessionId
string<object-id>
true

Specifies the ID of the session.

Query Parameters

NameTypeRequiredDescription
value
string
true

Specifies the new job state, such as canceled.

Allowed values:
canceleddeleted

Header Parameters

NameTypeRequiredDescription
If-Match
string
true

Specifies the current ETag of the job being updated.

Responses

StatusMeaningDescription
200OK

The request succeeded. The updated state was returned.

HeadersSchema
400Bad Request

The request was invalid.

Schema
404Not Found

No resource exists at the requested path.

Schema
409Conflict

The state request conflicts with current state of the job.

Schema
412Precondition Failed

The 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 Required

The request headers did not include an If-Match or If-Unmodified-Since precondition.

Schema