---
type: api
title: Get workflow statistics
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-workflows-stats
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-workflows-stats
products:
  - Kibana
---

# Get workflow statistics

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/workflows/stats`
- `GET` `/s/{space_id}/api/workflows/stats`

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Retrieve summary statistics about workflows, including total, enabled, and disabled counts; execution history metrics for the last 30 days are included only when the caller has execution read privilege.

## Required authorization

- Privileges: `workflowsManagement:read. Extended privileges (optional, expand functionality when granted): workflowsManagement:managed:read, workflowsManagement:readExecution, workflowsManagement:managed:readExecution`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Response

Indicates a successful response

`application/json`

## Code examples

#### Console

```console
GET kbn://api/workflows/stats
```

#### curl

```curl
curl \
  -X GET "${KIBANA_URL}/api/workflows/stats" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Get stats response

Example response with workflow counts and 30-day execution history

```json
{
  "executions": [
    {
      "cancelled": 1,
      "completed": 45,
      "date": "2025-11-20",
      "failed": 2,
      "timestamp": "2025-11-20T00:00:00.000Z"
    },
    {
      "cancelled": 0,
      "completed": 50,
      "date": "2025-11-21",
      "failed": 0,
      "timestamp": "2025-11-21T00:00:00.000Z"
    }
  ],
  "workflows": {
    "disabled": 3,
    "enabled": 12
  }
}
```

