Cloady Docs
API ReferenceEndpointsApplications

Read a database's connections and long-running sessions

Returns connections grouped by client, each mapped to the compose service it comes from where its address is a pod of the app, and the sessions running or holding a transaction for five seconds or more, waiting on a lock or blocking another, with their query text. Needs the developer role. Sending `Accept: text/event-stream` instead follows it live, a frame every five seconds.

GET
/api/workspaces/{workspaceSlug}/apps/{appSlug}/services/{serviceName}/engine/sessions
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 GET "https://example.com/api/workspaces/string/apps/string/services/string/engine/sessions"
{  "ts": 0,  "engine": "postgres",  "total": 0,  "clients": [    {      "name": "string",      "service": "string",      "count": 0,      "active": 0,      "idleInTransaction": 0    }  ],  "sessions": [    {      "id": "string",      "client": "string",      "service": "string",      "user": "string",      "database": "string",      "address": "string",      "state": "active",      "wait": "string",      "ageSeconds": 0,      "query": "string",      "blocking": 0,      "blockedBy": [        "string"      ]    }  ]}