Deployments
Create Deployment
Gracefully creates a new deployment from the provided schema. If a deployment with the same name and flow_id already exists, the deployment is updated.
If the deployment has an active schedule, flow runs will be scheduled. When upserting, any scheduled runs from the existing deployment will be deleted.
post/api/deployments/
Headers
x-prefect-api-versionstring
Request body
Example request
{
"name": "my-deployment",
"schedules": [
{
"schedule": {
"timezone": "America/New_York"
}
}
],
"tags": [
"tag-1",
"tag-2"
],
"work_pool_name": "my-work-pool",
"schedule": {
"timezone": "America/New_York"
}
}Response
Successful Response
Example response
{
"schedule": {
"timezone": "America/New_York"
},
"schedules": [
{
"schedule": {
"timezone": "America/New_York"
}
}
],
"tags": [
"tag-1",
"tag-2"
]
}