Spaces method and path for this operation:
post /s/{space_id}/api/workflows/step/test
Refer to Spaces for more information.
Execute a single step from a workflow definition in test mode.
[Required authorization] Route required privileges: workflowsManagement:execute AND workflowsManagement:read.
POST
/api/workflows/step/test
curl
curl \
-X POST "${KIBANA_URL}/api/workflows/step/test" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{
"stepId": "hello_world_step",
"workflowId": "workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"workflowYaml": "name: Example definition\nenabled: true\ntriggers:\n - type: manual\ninputs:\n - name: message\n type: string\n default: \"hello world\"\nsteps:\n - name: hello_world_step\n type: console\n with:\n message: \"{{ inputs.message }}\"",
"contextOverride": { "inputs": { "message": "override message" } }
}'
POST kbn://api/workflows/step/test
{
"stepId": "hello_world_step",
"workflowId": "workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"workflowYaml": "name: Example definition\nenabled: true\ntriggers:\n - type: manual\ninputs:\n - name: message\n type: string\n default: \"hello world\"\nsteps:\n - name: hello_world_step\n type: console\n with:\n message: \"{{ inputs.message }}\"",
"contextOverride": { "inputs": { "message": "override message" } }
}
Request example
Example request to test a single workflow step
{
"stepId": "hello_world_step",
"workflowId": "workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"workflowYaml": "name: Example definition\nenabled: true\ndescription: This is a workflow example\ntriggers:\n - type: manual\ninputs:\n - name: message\n type: string\n default: \"hello world\"\nsteps:\n - name: hello_world_step\n type: console\n with:\n message: \"{{ inputs.message }}\"\n",
"contextOverride": {
"inputs": {
"message": "override message"
}
}
}
Response examples (200)
Example response returning the step test execution ID
{
"workflowExecutionId": "step-test-exec-a1b2c3d4"
}