
Kestra Plugin Query
CertifiedSearch executions with filters
Kestra Plugin Query
Search executions with filters
Queries executions by namespace, flow, labels, states, date range, or scope. Defaults to fetch all pages with page size 10 and stores results to internal storage unless fetchType overrides.
type: io.kestra.plugin.kestra.executions.QueryExamples
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: "{{ secret('KESTRA_USERNAME') }}"
password: "{{ secret('KESTRA_PASSWORD') }}"
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
auth:
username: "{{ secret('KESTRA_USERNAME') }}"
password: "{{ secret('KESTRA_PASSWORD') }}"
timeRange: PT10H # In the last 10 hours
states:
- SUCCESS
fetchType: FETCH # Fetch the results directly in the task output
Properties
auth Non-dynamic
Select API authentication
Use either an API token or HTTP Basic (username/password); do not provide both.
io.kestra.plugin.kestra.AbstractKestraTask-Auth
API token for bearer auth
trueAutomatically retrieve credentials from Kestra's configuration if available
The default configuration can be configured globally inside the Kestra configuration file:
- Set
kestra.tasks.sdk.authentication.api-tokento use an API token - Set
kestra.tasks.sdk.authentication.usernameandkestra.tasks.sdk.authentication.passwordfor HTTP basic authentication The Enterprise edition also provides setting a default configuration at the Namespace of Tenant level by an administrator.
Password for HTTP Basic auth
Username for HTTP Basic auth
childFilter string
CHILDMAINChild filter
Limits results to child execution context when set.
endDate string
End date (inclusive)
fetchType string
STORESTOREFETCHFETCH_ONENONEFetch strategy
Defaults to STORE (writes to internal storage and returns URI). FETCH returns rows in output; FETCH_ONE returns the first execution.
flowId string
Flow id filter
flowScopes array
USERSYSTEMFlow scope filter
USER for user-created executions, SYSTEM for system executions; defaults to both.
kestraUrl string
Override Kestra API endpoint
URL used for calls to the Kestra API. When null, renders {{ kestra.url }} from configuration; if still empty, defaults to http://localhost: 8080. Trailing slashes are stripped before use.
labels object
Labels filter
Matches executions containing the provided key/value pairs.
namespace string
Namespace filter
page integerstring
Page number
When null, iterates through all pages. Combine with size to limit requests.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
size integerstring
10Page size
Defaults to 10.
startDate string
Start date (inclusive)
states array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDUNKNOWN_DEFAULT_OPEN_APIExecution states
tenantId string
Override target tenant
Tenant identifier applied to API calls; defaults to the current execution tenant.
timeRange string
Relative time range
Duration back from now. Cannot be used with both startDate and endDate.
triggerExecutionId string
Downstream of 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.