---
title: "Test a workflow step"
method: POST
path: "/api/workflows/step/test"
tags: ["workflows"]
---

# Test a workflow step

`POST /api/workflows/step/test`

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/workflows/step/test</span></div>

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

Execute a single step from a workflow definition in test mode.<br/><br/>[Required authorization] Route required privileges: workflowsManagement:execute AND workflowsManagement:read.

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `contextOverride` object, required — Context overrides for the step execution.
  - `executionContext` object — Execution context for the step execution.
  - `stepId` string, required — ID of the step to test.
  - `workflowId` string — ID of the workflow containing the step.
  - `workflowYaml` string, required — YAML definition of the workflow containing the step.

## Response `200`

Indicates a successful response

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
