Query OBProxy clusters

2025-03-26 07:47:21  Updated

Description

You can call this operation to query OBProxy clusters.

Call description

Prerequisite

You have passed the authentication for the OCP application service.

Request path

GET /api/v2/obproxy/clusters

Request parameters

None

Response parameters

Basic data structure

Parameter Type Description
data Object The requested data.
├─ contents Array The data array. For more information about the data structure, see the following table.
├─ page Object The page information.
successful Boolean Indicates whether the request was successful.
timestamp Datetime The timestamp when the server completed the request.
duration Integer The time taken by the server to process the request, in milliseconds.
status Integer An HTTP status code.
traceId String The trace ID of the request. This trace ID is used for troubleshooting.
server String The address of the application server that responded to the request.

Page parameters

Parameter Type Description
totalElements Integer The total number of entries.
totalPage Integer The total number of pages.
number Integer The page number of the returned page.
size Integer The number of entries returned per page.

Data structure of obproxyCluster

Parameter Type Description
id Long The ID of the OBProxy cluster.
name String The name of the OBProxy cluster.
parameterVersion Long The parameter version of the OBProxy cluster.
creatorId Long The ID of the creator.
creatorName String The name of the creator.
createTime OffsetDateTime The creation time.
updateTime OffsetDateTime The update time.
configUrl String The URL of the ConfigUrl service.
address String The IP address of the OBProxy cluster.
port Integer The access port number of the OBProxy cluster.
obLinks Array The information about connectable OceanBase clusters. For more information about the data structure, see Data structure of ObLink.
versions Array The versions of OBProxies. The number of OBProxies is counted by version. For more information about the data structure, see Data structure of VersionStatInfo.
topo Array The topology of OBProxies. The number of OBProxies is counted by IDC. For more information about the data structure, see Data structure of IdcStatInfo.
obproxies Array The list of all OBProxies in the cluster. For more information about the data structure, see Data structure of ObproxyServer.

Data structure of ObLink

Parameter Type Description
clusterId Long The ID of the cluster.
clusterName String The name of the cluster.
username String The username used to connect to the cluster.
status String The status of the cluster. Valid values: * RUNNING * UNAVAILABLE * STOPPED * CREATING * TAKINGOVER * DELETING * MOVINGOUT * RESTARTING * STARTING * STOPPING * SWITCHOVER * FAILOVER * UPGRADING * OPERATING * ABANDONED
connections Double The number of connections in the OceanBase cluster.
obClusterId Long The ID of the OceanBase cluster.
clusterType String The type of the cluster. Valid values: * PRIMARY * STANDBY

Data structure of VersionStatInfo

Parameter Type Description
version String The version information.
count Long The number of OBProxies.

Data structure of IdcStatInfo

Parameter Type Description
idcName String The name of the IDC.
count Long The number of OBProxies.

Data structure of ObproxyServer

Parameter Type Description
id Long The ID of the OBProxy server.
clusterId Long The ID of the OBProxy cluster to which the OBProxy belongs.
hostId Long The ID of the host to which the OBProxy belongs.
idcName String The name of the IDC to which the OBProxy belongs.
lastActiveTime OffsetDateTime The last active time.
parameterVersion Long The parameter version.
ip String The IP address.
sqlPort Integer The SQL port number.
exporterPort Integer The exporter port number.
version String The version of the OBProxy.
status String The status of the OBProxy. Valid values: * CREATING * RUNNING * RESTARTING * UPGRADING * REFRESHING * DELETING * UNAVAILABLE * TAKINGOVER
operateStatus String The operating status of the OBProxy. Valid values: * NORMAL * OPERATING
architecture String The hardware architecture of the host.

Examples

Sample request

GET /api/v2/obproxy/clusters?page=1&size=10

Sample response

{
        "data": {
                "contents": [{
                        "address": "xxx.xxx.xxx.xxx",
                        "configUrl": "http://xxx.xxx.xxx.xxx:8080/services?Action=GetObProxyConfig&User_ID=alibaba&UID=admin&ObproxyClusterName=test",
                        "createTime": "2021-09-01T16:52:56+08:00",
                        "creatorId": 100,
                        "creatorName": "admin",
                        "id": 1,
                        "name": "test",
                        "obLinks": [],
                        "obproxies": [{
                                "architecture": "x86_64",
                                "clusterId": 1,
                                "exporterPort": 2884,
                                "hostId": 2,
                                "id": 1,
                                "idcName": "am171",
                                "ip": "xxx.xxx.xxx.xxx",
                                "lastActiveTime": "2021-09-01T16:59:06+08:00",
                                "operateStatus": "NORMAL",
                                "parameterVersion": 3,
                                "sqlPort": 2883,
                                "status": "UNAVAILABLE",
                                "version": "1.9.1.1-1919579"
                        }],
                        "parameterVersion": 3,
                        "port": 2883,
                        "topo": [{
                                "count": 1,
                                "idcName": "am171"
                        }],
                        "updateTime": "2021-09-01T16:59:14+08:00",
                        "versions": [{
                                "count": 1,
                                "version": "1.9.1.1-1919579"
                        }],
                        "workMode": "CONFIG_URL"
                }],
                "page": {
                        "number": 1,
                        "size": 10,
                        "totalElements": 1,
                        "totalPages": 1
                }
        },
        "duration": 12,
        "server": "a83ad33525",
        "status": 200,
        "successful": true,
        "timestamp": "2021-09-03T15:59:25.606+08:00",
        "traceId": "dc06ed9d01354597"
}

Contact Us