Cloady Docs
API ReferenceEndpointsApplications

Turn on a database's statement statistics and slow log

Turns on what streamEngineStats lists as off. Postgres: adds pg_stat_statements to shared_preload_libraries and restarts the service, then creates the extension in the `postgres` database on a second call, and logs statements slower than 250 ms with lock waits, through ALTER SYSTEM. MySQL and MariaDB: the statement history consumer and deadlock printing at runtime, and on MariaDB user statistics. Never resets any counter.

POST
/api/workspaces/{workspaceSlug}/apps/{appSlug}/services/{serviceName}/engine/insights
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
appSlug*string
serviceName*string

Query Parameters

env?string

Value in

  • "production"
  • "preview"
  • "development"
region?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/workspaces/string/apps/string/services/string/engine/insights"
{  "applied": [    "string"  ],  "restarted": true,  "insights": {    "statements": "on",    "slowLog": "on",    "slowLogMs": 0,    "enable": "none",    "note": "string"  }}