---
type: api
title: Get workflow aggregations
description: Retrieve distinct values and their counts for the specified workflow fields. Useful for building filters such as lists of tags or creators.<br/><br/>[Required authorization] Route required privileges: workflowsManagement:read OR workflowsManagement:managed:read.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-get-workflows-aggs
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-get-workflows-aggs
products:
  - Kibana
---

# Get workflow aggregations

Availability: 9.4+

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

## Paths

- `GET` `/api/workflows/aggs`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#basicauth)

## Description

Retrieve distinct values and their counts for the specified workflow fields. Useful for building filters such as lists of tags or creators.<br/><br/>[Required authorization] Route required privileges: workflowsManagement:read OR workflowsManagement:managed:read.

## Query String Parameters

- `fields` ([] string · min: 1 · max: 25)
  Field or fields to aggregate on.
- `managed` (enum)
  Filter aggregations by managed status.
  Values: `all`, `managed`, `unmanaged`

## Response

Indicates a successful response

## Code Examples

#### Console

```console
GET kbn://api/workflows/aggs?fields=tags&fields=createdBy
```

#### curl

```curl
curl \
  -X GET "${KIBANA_URL}/api/workflows/aggs?fields=tags&fields=createdBy" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response Examples

#### Get aggs response

Example response with tag and createdBy aggregations

```json
{
  "createdBy": [
    {
      "doc_count": 2,
      "key": "elastic"
    }
  ],
  "tags": [
    {
      "doc_count": 1,
      "key": "reporting"
    },
    {
      "doc_count": 1,
      "key": "security"
    },
    {
      "doc_count": 1,
      "key": "triage"
    }
  ]
}
```

