Update Deployment
curl --request PATCH \
--url https://api.example.com/deployments/{id} \
--header 'Content-Type: application/json' \
--data '
{
"version": "<string>",
"description": "<string>",
"paused": false,
"schedules": [
{
"active": true,
"schedule": {
"interval": 123,
"anchor_date": "2023-11-07T05:31:56Z",
"timezone": "America/New_York"
},
"max_scheduled_runs": 1,
"parameters": {},
"slug": "<string>",
"replaces": "<string>"
}
],
"concurrency_limit": 1,
"concurrency_options": {
"grace_period_seconds": 43230
},
"global_concurrency_limit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parameters": {},
"parameter_openapi_schema": {},
"tags": [
"<string>"
],
"work_queue_name": "<string>",
"work_pool_name": "my-work-pool",
"path": "<string>",
"job_variables": {},
"pull_steps": [
{}
],
"entrypoint": "<string>",
"storage_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"infrastructure_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enforce_parameter_schema": true,
"version_info": {
"type": "<string>",
"version": "<string>"
}
}
'import requests
url = "https://api.example.com/deployments/{id}"
payload = {
"version": "<string>",
"description": "<string>",
"paused": False,
"schedules": [
{
"active": True,
"schedule": {
"interval": 123,
"anchor_date": "2023-11-07T05:31:56Z",
"timezone": "America/New_York"
},
"max_scheduled_runs": 1,
"parameters": {},
"slug": "<string>",
"replaces": "<string>"
}
],
"concurrency_limit": 1,
"concurrency_options": { "grace_period_seconds": 43230 },
"global_concurrency_limit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parameters": {},
"parameter_openapi_schema": {},
"tags": ["<string>"],
"work_queue_name": "<string>",
"work_pool_name": "my-work-pool",
"path": "<string>",
"job_variables": {},
"pull_steps": [{}],
"entrypoint": "<string>",
"storage_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"infrastructure_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enforce_parameter_schema": True,
"version_info": {
"type": "<string>",
"version": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: '<string>',
description: '<string>',
paused: false,
schedules: [
{
active: true,
schedule: {
interval: 123,
anchor_date: '2023-11-07T05:31:56Z',
timezone: 'America/New_York'
},
max_scheduled_runs: 1,
parameters: {},
slug: '<string>',
replaces: '<string>'
}
],
concurrency_limit: 1,
concurrency_options: {grace_period_seconds: 43230},
global_concurrency_limit_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
parameters: {},
parameter_openapi_schema: {},
tags: ['<string>'],
work_queue_name: '<string>',
work_pool_name: 'my-work-pool',
path: '<string>',
job_variables: {},
pull_steps: [{}],
entrypoint: '<string>',
storage_document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
infrastructure_document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
enforce_parameter_schema: true,
version_info: {type: '<string>', version: '<string>'}
})
};
fetch('https://api.example.com/deployments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/deployments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'version' => '<string>',
'description' => '<string>',
'paused' => false,
'schedules' => [
[
'active' => true,
'schedule' => [
'interval' => 123,
'anchor_date' => '2023-11-07T05:31:56Z',
'timezone' => 'America/New_York'
],
'max_scheduled_runs' => 1,
'parameters' => [
],
'slug' => '<string>',
'replaces' => '<string>'
]
],
'concurrency_limit' => 1,
'concurrency_options' => [
'grace_period_seconds' => 43230
],
'global_concurrency_limit_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'parameters' => [
],
'parameter_openapi_schema' => [
],
'tags' => [
'<string>'
],
'work_queue_name' => '<string>',
'work_pool_name' => 'my-work-pool',
'path' => '<string>',
'job_variables' => [
],
'pull_steps' => [
[
]
],
'entrypoint' => '<string>',
'storage_document_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'infrastructure_document_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'enforce_parameter_schema' => true,
'version_info' => [
'type' => '<string>',
'version' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/deployments/{id}"
payload := strings.NewReader("{\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"paused\": false,\n \"schedules\": [\n {\n \"active\": true,\n \"schedule\": {\n \"interval\": 123,\n \"anchor_date\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"America/New_York\"\n },\n \"max_scheduled_runs\": 1,\n \"parameters\": {},\n \"slug\": \"<string>\",\n \"replaces\": \"<string>\"\n }\n ],\n \"concurrency_limit\": 1,\n \"concurrency_options\": {\n \"grace_period_seconds\": 43230\n },\n \"global_concurrency_limit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parameters\": {},\n \"parameter_openapi_schema\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"work_queue_name\": \"<string>\",\n \"work_pool_name\": \"my-work-pool\",\n \"path\": \"<string>\",\n \"job_variables\": {},\n \"pull_steps\": [\n {}\n ],\n \"entrypoint\": \"<string>\",\n \"storage_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"infrastructure_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enforce_parameter_schema\": true,\n \"version_info\": {\n \"type\": \"<string>\",\n \"version\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/deployments/{id}")
.header("Content-Type", "application/json")
.body("{\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"paused\": false,\n \"schedules\": [\n {\n \"active\": true,\n \"schedule\": {\n \"interval\": 123,\n \"anchor_date\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"America/New_York\"\n },\n \"max_scheduled_runs\": 1,\n \"parameters\": {},\n \"slug\": \"<string>\",\n \"replaces\": \"<string>\"\n }\n ],\n \"concurrency_limit\": 1,\n \"concurrency_options\": {\n \"grace_period_seconds\": 43230\n },\n \"global_concurrency_limit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parameters\": {},\n \"parameter_openapi_schema\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"work_queue_name\": \"<string>\",\n \"work_pool_name\": \"my-work-pool\",\n \"path\": \"<string>\",\n \"job_variables\": {},\n \"pull_steps\": [\n {}\n ],\n \"entrypoint\": \"<string>\",\n \"storage_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"infrastructure_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enforce_parameter_schema\": true,\n \"version_info\": {\n \"type\": \"<string>\",\n \"version\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/deployments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"paused\": false,\n \"schedules\": [\n {\n \"active\": true,\n \"schedule\": {\n \"interval\": 123,\n \"anchor_date\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"America/New_York\"\n },\n \"max_scheduled_runs\": 1,\n \"parameters\": {},\n \"slug\": \"<string>\",\n \"replaces\": \"<string>\"\n }\n ],\n \"concurrency_limit\": 1,\n \"concurrency_options\": {\n \"grace_period_seconds\": 43230\n },\n \"global_concurrency_limit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parameters\": {},\n \"parameter_openapi_schema\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"work_queue_name\": \"<string>\",\n \"work_pool_name\": \"my-work-pool\",\n \"path\": \"<string>\",\n \"job_variables\": {},\n \"pull_steps\": [\n {}\n ],\n \"entrypoint\": \"<string>\",\n \"storage_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"infrastructure_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enforce_parameter_schema\": true,\n \"version_info\": {\n \"type\": \"<string>\",\n \"version\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Deployments
Update Deployment
PATCH
/
deployments
/
{id}
Update Deployment
curl --request PATCH \
--url https://api.example.com/deployments/{id} \
--header 'Content-Type: application/json' \
--data '
{
"version": "<string>",
"description": "<string>",
"paused": false,
"schedules": [
{
"active": true,
"schedule": {
"interval": 123,
"anchor_date": "2023-11-07T05:31:56Z",
"timezone": "America/New_York"
},
"max_scheduled_runs": 1,
"parameters": {},
"slug": "<string>",
"replaces": "<string>"
}
],
"concurrency_limit": 1,
"concurrency_options": {
"grace_period_seconds": 43230
},
"global_concurrency_limit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parameters": {},
"parameter_openapi_schema": {},
"tags": [
"<string>"
],
"work_queue_name": "<string>",
"work_pool_name": "my-work-pool",
"path": "<string>",
"job_variables": {},
"pull_steps": [
{}
],
"entrypoint": "<string>",
"storage_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"infrastructure_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enforce_parameter_schema": true,
"version_info": {
"type": "<string>",
"version": "<string>"
}
}
'import requests
url = "https://api.example.com/deployments/{id}"
payload = {
"version": "<string>",
"description": "<string>",
"paused": False,
"schedules": [
{
"active": True,
"schedule": {
"interval": 123,
"anchor_date": "2023-11-07T05:31:56Z",
"timezone": "America/New_York"
},
"max_scheduled_runs": 1,
"parameters": {},
"slug": "<string>",
"replaces": "<string>"
}
],
"concurrency_limit": 1,
"concurrency_options": { "grace_period_seconds": 43230 },
"global_concurrency_limit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parameters": {},
"parameter_openapi_schema": {},
"tags": ["<string>"],
"work_queue_name": "<string>",
"work_pool_name": "my-work-pool",
"path": "<string>",
"job_variables": {},
"pull_steps": [{}],
"entrypoint": "<string>",
"storage_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"infrastructure_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enforce_parameter_schema": True,
"version_info": {
"type": "<string>",
"version": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: '<string>',
description: '<string>',
paused: false,
schedules: [
{
active: true,
schedule: {
interval: 123,
anchor_date: '2023-11-07T05:31:56Z',
timezone: 'America/New_York'
},
max_scheduled_runs: 1,
parameters: {},
slug: '<string>',
replaces: '<string>'
}
],
concurrency_limit: 1,
concurrency_options: {grace_period_seconds: 43230},
global_concurrency_limit_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
parameters: {},
parameter_openapi_schema: {},
tags: ['<string>'],
work_queue_name: '<string>',
work_pool_name: 'my-work-pool',
path: '<string>',
job_variables: {},
pull_steps: [{}],
entrypoint: '<string>',
storage_document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
infrastructure_document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
enforce_parameter_schema: true,
version_info: {type: '<string>', version: '<string>'}
})
};
fetch('https://api.example.com/deployments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/deployments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'version' => '<string>',
'description' => '<string>',
'paused' => false,
'schedules' => [
[
'active' => true,
'schedule' => [
'interval' => 123,
'anchor_date' => '2023-11-07T05:31:56Z',
'timezone' => 'America/New_York'
],
'max_scheduled_runs' => 1,
'parameters' => [
],
'slug' => '<string>',
'replaces' => '<string>'
]
],
'concurrency_limit' => 1,
'concurrency_options' => [
'grace_period_seconds' => 43230
],
'global_concurrency_limit_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'parameters' => [
],
'parameter_openapi_schema' => [
],
'tags' => [
'<string>'
],
'work_queue_name' => '<string>',
'work_pool_name' => 'my-work-pool',
'path' => '<string>',
'job_variables' => [
],
'pull_steps' => [
[
]
],
'entrypoint' => '<string>',
'storage_document_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'infrastructure_document_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'enforce_parameter_schema' => true,
'version_info' => [
'type' => '<string>',
'version' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/deployments/{id}"
payload := strings.NewReader("{\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"paused\": false,\n \"schedules\": [\n {\n \"active\": true,\n \"schedule\": {\n \"interval\": 123,\n \"anchor_date\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"America/New_York\"\n },\n \"max_scheduled_runs\": 1,\n \"parameters\": {},\n \"slug\": \"<string>\",\n \"replaces\": \"<string>\"\n }\n ],\n \"concurrency_limit\": 1,\n \"concurrency_options\": {\n \"grace_period_seconds\": 43230\n },\n \"global_concurrency_limit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parameters\": {},\n \"parameter_openapi_schema\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"work_queue_name\": \"<string>\",\n \"work_pool_name\": \"my-work-pool\",\n \"path\": \"<string>\",\n \"job_variables\": {},\n \"pull_steps\": [\n {}\n ],\n \"entrypoint\": \"<string>\",\n \"storage_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"infrastructure_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enforce_parameter_schema\": true,\n \"version_info\": {\n \"type\": \"<string>\",\n \"version\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/deployments/{id}")
.header("Content-Type", "application/json")
.body("{\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"paused\": false,\n \"schedules\": [\n {\n \"active\": true,\n \"schedule\": {\n \"interval\": 123,\n \"anchor_date\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"America/New_York\"\n },\n \"max_scheduled_runs\": 1,\n \"parameters\": {},\n \"slug\": \"<string>\",\n \"replaces\": \"<string>\"\n }\n ],\n \"concurrency_limit\": 1,\n \"concurrency_options\": {\n \"grace_period_seconds\": 43230\n },\n \"global_concurrency_limit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parameters\": {},\n \"parameter_openapi_schema\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"work_queue_name\": \"<string>\",\n \"work_pool_name\": \"my-work-pool\",\n \"path\": \"<string>\",\n \"job_variables\": {},\n \"pull_steps\": [\n {}\n ],\n \"entrypoint\": \"<string>\",\n \"storage_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"infrastructure_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enforce_parameter_schema\": true,\n \"version_info\": {\n \"type\": \"<string>\",\n \"version\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/deployments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"paused\": false,\n \"schedules\": [\n {\n \"active\": true,\n \"schedule\": {\n \"interval\": 123,\n \"anchor_date\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"America/New_York\"\n },\n \"max_scheduled_runs\": 1,\n \"parameters\": {},\n \"slug\": \"<string>\",\n \"replaces\": \"<string>\"\n }\n ],\n \"concurrency_limit\": 1,\n \"concurrency_options\": {\n \"grace_period_seconds\": 43230\n },\n \"global_concurrency_limit_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parameters\": {},\n \"parameter_openapi_schema\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"work_queue_name\": \"<string>\",\n \"work_pool_name\": \"my-work-pool\",\n \"path\": \"<string>\",\n \"job_variables\": {},\n \"pull_steps\": [\n {}\n ],\n \"entrypoint\": \"<string>\",\n \"storage_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"infrastructure_document_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enforce_parameter_schema\": true,\n \"version_info\": {\n \"type\": \"<string>\",\n \"version\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Path Parameters
The deployment id
Body
application/json
Data used by the Prefect REST API to update a deployment.
Whether or not the deployment is paused.
A list of schedules for the deployment.
Show child attributes
Show child attributes
The deployment's concurrency limit.
Required range:
x > 0The deployment's concurrency options.
Show child attributes
Show child attributes
The ID of the global concurrency limit to apply to the deployment.
Parameters for flow runs scheduled by the deployment.
The parameter schema of the flow, including defaults.
A list of deployment tags.
Example:
["tag-1", "tag-2"]
The name of the deployment's work pool.
Example:
"my-work-pool"
Overrides for the flow's infrastructure configuration.
Whether or not the deployment should enforce the parameter schema.
A description of this version of the deployment.
Show child attributes
Show child attributes
Response
Successful Response
Was this page helpful?
⌘I