Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

List Postgres server logs

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

This endpoint is in beta. API contract is stable, and no breaking changes are expected in the future.

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.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the organization that owns the Postgres service.

    format: uuid
  • postgresIdstringrequired

    ID of the requested Postgres service.

    format: uuid

Query parameters

  • from_datestringrequired

    Inclusive start of the time window (RFC 3339 date-time).

    format: date-time
  • to_datestringrequired

    Inclusive end of the time window (RFC 3339 date-time).

    format: date-time
  • body_containsoptionalstring

    Case-sensitive substring the log body must contain.

  • severityoptionalstring

    Filter to log entries with this PostgreSQL severity (for example, ERROR, WARNING, LOG).

  • sort_orderoptionalascordesc

    Sort order. One of asc or desc.

    Default: "desc"
  • limitoptionalinteger

    Maximum number of results to return.

    maximum: 2000, minimum: 1
    Default: 50
  • offsetoptionalinteger

    Number of results to skip before returning.

    minimum: 0
    Default: 0

Response

JSON

200

Successful response

JSON
  • statusoptionalnumber

    HTTP status code.

    Example: 200
  • requestIdoptionalstring

    Unique id assigned to every request. UUIDv4

    format: uuid
  • resultoptionalarray ofobject
    3 properties
    • timestampstringrequired

      Time the entry was logged (RFC 3339).

      format: date-time
    • severitystringrequired

      PostgreSQL severity of the entry (for example, LOG, WARNING, ERROR, FATAL, PANIC).

    • bodystringrequired

      Raw log entry body as emitted by PostgreSQL. Structured bodies are returned as a JSON-encoded string.

Navigation