res = client.workflows.executions.list(("my_workflow", "1"))
from cognite.client.utils import timestamp_to_ms
res = client.workflows.executions.list(
created_time_start=timestamp_to_ms("1d-ago"))curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"workflowFilters": [
{
"externalId": "<string>",
"version": "<string>"
}
],
"createdTimeStart": 1,
"createdTimeEnd": 1,
"status": []
},
"limit": 100,
"cursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {
workflowFilters: [{externalId: '<string>', version: '<string>'}],
createdTimeStart: 1,
createdTimeEnd: 1,
status: []
},
limit: 100,
cursor: '4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo'
})
};
fetch('https://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list', 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://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list",
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([
'filter' => [
'workflowFilters' => [
[
'externalId' => '<string>',
'version' => '<string>'
]
],
'createdTimeStart' => 1,
'createdTimeEnd' => 1,
'status' => [
]
],
'limit' => 100,
'cursor' => '4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list"
payload := strings.NewReader("{\n \"filter\": {\n \"workflowFilters\": [\n {\n \"externalId\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"createdTimeStart\": 1,\n \"createdTimeEnd\": 1,\n \"status\": []\n },\n \"limit\": 100,\n \"cursor\": \"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"workflowFilters\": [\n {\n \"externalId\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"createdTimeStart\": 1,\n \"createdTimeEnd\": 1,\n \"status\": []\n },\n \"limit\": 100,\n \"cursor\": \"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"workflowFilters\": [\n {\n \"externalId\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"createdTimeStart\": 1,\n \"createdTimeEnd\": 1,\n \"status\": []\n },\n \"limit\": 100,\n \"cursor\": \"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "059edaa4-a17a-4102-910e-2c3591500cce",
"workflowExternalId": "<string>",
"engineExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdTime": 1730204346000,
"metadata": {},
"version": "<string>",
"startTime": 1730204346000,
"endTime": 1730204346000,
"reasonForIncompletion": "<string>"
}
],
"nextCursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}Filter workflow executions
Required capabilities:
workflowOrchestrationACL:READ
List workflow executions matching a given filter.
res = client.workflows.executions.list(("my_workflow", "1"))
from cognite.client.utils import timestamp_to_ms
res = client.workflows.executions.list(
created_time_start=timestamp_to_ms("1d-ago"))curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"workflowFilters": [
{
"externalId": "<string>",
"version": "<string>"
}
],
"createdTimeStart": 1,
"createdTimeEnd": 1,
"status": []
},
"limit": 100,
"cursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {
workflowFilters: [{externalId: '<string>', version: '<string>'}],
createdTimeStart: 1,
createdTimeEnd: 1,
status: []
},
limit: 100,
cursor: '4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo'
})
};
fetch('https://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list', 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://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list",
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([
'filter' => [
'workflowFilters' => [
[
'externalId' => '<string>',
'version' => '<string>'
]
],
'createdTimeStart' => 1,
'createdTimeEnd' => 1,
'status' => [
]
],
'limit' => 100,
'cursor' => '4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list"
payload := strings.NewReader("{\n \"filter\": {\n \"workflowFilters\": [\n {\n \"externalId\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"createdTimeStart\": 1,\n \"createdTimeEnd\": 1,\n \"status\": []\n },\n \"limit\": 100,\n \"cursor\": \"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"workflowFilters\": [\n {\n \"externalId\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"createdTimeStart\": 1,\n \"createdTimeEnd\": 1,\n \"status\": []\n },\n \"limit\": 100,\n \"cursor\": \"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{cluster}.cognitedata.com/api/v1/projects/{project}/workflows/executions/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"workflowFilters\": [\n {\n \"externalId\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"createdTimeStart\": 1,\n \"createdTimeEnd\": 1,\n \"status\": []\n },\n \"limit\": 100,\n \"cursor\": \"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "059edaa4-a17a-4102-910e-2c3591500cce",
"workflowExternalId": "<string>",
"engineExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdTime": 1730204346000,
"metadata": {},
"version": "<string>",
"startTime": 1730204346000,
"endTime": 1730204346000,
"reasonForIncompletion": "<string>"
}
],
"nextCursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}Authorizations
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Body
Show child attributes
Show child attributes
The maximum number of results to return.
1 <= x <= 1000Cursor to use for paging through results. This cursor is returned in the response of a previous request as nextCursor. If not specified, start from the first page of results.
"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
Response
Filtered list of workflow executions
Was this page helpful?