---
title: "Get container logs"
method: GET
path: "/containers/{id}/logs"
tags: ["Container"]
---

# Get container logs

`GET /containers/{id}/logs`

Get `stdout` and `stderr` logs from a container.

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

## Path parameters

- `id` string, required

## Query parameters

- `follow` boolean
- `stdout` boolean
- `stderr` boolean
- `since` integer
- `until` integer
- `timestamps` boolean
- `tail` string

## Response `200`

logs returned as a string in response body

- string

## Other responses

- `101` — logs returned as a stream
- `400` — bad parameter
- `404` — An unexpected 404 error occurred.
- `500` — An unexpected server error occurred.

---

[API](https://skmtc.dev/aliyun/apis/pouch-engine-api.md) · [All operations](https://skmtc.dev/aliyun/apis/pouch-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aliyun/pouch-engine-api/revisions/36d75b2825fc/schema)
