Container logs

Retrieve logs from a Docker container on your server.


GET/api/servers/{server}/docker/containers/{container}/logs

Get container logs

This endpoint allows you to retrieve logs from a specific Docker container.

Optional parameters

  • Name
    lines
    Type
    integer
    Description

    Number of log lines to retrieve. Default: 50.

Request

GET
/api/servers/{server}/docker/containers/{container}/logs
curl -X GET "https://ploi.io/api/servers/{server}/docker/containers/{container}/logs?lines=100" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "content": "web-1  | 172.17.0.1 - - [01/Apr/2025:10:35:00 +0000] \"GET / HTTP/1.1\" 200 615 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15\"\nweb-1  | 172.17.0.1 - - [01/Apr/2025:10:35:02 +0000] \"GET /favicon.ico HTTP/1.1\" 404 555 \"http://localhost:8080/\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15\""
}