v52
latestOpenAPI 3.0.3GNU Affero General Public License v3.0 (AGPL-3.0)raw.githubusercontent.com2026-08-0113040156.8 KBPostgres Database
Get PostgreSQL database logs
get/project/{project_id}/location/{location}/postgres/{postgres_database_reference}/logs
Query parameters
startstring
Example:2025-05-12T11:27:24+00:00
Start time for log query (rfc3339 format, default 30 minutes ago)
endstring
Example:2025-05-12T11:57:24+00:00
End time for log query (rfc3339 format, default now)
stream_name'postgres' | 'pgbouncer' | 'upgrade'
Example:postgres
Filter by log stream (postgres, pgbouncer, or upgrade)
severity_level'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'FATAL'
Example:INFO
Filter by log severity level
server_role'primary' | 'standby'
Example:primary
Filter by server role (primary or standby)
query_patternstring
Pattern for substring match against log message body
max_log_linesinteger
Number of log lines to return (default 50, max 500)
pagination_keystring
Pagination key returned from a previous response
Response
Log entries for a Postgres Database