Search for Kestra Executions
type: "io.kestra.plugin.kestra.executions.Query"
Examples
Search for executions with a specific label
id: search_executions_by_label
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.kestra.executions.Query
kestraUrl: http://localhost:8080
labels:
key: value
auth:
username: [email protected] # pass your Kestra username as secret or KV pair
password: Admin1234 # pass your Kestra password as secret or KV pair
fetchType: STORE # Store the results in a file
Search for successful executions in the last 10 hours
id: search_successful_executions
namespace: company.team
tasks:
- id: search_executions
type: io.kestra.plugin.kestra.executions.Query
kestraUrl: http://localhost:8080
timeRange: PT10H # In the last 10 hours
states:
- SUCCESS
auth:
username: [email protected] # pass your Kestra username as secret or KV pair
password: Admin1234 # pass your Kestra password as secret or KV pair
fetchType: FETCH # Fetch the results directly in the task output
Properties
auth Non-dynamicAbstractKestraTask-Auth
Authentication information.
childFilter string
CHILD
MAIN
To list only child executions of a given flow.
endDate string
date-time
To list only executions created before a given end date.
fetchType string
STORE
STORE
FETCH
FETCH_ONE
NONE
The way the fetched data will be stored.
flowId string
To list only executions of a given flow.
flowScopes array
USER
SYSTEM
Can be set to USER to fetch only user-created executions, or to SYSTEM to fetch only system executions. By default, the task will handle both.
kestraUrl string
Kestra API URL. If null, uses 'kestra.url' from configuration. If that is also null, defaults to 'http://localhost: 8080'.
labels object
To list only executions with given labels.
namespace string
To list only executions from a given namespace.
page integerstring
If not provided, all pages are fetched
To efficiently fetch only the first 10 API results, you can use page: 1
along with size: 10
.
size integerstring
10
The number of results to return per page.
startDate string
date-time
To list only executions created after a given start date.
states array
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
BREAKPOINT
To list only executions in given states.
tenantId string
The tenant ID to use for the request, defaults to current tenant.
timeRange string
duration
To list only executions created within a given time range duration.
triggerExecutionId string
To list all downstream executions started from a given execution id.
Outputs
row object
Map containing the first row of fetched data.
Only populated if using fetchType=FETCH_ONE
.
rows array
List containing the fetched data.
Only populated if using fetchType=FETCH
.
size integer
The number of fetched rows.
uri string
uri
Kestra's internal storage URI of the stored data.
Only populated if using fetchType=STORE
.
Definitions
io.kestra.plugin.kestra.AbstractKestraTask-Auth
apiToken string
API token.
password string
Password for HTTP Basic authentication.
username string
Username for HTTP Basic authentication.