Description
The interface used to query the list of OceanBase Proxy clusters.
Call instructions
Interface constraints
The caller needs to authenticate through the OCP application service.
Request path
GET /api/v2/obproxy/clusters
Request parameters
None.
Response
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| data | Object | The requested data. |
| ├─ contents | Array | The cluster information of OBProxy. For more information, see obproxyCluster data structure. |
| ├─ page | Object | The pagination information. For more information, see page data structure. |
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | Datetime | The timestamp when the server finishes the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code that conforms to the HTTP status specification. |
| traceId | String | The trace ID of the request, which is used to troubleshoot issues. |
| server | String | The address of the application service that responds to the request. |
page data structure
Parameter |
Type |
Description |
|---|---|---|
| totalElements | Integer | The total number of pages. |
| totalPage | Integer | The total number of pages. |
| number | Integer | The current page number. |
| size | Integer | The size of the current page. |
obproxyCluster data structure
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 modification time. |
| configUrl | String | The Config URL. |
| address | String | The access address of the OBProxy cluster. |
| port | Integer | The access port of the OBProxy cluster. |
| obLinks | Array | The information about the OceanBase clusters that can be connected. For more information, see ObLink data structure. |
| versions | Array | The deployment version information of OBProxy. The OBProxy quantity is counted by version. For more information, see VersionStatInfo data structure. |
| topo | Array | The OBProxy deployment topology information. The OBProxy quantity is counted by IDC. For more information, see IdcStatInfo data structure. |
| obproxies | Array | The list of all OBProxies in the cluster. For more information, see ObproxyServer data structure. |
ObLink data structure
Parameter |
Type |
Description |
|---|---|---|
| clusterId | Long | The ID of the cluster in OCP. |
| clusterName | String | The cluster name. |
| username | String | The connection user. |
| status | String | The cluster status. Valid values: |
| connections | Double | The number of OceanBase cluster connections. |
| obClusterId | Long | The ID of the cluster in OceanBase. |
| clusterType | String | The cluster type. Valid values: |
VersionStatInfo data structure
Parameter |
Type |
Description |
|---|---|---|
| version | String | The version information. |
| count | Long | The number of OBProxies. |
IdcStatInfo data structure
Parameter |
Type |
Description |
|---|---|---|
| idcName | String | The name of the IDC. |
| count | Long | The number of OBProxies. |
ObproxyServer data structure
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 where the OBProxy is located. |
| lastActiveTime | OffsetDateTime | The last available time. |
| parameterVersion | Long | The parameter version. |
| ip | String | The IP address. |
| sqlPort | Integer | The SQL port. |
| exporterPort | Integer | The exporter port. |
| version | String | The version information of OBProxy. |
| status | String | The status of the OBProxy. Valid values: |
| operateStatus | String | The operating status of the OBProxy. Valid values: |
| architecture | String | The hardware architecture information of the host. |
Example
Request example
GET /api/v2/obproxy/clusters?page=1&size=10
Response example
{
"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"
}
