Update Flow Run
curl --request PATCH \
--url https://api.example.com/flow_runs/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"flow_version": "<string>",
"parameters": {},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"pause_keys": [
"<string>"
],
"resuming": false
},
"tags": [
"<string>"
],
"infrastructure_pid": "<string>",
"job_variables": {}
}
'import requests
url = "https://api.example.com/flow_runs/{id}"
payload = {
"name": "<string>",
"flow_version": "<string>",
"parameters": {},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"pause_keys": ["<string>"],
"resuming": False
},
"tags": ["<string>"],
"infrastructure_pid": "<string>",
"job_variables": {}
}
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({
name: '<string>',
flow_version: '<string>',
parameters: {},
empirical_policy: {
max_retries: 0,
retry_delay_seconds: 0,
retries: 123,
retry_delay: 123,
pause_keys: ['<string>'],
resuming: false
},
tags: ['<string>'],
infrastructure_pid: '<string>',
job_variables: {}
})
};
fetch('https://api.example.com/flow_runs/{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/flow_runs/{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([
'name' => '<string>',
'flow_version' => '<string>',
'parameters' => [
],
'empirical_policy' => [
'max_retries' => 0,
'retry_delay_seconds' => 0,
'retries' => 123,
'retry_delay' => 123,
'pause_keys' => [
'<string>'
],
'resuming' => false
],
'tags' => [
'<string>'
],
'infrastructure_pid' => '<string>',
'job_variables' => [
]
]),
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/flow_runs/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"flow_version\": \"<string>\",\n \"parameters\": {},\n \"empirical_policy\": {\n \"max_retries\": 0,\n \"retry_delay_seconds\": 0,\n \"retries\": 123,\n \"retry_delay\": 123,\n \"pause_keys\": [\n \"<string>\"\n ],\n \"resuming\": false\n },\n \"tags\": [\n \"<string>\"\n ],\n \"infrastructure_pid\": \"<string>\",\n \"job_variables\": {}\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/flow_runs/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"flow_version\": \"<string>\",\n \"parameters\": {},\n \"empirical_policy\": {\n \"max_retries\": 0,\n \"retry_delay_seconds\": 0,\n \"retries\": 123,\n \"retry_delay\": 123,\n \"pause_keys\": [\n \"<string>\"\n ],\n \"resuming\": false\n },\n \"tags\": [\n \"<string>\"\n ],\n \"infrastructure_pid\": \"<string>\",\n \"job_variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/flow_runs/{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 \"name\": \"<string>\",\n \"flow_version\": \"<string>\",\n \"parameters\": {},\n \"empirical_policy\": {\n \"max_retries\": 0,\n \"retry_delay_seconds\": 0,\n \"retries\": 123,\n \"retry_delay\": 123,\n \"pause_keys\": [\n \"<string>\"\n ],\n \"resuming\": false\n },\n \"tags\": [\n \"<string>\"\n ],\n \"infrastructure_pid\": \"<string>\",\n \"job_variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Flow Runs
Update Flow Run
Updates a flow run.
PATCH
/
flow_runs
/
{id}
Update Flow Run
curl --request PATCH \
--url https://api.example.com/flow_runs/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"flow_version": "<string>",
"parameters": {},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"pause_keys": [
"<string>"
],
"resuming": false
},
"tags": [
"<string>"
],
"infrastructure_pid": "<string>",
"job_variables": {}
}
'import requests
url = "https://api.example.com/flow_runs/{id}"
payload = {
"name": "<string>",
"flow_version": "<string>",
"parameters": {},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"pause_keys": ["<string>"],
"resuming": False
},
"tags": ["<string>"],
"infrastructure_pid": "<string>",
"job_variables": {}
}
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({
name: '<string>',
flow_version: '<string>',
parameters: {},
empirical_policy: {
max_retries: 0,
retry_delay_seconds: 0,
retries: 123,
retry_delay: 123,
pause_keys: ['<string>'],
resuming: false
},
tags: ['<string>'],
infrastructure_pid: '<string>',
job_variables: {}
})
};
fetch('https://api.example.com/flow_runs/{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/flow_runs/{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([
'name' => '<string>',
'flow_version' => '<string>',
'parameters' => [
],
'empirical_policy' => [
'max_retries' => 0,
'retry_delay_seconds' => 0,
'retries' => 123,
'retry_delay' => 123,
'pause_keys' => [
'<string>'
],
'resuming' => false
],
'tags' => [
'<string>'
],
'infrastructure_pid' => '<string>',
'job_variables' => [
]
]),
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/flow_runs/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"flow_version\": \"<string>\",\n \"parameters\": {},\n \"empirical_policy\": {\n \"max_retries\": 0,\n \"retry_delay_seconds\": 0,\n \"retries\": 123,\n \"retry_delay\": 123,\n \"pause_keys\": [\n \"<string>\"\n ],\n \"resuming\": false\n },\n \"tags\": [\n \"<string>\"\n ],\n \"infrastructure_pid\": \"<string>\",\n \"job_variables\": {}\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/flow_runs/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"flow_version\": \"<string>\",\n \"parameters\": {},\n \"empirical_policy\": {\n \"max_retries\": 0,\n \"retry_delay_seconds\": 0,\n \"retries\": 123,\n \"retry_delay\": 123,\n \"pause_keys\": [\n \"<string>\"\n ],\n \"resuming\": false\n },\n \"tags\": [\n \"<string>\"\n ],\n \"infrastructure_pid\": \"<string>\",\n \"job_variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/flow_runs/{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 \"name\": \"<string>\",\n \"flow_version\": \"<string>\",\n \"parameters\": {},\n \"empirical_policy\": {\n \"max_retries\": 0,\n \"retry_delay_seconds\": 0,\n \"retries\": 123,\n \"retry_delay\": 123,\n \"pause_keys\": [\n \"<string>\"\n ],\n \"resuming\": false\n },\n \"tags\": [\n \"<string>\"\n ],\n \"infrastructure_pid\": \"<string>\",\n \"job_variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Path Parameters
The flow run id
Body
application/json
Data used by the Prefect REST API to update a flow run.
Response
Successful Response
Was this page helpful?
⌘I