---
title: "Tail container logs (synchronous)"
method: POST
path: "/platform/deployments/{id}/logs"
tags: ["Platform"]
---

# Tail container logs (synchronous)

`POST /platform/deployments/{id}/logs`

## Request

- Base URL: `https://api.imprezahost.com/v1`
- URL: `https://api.imprezahost.com/v1/platform/deployments/{id}/logs`
- Auth: API key in header `X-API-Key` and API key in header `X-API-Secret`

Requests a chunk of container logs from the agent and waits up
to ~25 s for the agent to ship them back. Returns the
concatenated text plus a `final` flag indicating whether the
agent finished delivering.

For continuous tailing, poll this endpoint with
`since_seconds: <previous_delta>`.

## Path parameters

- `id` string, required

## Request body

- object
  - `lines` integer: How many trailing lines of container logs to ship.
  - `since_seconds` integer: When > 0, only ship logs newer than this. Overrides `lines`.

## Response `200`

Logs (may be partial if `final` is false)

## Other responses

- `401`: Invalid or missing API credentials
- `404`: Resource not found

---

[API](https://skmtc.dev/imprezahost/apis/impreza-host-public-api.md) · [All operations](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/revisions/db86511f604f?raw)
