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

# Get workflows

Availability: 9.4+

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

## Paths

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

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

## Description

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

Retrieve a paginated list of workflows with optional filtering.<br/><br/>[Required authorization] Route required privileges: workflowsManagement:read. Extended privileges (optional, expand functionality when granted): workflowsManagement:managed:read, workflowsManagement:readExecution, workflowsManagement:managed:readExecution.

## Query String Parameters

- `query` (string)
  Free-text search query.
- `size` (number · min: 1)
  Number of results per page.
- `page` (number · min: 1)
  Page number.
- `enabled` ([] boolean · max: 2)
  Filter by enabled state.
- `createdBy` ([] string · max: 1000)
  Filter by creator.
- `tags` ([] string · max: 1000)
  Filter by tags.
- `managed` (enum)
  Filter by managed status. Defaults to "unmanaged".
  Values: `all`, `managed`, `unmanaged`
- `visibilityContext` ([] string · max: 1000)
  When managed workflows are included, only return managed workflows visible in these contexts.
- `sortField` (enum)
  Field to sort by.
  Values: `name`, `enabled`
- `sortOrder` (enum)
  Sort direction.
  Values: `asc`, `desc`

## Response

Indicates a successful response

## Code Examples

#### Console

```console
GET kbn://api/workflows?size=20&page=1&sortField=name&sortOrder=asc
```

#### curl

```curl
curl \
  -X GET "${KIBANA_URL}/api/workflows?size=20&page=1&sortField=name&sortOrder=asc" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response Examples

#### Get workflows response

Example response returning a paginated list of workflows

```json
{
  "page": 1,
  "results": [
    {
      "createdAt": "2025-11-20T10:30:00.000Z",
      "definition": {
        "description": "This is a workflow example",
        "enabled": true,
        "inputs": [
          {
            "default": "hello world",
            "name": "message",
            "type": "string"
          }
        ],
        "name": "Example definition",
        "steps": [
          {
            "name": "hello_world_step",
            "type": "console",
            "with": {
              "message": "{{ inputs.message }}"
            }
          }
        ],
        "triggers": [
          {
            "type": "manual"
          }
        ]
      },
      "description": "This is a workflow example",
      "enabled": true,
      "history": [
        {
          "duration": 5000,
          "finishedAt": "2025-11-20T12:00:05.000Z",
          "id": "exec-001",
          "startedAt": "2025-11-20T12:00:00.000Z",
          "status": "completed",
          "workflowId": "workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "workflowName": "Example definition"
        }
      ],
      "id": "workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Example definition",
      "tags": [
        "example"
      ],
      "valid": true
    }
  ],
  "size": 20,
  "total": 1
}
```

