Skip to main content

PostgreSQL pooling

All paths below use https://api.lordbase.com. Read conventions for headers, authentication, pagination and error handling. Values in responses are illustrative; examples show selected fields, not fixed quotas or service guarantees.

Developer tokens authorize only explicitly supported operations. Required scopes appear below; account, billing and token-management operations require a dashboard session. See token permissions.

Inspect PostgreSQL pooling — GET​

GET /e/v1/developer/databases/{database_id}/pooling/

Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with read_databases (or api). Resource roles and quotas still apply.

Request and permissions: Workspace member; no body. PostgreSQL only. HTTP 200 can report available:false; inspect the body. When available, the body includes database, pool_mode, connections (client/server state counts and totals), statistics (transaction/query counts, received/sent bytes and average times in microseconds), and pools (deployment-specific pool rows).

Required path parameters: database_id (UUID).

Response: 200

{
"database_id": "11111111-1111-4111-8111-111111111111",
"database_name": "Example PostgreSQL",
"pooling_enabled": false,
"available": false,
"message": "Connection pooling service is not available"
}

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.

List pooling clients — GET​

GET /e/v1/developer/databases/{database_id}/pooling/clients/

Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with read_databases (or api). Resource roles and quotas still apply.

Request and permissions: Workspace member; PostgreSQL only; no body. Lists current connections; empty results alone do not prove service health.

Required path parameters: database_id (UUID).

Response: 200

{
"database_id": "11111111-1111-4111-8111-111111111111",
"clients": [
{
"user": "lb_example_app",
"database": "lb_example",
"state": "active",
"addr": "203.0.113.10",
"port": 54321,
"connect_time": "2026-10-27 12:00:00 UTC",
"request_time": "2026-10-27 12:00:01 UTC"
}
],
"count": 1
}

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.

List pooling servers — GET​

GET /e/v1/developer/databases/{database_id}/pooling/servers/

Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with read_databases (or api). Resource roles and quotas still apply.

Request and permissions: Workspace member; PostgreSQL only; no body. Lists current connections; empty results alone do not prove service health.

Required path parameters: database_id (UUID).

Response: 200

{
"database_id": "11111111-1111-4111-8111-111111111111",
"servers": [
{
"user": "lb_example_app",
"database": "lb_example",
"state": "active",
"addr": "203.0.113.10",
"port": 54321,
"connect_time": "2026-10-27 12:00:00 UTC"
}
],
"count": 1
}

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.

Check pooling service availability — GET​

GET /e/v1/pooling/health/

Authentication: Dashboard session required; developer tokens are denied, including api tokens.

Request and permissions: Authentication required despite being a service-status endpoint. No body. Checks pooling availability, not database-specific credentials.

Response: 200

{
"service": "pgbouncer",
"available": true,
"status": "healthy"
}

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.