الانتقال إلى المحتوى الرئيسي
GET
List Postgres server logs
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.

Permission

The API key must have the control-plane:postgres-service:view permission.

التفويضات

Authorization
string
header
مطلوب

Use key ID and key secret obtained in ClickHouse Cloud console: https://clickhouse.com/docs/cloud/manage/openapi

معلمات المسار

organizationId
string<uuid>
مطلوب

ID of the organization that owns the Postgres service.

postgresId
string<uuid>
مطلوب

ID of the requested Postgres service.

معلمات الاستعلام

from_date
string<date-time>
مطلوب

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

to_date
string<date-time>
مطلوب

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

body_contains
string

Case-sensitive substring the log body must contain.

severity
enum<string>

Filter to log entries with this PostgreSQL severity. Case-sensitive; an empty value applies no filter.

الخيارات المتاحة:
DEBUG,
LOG,
INFO,
NOTICE,
WARNING,
ERROR,
FATAL,
PANIC
sort_order
enum<string>
افتراضي:desc

Sort order. One of asc or desc.

الخيارات المتاحة:
asc,
desc
limit
integer
افتراضي:50

Maximum number of results to return.

النطاق المطلوب: 1 <= x <= 2000
offset
integer
افتراضي:0

Number of results to skip before returning.

النطاق المطلوب: x >= 0

الاستجابة

Successful response

status
number

HTTP status code.

مثال:

200

requestId
string<uuid>

Unique id assigned to every request. UUIDv4

result
object[]