---
type: api
title: Get workflow JSON schema
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-schema
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-workflows-schema
products:
  - Kibana
---

# Get workflow JSON schema

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

## Paths

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

## Description

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

Retrieve the JSON schema used to validate workflow YAML definitions. The schema includes available step types based on the configured connectors in the current space.

## Required authorization

- Privileges: `workflowsManagement:read`

## 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).

## Query string parameters

- `loose` (boolean) — required
  When true, returns a permissive schema that allows additional properties. When false, returns a strict schema for full validation.

## Response

Indicates a successful response

`application/json`

## Code examples

#### Console

```console
GET kbn://api/workflows/schema?loose=false
```

#### curl

```curl
curl \
  -X GET "${KIBANA_URL}/api/workflows/schema?loose=false" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Get schema response

Example response returning the workflow JSON schema (truncated)

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "description": {
      "type": "string"
    },
    "enabled": {
      "default": true,
      "type": "boolean"
    },
    "name": {
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "version": {
      "const": "1",
      "default": "1",
      "description": "The version of the workflow schema",
      "type": "string"
    }
  },
  "required": [
    "name",
    "triggers",
    "steps"
  ]
}
```

