Skip to main content

What is a List Filter?

A List Filter is the SQL-like string that is provided as the parameter to an Advanced Visibility List API.

The following is an example List Filter:

WorkflowType = "main.YourWorkflowDefinition" and ExecutionStatus != "Running" and (StartTime > "2021-06-07T16:46:34.236-08:00" or CloseTime > "2021-06-07T16:46:34-08:00") order by StartTime desc

More example List Filters

A List Filter contains Search Attribute keys, Search Attribute values, and Operators.

  • The following operators are supported in List Filters:

    • AND, OR, ()
    • =, !=, >, >=, <, <=
    • IN
    • BETWEEN ... AND
    • ORDER BY
  • A List Filter applies to a single Namespace.

  • The range of a List Filter timestamp (StartTime, CloseTime, ExecutionTime) cannot exceed 9223372036854775807 (that is, maxInt64 - 1001).

  • A List Filter that uses a time range has a resolution of 1 ms on Elasticsearch 6 and 1 ns on Elasticsearch 7.

  • List Filter Search Attribute key names are case sensitive.

  • An Advanced List Filter API may take longer than expected if it is retrieving a large number of Workflow Executions (more than 10 million).

  • A ListWorkflow API supports pagination. Use the page token in the following call to retrieve the next page; continue until the page token is null/nil.

  • To paginate through a large number of Workflow Executions without skipping or duplicating them, use the ScanWorkflow API.

  • To efficiently count the number of Workflow Executions, use the CountWorkflow API.

Example List Filters#

WorkflowId = '<workflow-id>'
WorkflowId = '<workflow-id>' or WorkflowId = '<another-workflow-id>'
WorkflowId = '<workflow-id>' order by StartTime desc
WorkflowId = '<workflow-id>' and ExecutionStatus = 'Running'
WorkflowId = '<workflow-id>' or ExecutionStatus = 'Running'
WorkflowId = '<workflow-id>' and StartTime > '2021-08-22T15:04:05+00:00'
ExecutionTime between '2021-08-22T15:04:05+00:00' and '2021-08-28T15:04:05+00:00'
ExecutionTime < '2021-08-28T15:04:05+00:00' or ExecutionTime > '2021-08-22T15:04:05+00:00'
order by ExecutionTime
order by StartTime desc, CloseTime asc
order by CustomIntField asc

Get notified of updates