v1

latestOpenAPI 3.0.32026-07-17485661.9 KB

Get database logs

Fetch logs for a specific database. Returns up to 500 log entries in reverse chronological order. Supports cursor-based pagination via the cursor parameter and the last_cursor field in the response.

get/spaces/{space_id}/databases/{database_ref}/logs

Path parameters

space_idstring required

Ghost space ID.

database_refstring required

Database ID or name.

Query parameters

cursorstring

Opaque pagination cursor returned as last_cursor in a previous response. When provided, returns the next page of logs older than the cursor position.

untilstring date-time

Upper bound timestamp — return logs at or before this time (RFC3339 format, e.g., 2024-01-15T10:00:00Z). Defaults to now.

sincestring date-time

Lower bound timestamp — fetch logs after this time (RFC3339 format, e.g., 2024-01-15T09:00:00Z)

searchstring[]

Full-text search terms to filter log lines. Repeat the parameter for multiple values (e.g. ?search=slow+query&search=ERROR).

severitystring[]

Severity levels to filter results. Repeat the parameter for multiple values (e.g. ?severity=ERROR&severity=WARNING). Common values include LOG, WARNING, ERROR, and FATAL; PostgreSQL may also emit DEBUG*, INFO, NOTICE, and PANIC.

Response

Database logs

last_cursorstring

Opaque cursor for the next page of results. Present when more log entries exist older than the last entry in this response. Pass this value as the cursor query parameter to retrieve the next page. Absent when there are no further results.