POST
/
api
/
task_runs
/
{id}
/
set_state

Headers

x-prefect-api-version
string

Path Parameters

id
string
required

The task run id

Body

application/json
state
object
required

The intended state.

force
boolean
default: false

If false, orchestration rules will be applied that may alter or prevent the state transition. If True, orchestration rules are not applied.

Response

200 - application/json
state
object | null
required

Represents the state of a run.

status
enum<string>
required

Enumerates return statuses for setting run states.

Available options:
ACCEPT,
REJECT,
ABORT,
WAIT
details
object
required

Details associated with an ACCEPT state transition.