GET /api/workflows/aggs

Spaces method and path for this operation:

get /s/{space_id}/api/workflows/aggs

Refer to Spaces for more information.

Retrieve distinct values and their counts for the specified workflow fields. Useful for building filters such as lists of tags or creators.

[Required authorization] Route required privileges: workflowsManagement:read.

Query parameters

  • fields array[string] Required

    Fields to aggregate on.

    Not more than 25 elements.

Responses

  • 200 application/json

    Indicates a successful response

GET /api/workflows/aggs
curl \
  -X GET "${KIBANA_URL}/api/workflows/aggs?fields=tags&fields=createdBy" \
  -H "Authorization: ApiKey ${API_KEY}"
GET kbn://api/workflows/aggs?fields=tags&fields=createdBy
Response examples (200)
Example response with tag and createdBy aggregations
{
  "tags": [
    {
      "key": "reporting",
      "doc_count": 1
    },
    {
      "key": "security",
      "doc_count": 1
    },
    {
      "key": "triage",
      "doc_count": 1
    }
  ],
  "createdBy": [
    {
      "key": "elastic",
      "doc_count": 2
    }
  ]
}