Query Insights

List slow queries

Returns the slowest statements for the instance database from pg_stat_statements, ordered by the selected metric, with query text redacted of literals. Read-only (each call runs in a READ ONLY transaction with statement and lock timeouts). Requires the host to have query insights enabled (pg_stat_statements preloaded); otherwise the endpoint returns HTTP 409 and the body carries a machine-readable reason.

Key Parameters:

  • id: The instance whose database to inspect
  • sort: Which metric to order by
  • limit: How many rows to return
get/instances/{id}/slow-queries

Request

  • Base URL: https://api.cloudpepper.io
  • URL: https://api.cloudpepper.io/instances/{id}/slow-queries
  • Auth: HTTP bearer

Response

Slow queries retrieved successfully

object required

Changes

No recorded changes to this operation across all 1 revision of this API.