Get Scheduled Flow Runs
curl --request POST \
--url https://api.example.com/work_pools/{name}/get_scheduled_flow_runs \
--header 'Content-Type: application/json' \
--data '
{
"work_queue_names": [
"<string>"
],
"scheduled_before": "2023-11-07T05:31:56Z",
"scheduled_after": "2023-11-07T05:31:56Z",
"limit": 123
}
'import requests
url = "https://api.example.com/work_pools/{name}/get_scheduled_flow_runs"
payload = {
"work_queue_names": ["<string>"],
"scheduled_before": "2023-11-07T05:31:56Z",
"scheduled_after": "2023-11-07T05:31:56Z",
"limit": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
work_queue_names: ['<string>'],
scheduled_before: '2023-11-07T05:31:56Z',
scheduled_after: '2023-11-07T05:31:56Z',
limit: 123
})
};
fetch('https://api.example.com/work_pools/{name}/get_scheduled_flow_runs', 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/work_pools/{name}/get_scheduled_flow_runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'work_queue_names' => [
'<string>'
],
'scheduled_before' => '2023-11-07T05:31:56Z',
'scheduled_after' => '2023-11-07T05:31:56Z',
'limit' => 123
]),
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/work_pools/{name}/get_scheduled_flow_runs"
payload := strings.NewReader("{\n \"work_queue_names\": [\n \"<string>\"\n ],\n \"scheduled_before\": \"2023-11-07T05:31:56Z\",\n \"scheduled_after\": \"2023-11-07T05:31:56Z\",\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/work_pools/{name}/get_scheduled_flow_runs")
.header("Content-Type", "application/json")
.body("{\n \"work_queue_names\": [\n \"<string>\"\n ],\n \"scheduled_before\": \"2023-11-07T05:31:56Z\",\n \"scheduled_after\": \"2023-11-07T05:31:56Z\",\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/work_pools/{name}/get_scheduled_flow_runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"work_queue_names\": [\n \"<string>\"\n ],\n \"scheduled_before\": \"2023-11-07T05:31:56Z\",\n \"scheduled_after\": \"2023-11-07T05:31:56Z\",\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_body[
{
"work_pool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_queue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_version": "1.0",
"work_queue_name": "<string>",
"flow_version": "1.0",
"parameters": {},
"idempotency_key": "<string>",
"context": {},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"pause_keys": [
"<string>"
],
"resuming": false
},
"tags": [
"<string>"
],
"labels": {
"key": "value1",
"key2": 42
},
"parent_task_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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_queue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"message": "Run started",
"data": "<unknown>",
"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": false,
"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>",
"deployment_concurrency_lease_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"job_variables": {}
}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Work Pools
Get Scheduled Flow Runs
Load scheduled runs for a worker
POST
/
work_pools
/
{name}
/
get_scheduled_flow_runs
Get Scheduled Flow Runs
curl --request POST \
--url https://api.example.com/work_pools/{name}/get_scheduled_flow_runs \
--header 'Content-Type: application/json' \
--data '
{
"work_queue_names": [
"<string>"
],
"scheduled_before": "2023-11-07T05:31:56Z",
"scheduled_after": "2023-11-07T05:31:56Z",
"limit": 123
}
'import requests
url = "https://api.example.com/work_pools/{name}/get_scheduled_flow_runs"
payload = {
"work_queue_names": ["<string>"],
"scheduled_before": "2023-11-07T05:31:56Z",
"scheduled_after": "2023-11-07T05:31:56Z",
"limit": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
work_queue_names: ['<string>'],
scheduled_before: '2023-11-07T05:31:56Z',
scheduled_after: '2023-11-07T05:31:56Z',
limit: 123
})
};
fetch('https://api.example.com/work_pools/{name}/get_scheduled_flow_runs', 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/work_pools/{name}/get_scheduled_flow_runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'work_queue_names' => [
'<string>'
],
'scheduled_before' => '2023-11-07T05:31:56Z',
'scheduled_after' => '2023-11-07T05:31:56Z',
'limit' => 123
]),
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/work_pools/{name}/get_scheduled_flow_runs"
payload := strings.NewReader("{\n \"work_queue_names\": [\n \"<string>\"\n ],\n \"scheduled_before\": \"2023-11-07T05:31:56Z\",\n \"scheduled_after\": \"2023-11-07T05:31:56Z\",\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/work_pools/{name}/get_scheduled_flow_runs")
.header("Content-Type", "application/json")
.body("{\n \"work_queue_names\": [\n \"<string>\"\n ],\n \"scheduled_before\": \"2023-11-07T05:31:56Z\",\n \"scheduled_after\": \"2023-11-07T05:31:56Z\",\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/work_pools/{name}/get_scheduled_flow_runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"work_queue_names\": [\n \"<string>\"\n ],\n \"scheduled_before\": \"2023-11-07T05:31:56Z\",\n \"scheduled_after\": \"2023-11-07T05:31:56Z\",\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_body[
{
"work_pool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"work_queue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_version": "1.0",
"work_queue_name": "<string>",
"flow_version": "1.0",
"parameters": {},
"idempotency_key": "<string>",
"context": {},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"pause_keys": [
"<string>"
],
"resuming": false
},
"tags": [
"<string>"
],
"labels": {
"key": "value1",
"key2": 42
},
"parent_task_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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_queue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"message": "Run started",
"data": "<unknown>",
"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": false,
"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>",
"deployment_concurrency_lease_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"job_variables": {}
}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Path Parameters
The work pool name
Body
application/json
Was this page helpful?
⌘I