POST
/
api
/
deployments

Headers

x-prefect-api-version
string

Body

application/json

Data used by the Prefect REST API to create a deployment.

flow_id
string
required

The ID of the flow associated with the deployment.

name
string
required

The name of the deployment.

concurrency_limit
integer | null

The deployment's concurrency limit.

Required range: x > 0
concurrency_options
object | null

The deployment's concurrency options.

description
string | null
enforce_parameter_schema
boolean
default:
true

Whether or not the deployment should enforce the parameter schema.

entrypoint
string | null
infrastructure_document_id
string | null
job_variables
object

Overrides for the flow's infrastructure configuration.

labels
object | null

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

parameter_openapi_schema
object | null

The parameter schema of the flow, including defaults.

parameters
object

Parameters for flow runs scheduled by the deployment.

path
string | null
paused
boolean
default:
false

Whether or not the deployment is paused.

pull_steps
object[] | null
schedules
object[]

A list of schedules for the deployment.

storage_document_id
string | null
tags
string[]

A list of deployment tags.

version
string | null
work_pool_name
string | null

The name of the deployment's work pool.

work_queue_name
string | null

Response

200 - application/json
created
string | null
required
flow_id
string
required

The flow id associated with the deployment.

id
string
required
name
string
required

The name of the deployment.

updated
string | null
required
concurrency_limit
integer | null
deprecated

DEPRECATED: Prefer global_concurrency_limit. Will always be None for backwards compatibility. Will be removed after December 2024.

concurrency_options
object | null

The concurrency options for the deployment.

created_by
object | null

Optional information about the creator of this deployment.

description
string | null

A description for the deployment.

enforce_parameter_schema
boolean
default:
true

Whether or not the deployment should enforce the parameter schema.

entrypoint
string | null

The path to the entrypoint for the workflow, relative to the path.

global_concurrency_limit
object | null

The global concurrency limit object for enforcing the maximum number of flow runs that can be active at once.

infrastructure_document_id
string | null

The block document defining infrastructure to use for flow runs.

job_variables
object

Overrides to apply to the base infrastructure block at runtime.

labels
object

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

last_polled
string | null

The last time the deployment was polled for status updates.

parameter_openapi_schema
object | null

The parameter schema of the flow, including defaults.

parameters
object

Parameters for flow runs scheduled by the deployment.

path
string | null

The path to the working directory for the workflow, relative to remote storage or an absolute path.

paused
boolean
default:
false

Whether or not the deployment is paused.

pull_steps
object[] | null

Pull steps for cloning and running this deployment.

schedules
object[]

A list of schedules for the deployment.

status
enum<string> | null
default:
NOT_READY

Whether the deployment is ready to run flows.

Available options:
READY,
NOT_READY
storage_document_id
string | null

The block document defining storage used for this flow.

tags
string[]

A list of tags for the deployment

updated_by
object | null

Optional information about the updater of this deployment.

version
string | null

An optional version for the deployment.

work_pool_name
string | null

The name of the deployment's work pool.

work_queue_name
string | null

The work queue for the deployment. If no work queue is set, work will not be scheduled.