POST
/
api
/
flow_runs
/
{id}
/
set_state
{
  "state": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "SCHEDULED",
    "name": "<string>",
    "timestamp": "2023-11-07T05:31:56Z",
    "message": "Run started",
    "data": "<any>",
    "state_details": {
      "flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "task_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "child_flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "scheduled_time": "2023-11-07T05:31:56Z",
      "cache_key": "<string>",
      "cache_expiration": "2023-11-07T05:31:56Z",
      "deferred": true,
      "untrackable_result": false,
      "pause_timeout": "2023-11-07T05:31:56Z",
      "pause_reschedule": false,
      "pause_key": "<string>",
      "run_input_keyset": {},
      "refresh_cache": true,
      "retriable": true,
      "transition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "task_parameters_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "traceparent": "<string>"
    }
  },
  "status": "ACCEPT",
  "details": {
    "type": "accept_details"
  }
}

Headers

x-prefect-api-version
string

Path Parameters

id
string
required

The flow 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
Successful Response

A container for the output of state orchestration.

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.