Updated on 2026-05-30 GMT+08:00

Querying Physical Sessions (a V3 API)

Function

This API is used to obtain physical sessions of a DDM instance.

Constraints

None

URI

  • URL format

    GET /v3/{project_id}/instances/{instance_id}/physical-processes?offset={offset}&limit={limit}

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID of a tenant in a region

    To obtain this value, see Obtaining a Project ID.

    instance_id

    Yes

    String

    ID of the associated RDS DB instance.

    Table 2 Query parameters

    Parameter

    Mandatory

    Type

    Description

    offset

    No

    Integer

    Index offset.

    The query starts from the next piece of data indexed by this parameter. The value is 0 by default.

    The value must be a non-negative number.

    limit

    No

    Integer

    Maximum records to be queried.

    Value range: 1 to 128.

    If the parameter value is not specified, 10 records are obtained by default.

    keyword

    No

    String

    Keyword filtered by the session result. It is a fuzzy match field and can contain a maximum of 255 characters.

Request

  • Request Parameters

    None

  • URI example
    GET https://{endpoint}/v3/{project_id}/instances/{instance_id}/physical-processes?offset=0&limit=10

Response

  • Normal response
    Table 3 Response body parameters

    Parameter

    Type

    Description

    total_count

    Integer

    Total records.

    physical_processes

    Array of Table 4 objects

    Physical session list of a DDM instance.

    Table 4 PhysicalProcessInfo

    Parameter

    Type

    Description

    id

    Long

    Physical session ID.

    user

    String

    Current user.

    host

    String

    IP address and port number.

    db

    String

    Database name.

    command

    String

    Connection status. Generally, the value can be sleep, query, or connect.

    time

    Long

    Duration of a connection, in seconds.

    state

    String

    Status of the SQL statement being executed.

    info

    String

    SQL statement that is being executed.

    trx_executed_time

    Long

    Duration of a transaction, in seconds.

  • Normal response example
    {
      "physical_processes": [
        {
          "id": 1973,
          "user": "DDMRW1613058863",
          "host": "172.16.241.84:58908",
          "db": "ddm_db_test_0001",
          "state": "",
          "command": "Sleep",
          "info": null,
          "time": 13977,
          "trx_executed_time": 0
        }
      ],
      "total_count": 1
    }

Status Code

Error Codes

For details, see Error Codes.