POST
/
api
/
deployments
/
get_scheduled_flow_runs

Headers

x-prefect-api-version
string

Body

application/json
deployment_ids
string[]
required

The deployment IDs to get scheduled runs for

scheduled_before
string

The maximum time to look for scheduled flow runs

limit
integer

Defaults to PREFECT_API_DEFAULT_LIMIT if not provided.

Response

200 - application/json
id
string
created
string | null
updated
string | null
name
string

The name of the flow run. Defaults to a random slug if not specified.

flow_id
string
required

The id of the flow being run.

state_id
string | null

The id of the flow run's current state.

deployment_id
string | null

The id of the deployment associated with this flow run, if available.

deployment_version
string | null

The version of the deployment associated with this flow run.

work_queue_id
string | null

The id of the run's work pool queue.

work_queue_name
string | null

The work queue that handled this flow run.

flow_version
string | null

The version of the flow executed in this flow run.

parameters
object

Parameters for the flow run.

idempotency_key
string | null

An optional idempotency key for the flow run. Used to ensure the same flow run is not created multiple times.

context
object

Additional context for the flow run.

empirical_policy
object

Defines of how a flow run should retry.

tags
string[]

A list of tags on the flow run

parent_task_run_id
string | null

If the flow run is a subflow, the id of the 'dummy' task in the parent flow used to track subflow state.

state_type
enum<string> | null

The type of the current flow run state.

Available options:
SCHEDULED,
PENDING,
RUNNING,
COMPLETED,
FAILED,
CANCELLED,
CRASHED,
PAUSED,
CANCELLING
state_name
string | null

The name of the current flow run state.

run_count
integer
default: 0

The number of times the flow run was executed.

expected_start_time
string | null

The flow run's expected start time.

next_scheduled_start_time
string | null

The next time the flow run is scheduled to start.

start_time
string | null

The actual start time.

end_time
string | null

The actual end time.

total_run_time
number
default: 0

Total run time. If the flow run was executed multiple times, the time of each run will be summed.

estimated_run_time
number
default: 0

A real-time estimate of the total run time.

estimated_start_time_delta
number
default: 0

The difference between actual and expected start time.

auto_scheduled
boolean
default: false

Whether or not the flow run was automatically scheduled.

infrastructure_document_id
string | null

The block document defining infrastructure to use this flow run.

infrastructure_pid
string | null

The id of the flow run as returned by an infrastructure block.

created_by
object | null

Optional information about the creator of this flow run.

work_pool_id
string | null

The id of the flow run's work pool.

work_pool_name
string | null

The name of the flow run's work pool.

state
object | null

The current state of the flow run.

job_variables
object | null

Variables used as overrides in the base job template