Skip to main content

Container Log

The /detail/:cluster/container/:containerName/logs endpoint of the Dashium API allows you to retrieve logs from a specific Docker container. Use this route to fetch the logs of the container by specifying the cluster and container name.

Endpoint​

  • Path: /detail/:cluster/container/:containerName/logs
  • Method: GET
  • Parameters:
    • :cluster (Docker cluster identifier)
    • :containerName (Docker container name)

Request Parameters​

The route accepts the following query parameters:

  • follow (boolean, optional): Determines if log streaming should be followed in real time. By default, set to false.
  • stdout (boolean, optional): Includes logs from standard output. By default, set to true.
  • stderr (boolean, optional): Includes logs from standard error. By default, set to true.
  • timestamps (boolean, optional): Includes timestamps in the logs. By default, set to false.
  • tail (number or "all", optional): Limits the number of lines to display from the end of the logs. The value "all" displays all logs.

Response​

The response is a JSON object containing the container name and the obtained logs.

{
"Name": "container_name",
"logs": "container_logs"
}

Upon success, you will receive the logs from the specified Docker container.