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: admin@kestra.io # 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: admin@kestra.io # 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
CHILDMAINUNKNOWN_DEFAULT_OPEN_APITo list only child executions of a given flow
endDate string
date-timeTo list only executions created before a given end date
fetchType string
STORESTOREFETCHFETCH_ONENONEThe way the fetched data will be stored
flowId string
To list only executions of a given flow
flowScopes array
USERSYSTEMUNKNOWN_DEFAULT_OPEN_APICan 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
10The number of results to return per page
startDate string
date-timeTo list only executions created after a given start date
states array
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTUNKNOWN_DEFAULT_OPEN_APITo list only executions in given states
tenantId string
The tenant ID to use for the request, defaults to current tenant.
timeRange string
durationTo 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
uriKestra'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