Deployments
Create Flow Run From Deployment
API Reference
- Overview
- Python SDK Overview
- Settings reference
- REST API
- REST API overview
- Cloud API
- Server API
- Server API Overview
- Root
- Flows
- Flow Runs
- Task Runs
- Flow Run States
- Task Run States
- Deployments
- POSTCreate Deployment
- GETRead Deployment
- DELDelete Deployment
- PATCHUpdate Deployment
- GETRead Deployment By Name
- POSTRead Deployments
- POSTPaginate Deployments
- POSTGet Scheduled Flow Runs For Deployments
- POSTCount Deployments
- POSTSchedule Deployment
- POSTResume Deployment
- POSTPause Deployment
- POSTCreate Flow Run From Deployment
- GETWork Queue Check For Deployment
- GETRead Deployment Schedules
- POSTCreate Deployment Schedules
- DELDelete Deployment Schedule
- PATCHUpdate Deployment Schedule
- POST
- SavedSearches
- Logs
- Concurrency Limits
- Concurrency Limits V2
- Block types
- Block documents
- Work Pools
- Task Workers
- Work Queues
- Artifacts
- Block schemas
- Block capabilities
- Collections
- Variables
- GETCreate Csrf Token
- Events
- Automations
- Admin
- CLI Reference
Deployments
Create Flow Run From Deployment
Create a flow run from a deployment.
Any parameters not provided will be inferred from the deployment’s parameters. If tags are not provided, the deployment’s tags will be used.
If no state is provided, the flow run will be created in a SCHEDULED state.
POST
/
api
/
deployments
/
{id}
/
create_flow_run
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"name": "my-flow-run",
"flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_version": "1.0",
"work_queue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_queue_name": "<string>",
"flow_version": "1.0",
"parameters": {},
"idempotency_key": "<string>",
"context": {
"my_var": "my_val"
},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"pause_keys": [
"<string>"
],
"resuming": true,
"retry_type": "in_process"
},
"tags": [
"tag-1",
"tag-2"
],
"labels": {
"key": "value1",
"key2": 42
},
"parent_task_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state_type": "SCHEDULED",
"state_name": "<string>",
"run_count": 0,
"expected_start_time": "2023-11-07T05:31:56Z",
"next_scheduled_start_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"total_run_time": 0,
"estimated_run_time": 0,
"estimated_start_time_delta": 0,
"auto_scheduled": false,
"infrastructure_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"infrastructure_pid": "<string>",
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"display_value": "<string>"
},
"work_pool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_pool_name": "my-work-pool",
"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>"
}
},
"job_variables": {}
}
Headers
Path Parameters
The deployment id
Body
application/json
Data used by the Prefect REST API to create a flow run from a deployment.
Response
200
application/json
Successful Response
The response is of type object
.
Was this page helpful?
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"name": "my-flow-run",
"flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_version": "1.0",
"work_queue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_queue_name": "<string>",
"flow_version": "1.0",
"parameters": {},
"idempotency_key": "<string>",
"context": {
"my_var": "my_val"
},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"pause_keys": [
"<string>"
],
"resuming": true,
"retry_type": "in_process"
},
"tags": [
"tag-1",
"tag-2"
],
"labels": {
"key": "value1",
"key2": 42
},
"parent_task_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state_type": "SCHEDULED",
"state_name": "<string>",
"run_count": 0,
"expected_start_time": "2023-11-07T05:31:56Z",
"next_scheduled_start_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"total_run_time": 0,
"estimated_run_time": 0,
"estimated_start_time_delta": 0,
"auto_scheduled": false,
"infrastructure_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"infrastructure_pid": "<string>",
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"display_value": "<string>"
},
"work_pool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_pool_name": "my-work-pool",
"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>"
}
},
"job_variables": {}
}