Get workflow stats

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Counts each workflow's runs over a time window, for a health view.

Set execution_product to workflows or hooks to filter the results. Omit it to include both. A hook that denies an action still completed successfully; failed runs indicate execution errors.

One row per workflow that ran in the window, with how many runs finished, failed, or were cancelled, and how long they took on average. A workflow with no runs in the window does not appear.

The window can span at most 30 days. Ask for a longer one and the call still succeeds, but since is moved forward so the window ends at until and covers the 30 days before it, and nothing in the response says that happened. Set since and until to choose your own window, up to that cap. Leave both out for the last 24 hours.

get/api/apps/{app_id}/workflows/stats

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/workflows/stats
  • Auth: HTTP bearer

Path parameters

app_idstring required

ID of the app whose workflows you want to work with.

Query parameters

sincestring

Start of the window, as an ISO 8601 datetime. Defaults to 24 hours ago.

untilstring

End of the window, as an ISO 8601 datetime. Defaults to now.

execution_product'workflows' | 'hooks'

Filter to workflows or hooks. Omit to include both.

Response

One row per workflow that ran in the window.

workflow_idstring required

ID of the workflow these counts belong to.

totalinteger required

Runs that started in the window.

completedinteger required

Runs that finished successfully.

failedinteger required

Runs that ended in an error.

cancelledinteger required

Runs that were cancelled before finishing.

avg_duration_msnumber required

Mean duration of the runs in the window, in milliseconds, including time spent in wait tasks.

last_run_atstring nullable

When the most recent run in the window started, or null when none ran.

last_run_statusstring required

Status of that most recent run. Empty when no run happened in the window.

Example response

[
  {
    "workflow_id": "68b1c0d4e7b91d003c45a1f2",
    "total": 48,
    "completed": 44,
    "failed": 3,
    "cancelled": 1,
    "avg_duration_ms": 1840.5,
    "last_run_at": "2026-08-25T09:12:44Z",
    "last_run_status": "completed"
  }
]

Changes

    • breaking

      the query request parameter execution_product was restricted to a list of enum values

    • breaking

      query request parameter since list-of-types was narrowed by removing types null

    • breaking

      query request parameter until list-of-types was narrowed by removing types null

    • info

      added the new enum value hooks to the query request parameter execution_product

    • info

      added the new enum value workflows to the query request parameter execution_product

    • info

      for the query request parameter execution_product, the type was generalized from no type to string

    • info

      for the query request parameter since, the type was generalized from no type to string

    • info

      for the query request parameter until, the type was generalized from no type to string

    • info

      added the new optional query request parameter execution_product

    • info

      added the non-success response with the status