Skip to main content
POST
/
deployments
/
{id}
/
create_flow_run
/
bulk
Bulk Create Flow Runs From Deployment
curl --request POST \
  --url https://api.example.com/deployments/{id}/create_flow_run/bulk \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "state": {
      "type": "SCHEDULED",
      "name": "<string>",
      "message": "<string>",
      "data": "<unknown>",
      "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": false,
        "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>",
        "deployment_concurrency_lease_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    },
    "name": "<string>",
    "parameters": {},
    "enforce_parameter_schema": true,
    "context": {},
    "infrastructure_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "empirical_policy": {
      "max_retries": 0,
      "retry_delay_seconds": 0,
      "retries": 123,
      "retry_delay": 123,
      "pause_keys": [
        "<string>"
      ],
      "resuming": false,
      "retry_type": "in_process"
    },
    "tags": [
      "<string>"
    ],
    "idempotency_key": "<string>",
    "labels": {
      "key": "value1",
      "key2": 42
    },
    "parent_task_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "work_queue_name": "<string>",
    "job_variables": {}
  }
]
'
{
  "results": [
    {
      "status": "CREATED",
      "flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "error": "<string>"
    }
  ]
}

Headers

x-prefect-api-version
string

Path Parameters

id
string<uuid>
required

The deployment id

Body

application/json
state
StateCreate · object

The state of the flow run to create

name
string

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

Example:

"my-flow-run"

parameters
Parameters · object
enforce_parameter_schema
boolean | null

Whether or not to enforce the parameter schema on this run.

context
Context · object
infrastructure_document_id
string<uuid> | null
empirical_policy
FlowRunPolicy · object

The empirical policy for the flow run.

tags
string[]

A list of tags for the flow run.

Example:
["tag-1", "tag-2"]
idempotency_key
string | null

An optional idempotency key. If a flow run with the same idempotency key has already been created, the existing flow run will be returned.

labels
Labels · object

A dictionary of key-value labels. Values can be strings, numbers, or booleans.

Example:
{ "key": "value1", "key2": 42 }
parent_task_run_id
string<uuid> | null
work_queue_name
string | null
job_variables
Job Variables · object

Response

Successful Response

Response from bulk flow run creation.

results
FlowRunCreateResult · object[]