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

# Get workflows by IDs

Availability: Generally available since 9.4

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

## Paths

- `POST` `/api/workflows/mget`
- `POST` `/s/{space_id}/api/workflows/mget`

## Description

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

Retrieve multiple workflows by their IDs in a single request. Optionally use the `source` parameter to return only specific fields from each workflow document.

## Required authorization

- Privileges: `workflowsManagement:read` or `workflowsManagement:managed:read`

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `ids` (string[] · min items: 1 · max items: 500) — required
  Array of workflow IDs to look up.
- `source` (string[] · min items: 1 · max items: 10) — optional
  Array of source fields to include.

## Response

Indicates a successful response

`application/json`

## Code examples

#### Console

```console
POST kbn://api/workflows/mget
{
  "ids": ["workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "workflow-b2c3d4e5-f6a7-8901-bcde-f12345678901"],
  "source": ["name", "enabled"]
}
```

#### curl

```curl
curl \
  -X POST "${KIBANA_URL}/api/workflows/mget" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": ["workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "workflow-b2c3d4e5-f6a7-8901-bcde-f12345678901"],
    "source": ["name", "enabled"]
  }'
```

## Response examples

#### Mget workflows response

Example response returning the requested workflows with projected fields

```json
[
  {
    "enabled": true,
    "id": "workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Example definition"
  },
  {
    "enabled": false,
    "id": "workflow-b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "Second workflow"
  }
]
```

