Skip to content

Get service logs

GET/projects/{project_id}/services/{service_id}/logs

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

Use the returned lastCursor value as the cursor parameter on subsequent requests to page through all available logs.

Path ParametersExpand Collapse
project_id: string
service_id: string
Query ParametersExpand Collapse
cursor: optional string

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

node: optional number

Specific service node to fetch logs from (for multi-node services).

minimum0
severities: optional array of string

Severity levels to filter results. Repeat the parameter for multiple values (e.g. ?severities=ERROR&severities=WARNING).

since: optional string

Lower bound timestamp — fetch logs after this time (RFC3339 format).

formatdate-time
until: optional string

Upper bound timestamp — fetch logs before this time (RFC3339 format, e.g., 2024-01-15T10:00:00Z).

formatdate-time
ReturnsExpand Collapse
logs: array of string

Array of log message strings. Preserved for backwards compatibility.

entries: optional array of object { message, severity, timestamp }

Structured log entries with timestamp and severity metadata. Entries are in the same order as logs and can be used in place of it by callers that need structured data.

message: string

Log message text.

severity: string

PostgreSQL severity level (e.g. LOG, WARNING, ERROR, FATAL).

timestamp: string

Timestamp of the log entry (RFC3339 format).

formatdate-time
lastCursor: optional 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.

Get service logs

curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/logs \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
{
  "logs": [
    "string"
  ],
  "entries": [
    {
      "message": "database system is ready to accept connections",
      "severity": "LOG",
      "timestamp": "2025-01-15T09:30:00Z"
    }
  ],
  "lastCursor": "eyJ0cyI6IjIwMjUtMDEtMTVUMDk6MzA6MDBaIn0="
}
Returns Examples
{
  "logs": [
    "string"
  ],
  "entries": [
    {
      "message": "database system is ready to accept connections",
      "severity": "LOG",
      "timestamp": "2025-01-15T09:30:00Z"
    }
  ],
  "lastCursor": "eyJ0cyI6IjIwMjUtMDEtMTVUMDk6MzA6MDBaIn0="
}