---
title: "Logs of the containers"
method: POST
path: "/troubleshoot/containers"
tags: ["logs"]
---

# Logs of the containers

`POST /troubleshoot/containers`

Will return the logs of the containers specified in the request, or all the containers if none are specified.

## Request body

- PkgLogsRequest
  - `containers` string[] — Containers ids to show logs from, default is all
  - `since` string — Show logs since (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
  - `tail` string — Number of lines to show from the end, default is all
  - `timestamps` boolean — Show timestamps, default is false
  - `until` string — Show logs until(e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)

## Response `200`

Containers logs

- PkgLogsResponse
  - `containers` PkgContainerLogs[]
    - `Id` string
    - `command` string
    - `created` integer
    - `hostConfig` object
      - `annotations` object
      - `networkMode` string
    - `image` string
    - `imageID` string
    - `labels` object
    - `logs` string[] — Logs from the container
    - `mounts` TypesMountPoint[]
      - `destination` string — Destination is the path relative to the container root (`/`) where the Source is mounted inside the container.
      - `driver` string — Driver is the volume driver used to create the volume (if it is a volume).
      - `mode` string — Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`"z"` on Linux, empty on Windows).
      - `name` string — Name is the name reference to the underlying data defined by `Source` e.g., the volume name.
      - `propagation` 'rprivate' | 'private' | 'rshared' | 'shared' | 'rslave' | 'slave'
      - `rw` boolean — RW indicates whether the mount is mounted writable (read-write).
      - `source` string — Source is the source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty.
      - `type` 'bind' | 'volume' | 'tmpfs' | 'npipe' | 'cluster'
    - `names` string[]
    - `networkSettings` TypesSummaryNetworkSettings
      - `networks` object
    - `ports` TypesPort[]
      - `IP` string — Host IP address that the container's port is mapped to
      - `PrivatePort` integer — Port on the container Required: true
      - `PublicPort` integer — Port exposed on the host
      - `Type` string — type Required: true
    - `sizeRootFs` integer
    - `sizeRw` integer
    - `state` string
    - `status` string

## Other responses

- `400` — Bad request with explanation
- `500` — Internal server error with explanation

---

[API](https://skmtc.net/stamusnetworks/apis/swagger-stamusd-api.md) · [All operations](https://skmtc.net/stamusnetworks/apis/swagger-stamusd-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stamusnetworks/swagger-stamusd-api/revisions/c90a51d85d80/schema)
