---
title: "Get database logs"
method: GET
path: "/spaces/{space_id}/databases/{database_ref}/logs"
---

# Get database logs

`GET /spaces/{space_id}/databases/{database_ref}/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.

## Path parameters

- `space_id` string, required
- `database_ref` string, required

## Query parameters

- `cursor` string
- `until` string, date-time
- `since` string, date-time
- `search` string[]
- `severity` string[]

## Response `200`

Database logs

- LogsResponse — A page of database log entries.
  - `entries` LogEntry[], required — Log entries, most recent first.
    - `timestamp` string, date-time, required — Timestamp of the log entry (RFC3339 format, with nanosecond precision)
    - `message` string, required — Log message text
    - `severity` string, required — PostgreSQL severity level (e.g. LOG, WARNING, ERROR, FATAL)
  - `last_cursor` string — 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.

## Other responses

- `default` — Error response

## Changes

> 21 revisions in range; 15 could not be searched.

- **2026-04-17** `a7becb6668ec` — 1 breaking, 6 warning, 2 info
  - removed the required property `entries` from the response with the `200` status
  - deleted the `query` request parameter `cursor`
  - deleted the `query` request parameter `search`
  - deleted the `query` request parameter `severity`
  - …5 more

[Change history](https://skmtc.dev/timescale/apis/ghost-api/changes/spaces/:space_id/databases/:database_ref/logs/get.md)

---

[API](https://skmtc.dev/timescale/apis/ghost-api.md) · [All operations](https://skmtc.dev/timescale/apis/ghost-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/timescale/ghost-api/revisions/42816b90d8d6/schema)
