Log Task Execution
Endpoint: POST /api/tasks/{taskId}/log
Logs messages or additional details to a specific task execution.
You can log messages at any point in the task lifecycle, regardless of whether the task is scheduled, in progress, completed, or failed.
Path parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
taskId | The execution ID of the task to log the message. | string | Required. |
Request body
Format the request to include the details to be logged for the task.
Example
{ "message": "Log this message to the task" }
Response
Returns 200 OK, indicating that the message has been logged to the task execution.
Examples
Log messages to a task execution
Request
curl -X 'POST' \
'https://<YOUR-CLUSTER>/api/tasks/fd7s681d9196-6617-11f0-a1be-1a45f573e878/log' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{"message": "Log this message to the task"}'
Response
Returns 200 OK, indicating that the message has been logged to the task execution.
To verify the logs, open your workflow execution, select the task where the message was logged using the API, and select the Logs tab to view the message logged.