POST /api/workflows/workflow/{id}/run

Spaces method and path for this operation:

post /s/{space_id}/api/workflows/workflow/{id}/run

Refer to Spaces for more information.

Execute a workflow by its ID with the provided inputs. The workflow must be enabled and have a valid definition. Returns an execution ID that can be used to monitor progress.

[Required authorization] Route required privileges: workflowsManagement:execute AND workflowsManagement:read.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • id string Required

    Workflow ID

application/json

Body

  • inputs object Required

    Key-value inputs for the workflow execution.

    Additional properties are allowed.

  • metadata object

    Optional metadata for the execution.

    Additional properties are allowed.

Responses

  • 200 application/json

    Indicates a successful response

POST /api/workflows/workflow/{id}/run
curl \
  -X POST "${KIBANA_URL}/api/workflows/workflow/{id}/run" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": {
      "message": "hello from the API"
    }
  }'
POST kbn://api/workflows/workflow/{id}/run
{
  "inputs": {
    "message": "hello from the API"
  }
}
Request example
Example request to execute a workflow with inputs
{
  "inputs": {
    "message": "hello from the API"
  }
}
Response examples (200)
Example response returning the execution ID
{
  "workflowExecutionId": "exec-a1b2c3d4-e5f6-7890"
}