/v1.33/tasks/{id}/logsGet `stdout` and `stderr` logs from a task. **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
ID of the task
Show task context and extra details provided to logs.
Return the logs as a stream. This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
Return logs from `stdout`
Return logs from `stderr`
Only return logs since this time, as a UNIX timestamp
Add timestamps to every log line
Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request GET \2 --url '/v1.33/tasks/{id}/logs' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}/v1.33/tasks/{id}/logsGet `stdout` and `stderr` logs from a task. **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
ID of the task
Show task context and extra details provided to logs.
Return the logs as a stream. This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
Return logs from `stdout`
Return logs from `stderr`
Only return logs since this time, as a UNIX timestamp
Add timestamps to every log line
Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request GET \2 --url '/v1.33/tasks/{id}/logs' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}