Container

Get container logs

Get stdout and stderr logs from a container.

Note: This endpoint works only for containers with the json-file or journald logging driver.

get/containers/{id}/logs

Request

  • Base URL
    /v1.24 (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    none declared

Path parameters

idstring required

ID or name of the container

Query parameters

followboolean

Return the logs as a stream.

stdoutboolean

Return logs from stdout

stderrboolean

Return logs from stderr

sinceinteger

Only return logs since this time, as a UNIX timestamp

untilinteger

Only return logs before this time, as a UNIX timestamp

timestampsboolean

Add timestamps to every log line

tailstring

Only return this number of log lines from the end of the logs. Specify as an integer or all to output all log lines.

Response

logs returned as a string in response body

string required

Changes

No recorded changes to this operation across all 69 revisions of this API.