Count Kestra executions

Counts executions matching filters and evaluates an optional expression against the count.

yaml
type: "io.kestra.plugin.kestra.executions.Count"

Count successful executions in a namespace

yaml
id: count_success_executions
namespace: company.team

tasks:
  - id: count_success
    type: io.kestra.plugin.kestra.executions.Count
    kestraUrl: http://localhost:8080

    namespaces:
    - company.team

    states:
    - SUCCESS

    startDate: "{{ now() | dateAdd(-7, 'DAYS') }}"
    endDate: "{{ now() }}"
    expression: "{{ count >= 0 }}"

    auth:
        username: "{{ secrets.kestra_username }}"
        password: "{{ secrets.kestra_password }}"

  - id: log_result
    type: io.kestra.plugin.core.log.Log
    message: |
        Execution count check completed.
        Matching executions: {{ outputs.count_success.count }}
Properties

Authentication information.

Authentication used to call the Kestra API. Uses the same credentials as Kestra login: either an API token or HTTP Basic (username/password).

Definitions
apiTokenstring

API token

passwordstring

Password for HTTP basic authentication

usernamestring

Username for HTTP basic authentication

Kestra API URL. If null, uses 'kestra.url' from configuration. If that is also null, defaults to 'http://localhost: 8080'.

SubTypestring
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDUNKNOWN_DEFAULT_OPEN_API

The tenant ID to use for the request, defaults to current tenant.