---
title: "Deployment Logs Query"
method: GET
path: "/v1/deployment_logs/query"
tags: ["Logs & Metrics"]
---

# Deployment Logs Query

`GET /v1/deployment_logs/query`

Query deployment logs.
* Without timestamps (from/to) returns last `limit` messages (in last month).
* With `from` only, returns first `limit` messages after `from` (inclusive).
* With `to` only, returns last `limit` messages before `to` (inclusive).
* With both `from` and `to`, return the first `limit` messages after `from`, but not later than `to`.
* `from` and `to` should be no more than a month apart.

## Query parameters

- `deploy_id` string, required — the deploy id to get the logs from
- `pod_name` string, nullable — the pod name to get the logs from
- `from` string, nullable — start of period, in fractional seconds since unix epoch (inclusive)
- `to` string, nullable — end of period, in fractional seconds since unix epoch (exclusive)
- `limit` integer — how many items to return at most (default 100, in [1, 1000])

## Headers

- `xi-api-key` string, nullable
- `x-api-key` string, nullable

## Response `200`

Successful Response

- DeploymentLogQueryOut
  - `entries` object — mapping of pod names to log lines ordered by increasing timestamp

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `422` — Validation Error

---

[API](https://skmtc.net/deepinfra/apis/deepinfra-api.md) · [All operations](https://skmtc.net/deepinfra/apis/deepinfra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepinfra/deepinfra-api/versions/51b817b3f80f/schema)
