---
title: "List Postgres server logs"
method: GET
path: "/v1/organizations/{organizationId}/postgres/{postgresId}/logs"
tags: ["Postgres"]
---

# List Postgres server logs

`GET /v1/organizations/{organizationId}/postgres/{postgresId}/logs`

## Request

- Base URL: `https://api.clickhouse.cloud`
- URL: `https://api.clickhouse.cloud/v1/organizations/{organizationId}/postgres/{postgresId}/logs`
- Auth: HTTP basic

Returns PostgreSQL server log entries for a Postgres service within the given time window, most recent first by default (override with `sort_order`). Results are paginated with `limit`/`offset`; advance `offset` until a page returns fewer than `limit` entries to read the full window. The time range must not exceed 30 days, and `to_date` must be after `from_date`.

## Path parameters

- `organizationId` string, uuid, required
- `postgresId` string, uuid, required

## Query parameters

- `from_date` string, date-time, required
- `to_date` string, date-time, required
- `body_contains` string
- `severity` 'DEBUG' | 'LOG' | 'INFO' | 'NOTICE' | 'WARNING' | 'ERROR' | 'FATAL' | 'PANIC'
- `sort_order` 'asc' | 'desc'
- `limit` integer
- `offset` integer

## Response `200`

Successful response

- object
  - `status` number: HTTP status code.
  - `requestId` string, uuid: Unique id assigned to every request. UUIDv4
  - `result` PostgresLogEntry[]: List of results.
    - `timestamp` string, date-time, required: Time the entry was logged (RFC 3339).
    - `severity` string, required: PostgreSQL severity of the entry (for example, LOG, WARNING, ERROR, FATAL, PANIC).
    - `body` string, required: Raw log entry body as emitted by PostgreSQL. Structured bodies are returned as a JSON-encoded string.

## Other responses

- `400`: The request cannot be processed due to a client error. Please verify your request parameters and try again.
- `500`: An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.

## Changes

- **2026-11-04** `63a9108321ca`: 1 breaking, 8 info
  - the `query` request parameter `severity` was restricted to a list of enum values
  - added the new enum value `DEBUG` to the `query` request parameter `severity`
  - added the new enum value `ERROR` to the `query` request parameter `severity`
  - added the new enum value `FATAL` to the `query` request parameter `severity`
  - …5 more

[Operation history](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/changes/v1/organizations/:organizationId/postgres/:postgresId/logs/get.md)

---

[API](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud.md) - [All operations](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/revisions/eac345053548?raw)
