database

List sessions

Returns a list of current sessions details for your Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}.

get/1.3/database/{uuid}/sessions

Request

  • Base URL: https://api.upcloud.com
  • URL: https://api.upcloud.com/1.3/database/{uuid}/sessions
  • Auth: HTTP bearer

Path parameters

uuidstring uuid required

The unique identifier for the integration.

Example:01234567-89ab-cdef-0123-456789abcdef

Service UUID

Query parameters

limitinteger

Schema for a query parameter specifying the maximum number of entries to return (limit).

Example:10

Number of entries to receive at most.

offsetinteger

Schema for a query parameter specifying the offset for pagination.

Offset for retrieved results.

orderstring

Schema for a query parameter specifying the order.

Example:asc

Sort order

Response

OK

Example response

{
  "pg": [
    {
      "application_name": "client 1.5.14",
      "backend_start": "2025-09-21T12:34:56Z",
      "backend_type": "client backend",
      "backend_xid": 742,
      "backend_xmin": 731,
      "client_addr": "198.51.100.42",
      "client_hostname": "app-host.example.internal",
      "client_port": 52344,
      "datid": 16384,
      "datname": "defaultdb",
      "id": "3328089",
      "query": "SELECT name, setting FROM pg_settings WHERE source = $1",
      "query_duration": "00:00:01.234",
      "query_start": "2025-09-21T12:35:10Z",
      "state": "active",
      "state_change": "2025-09-21T12:35:10Z",
      "usename": "upadmin",
      "usesysid": 10,
      "wait_event": "ClientRead",
      "wait_event_type": "Client",
      "xact_start": "2025-09-21T12:35:05Z"
    }
  ],
  "mysql": [
    {
      "application_name": "my-app",
      "client_addr": "198.51.100.23",
      "datname": "defaultdb",
      "id": "3159",
      "query": "SELECT 1",
      "query_duration": 125000000,
      "state": "active",
      "usename": "appuser"
    }
  ],
  "redis": [
    {
      "active_channel_subscriptions": 2,
      "active_database": "0",
      "active_pattern_matching_channel_subscriptions": 1,
      "application_name": "my-app",
      "client_addr": "[fff0:fff0:fff0:fff0:0:fff0:fff0:fff0]:39956",
      "connection_age": 2079483000000000,
      "connection_idle": 3000000000,
      "flags": [
        "N",
        "U"
      ],
      "flags_raw": "NU",
      "id": "15",
      "multi_exec_commands": -1,
      "output_buffer": 0,
      "output_buffer_memory": 0,
      "output_list_length": 0,
      "query": "info",
      "query_buffer": 0,
      "query_buffer_free": 0
    }
  ],
  "valkey": [
    {
      "active_channel_subscriptions": 2,
      "active_database": "0",
      "active_pattern_matching_channel_subscriptions": 1,
      "application_name": "my-app",
      "client_addr": "[fff0:fff0:fff0:fff0:0:fff0:fff0:fff0]:39956",
      "connection_age": 2079483000000000,
      "connection_idle": 3000000000,
      "flags": [
        "N",
        "U"
      ],
      "flags_raw": "NU",
      "id": "15",
      "multi_exec_commands": -1,
      "output_buffer": 0,
      "output_buffer_memory": 0,
      "output_list_length": 0,
      "query": "info",
      "query_buffer": 0,
      "query_buffer_free": 0
    }
  ]
}

Changes

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