workflow_query_workflow_executions
Query workflow executions by parameters such as status, workflow type, and timestamps using = and IN operators.
Instructions
Search for workflow (executions) based on payload and other parameters. The query parameter accepts exact matches using = and AND operators on the following fields: workflowId, correlationId, workflowType, and status. Matches using = can be written as taskType = HTTP. Matches using IN are written as status IN (SCHEDULED, IN_PROGRESS). The 'startTime' and 'modifiedTime' field uses unix timestamps and accepts queries using < and >, for example startTime < 1696143600000. Queries can be combined using AND, for example taskType = HTTP AND status = SCHEDULED
If no query kwargs are provided, all workflow executions will be returned.
Example call to this function to query for a status of FAILED and start time after Thu May 01 2025 22:20:59 GMT+0000: query_workflow_executions('status="FAILED" AND startTime > 1746138025 ')
Searching for a range of time does not work, i.e. "startTime > 0 AND startTime < 1746138025"
Example call for FAILED or COMPLETED status and workflow named "SimpleWorkflow": query_workflow_executions('status IN (FAILED, COMPLETED) AND workflowType="SimpleWorkflow"')
Args: query: A query string, utilizing any of the following fields. workflowId: The id of a workflow execution. correlationId: The correlationId used to create any workflow executions. workflowType: Synonymous with workflow name. createTime: The creation unix timestamp of a workflow. startTime: The start unix timestamp of a workflow. status: The status of a workflow execution. One of [RUNNING, PAUSED, COMPLETED, TIMED_OUT, TERMINATED, FAILED]. endTime: The end unix timestamp of a workflow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |