Skip to content
Proud to collaborate with Microsoft for Startups

audit.workflow-run.aggregate ​

Aggregate workflow-run counts per workflow_type for an organization, optionally scoped to a domain prefix group and a time window.

Per-workflow_type run counts for one organization within a time window.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-audit
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—UUID of the organization whose runs are aggregated
workflow_type_prefixesjsonNo—Optional list of workflow_type name prefixes (strings). A row matches if any prefix matches. Use to scope the aggregate to a domain group (e.g. all kubernetes.* runs).
sincestringNo—ISO 8601 timestamp; defaults to 24h before until (or now) if omitted
untilstringNo—ISO 8601 timestamp; defaults to now if omitted
limitintegerNo—Max distinct workflow_types to return (default 500, max 5000)
include_totalbooleanNo—When true, also compute total_runs — the exact distinct run count across the window (an extra latest-per-run aggregate query). Default false: total_runs comes back null; the per-type counts in items are always exact.
include_childrenbooleanNo—When true, DAG child/step executions count as runs. Default false: only top-level runs (matches the query workflow's default, so list and aggregate reconcile).
workflow_run_idstringNo—Engine-stamped parent DAG run id when invoked as a Step target

Output Schema ​

FieldTypeRequiredDefaultDescription
itemsjsonYes—List of {workflow_type, count, last_started_at_iso} grouped by workflow_type, ordered by count descending.
since_isostringYes—The effective lower bound (inclusive) of the aggregation window
until_isostringYes—The effective upper bound (exclusive) of the aggregation window
total_typesintegerYes—Number of distinct workflow_types returned
total_runsintegerNo—Total distinct workflow-id count matching the filters, independent of the returned type limit. Only computed when include_total=true; null otherwise.
has_more_typesbooleanYes—Whether more workflow_type groups exist beyond the returned items
errorstringNo—Set when the underlying storage call raised (string message)
error_typestringNo—Set when the underlying storage call raised (exception class name)

States ​

StateInitialTerminalSuccessAuto-advanceDescription
doneYesYesYes——

Outcomes ​

OutcomeTypeDescriptionState Data Keys
aggregatedSUCCESSWorkflow run aggregates returneditems, total_runs
failedFAILUREAudit workflow failedfailure_reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "audit.workflow-run.aggregate",
  "initial_data": {
    "organization_uuid": "value"
  }
}