Overview
You can call this API to query the details of an OceanBase cluster.
API details
Constraints
The caller must have an AccessKey for accessing APIs of OceanBase Cloud. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instance/{instanceId}
Request parameters
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| None |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| None |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | Object | The detailed data of the cluster. | |
| diskType | String | The type of the storage disk where the cluster is deployed. | cloud_essd |
| managementMode | String | The management mode of the cluster. Valid value: DBaaS: the normal mode. |
DBaaS |
| series | String | The series of the OceanBase cluster. Valid values are NORMAL, which indicates Standard Cluster Edition (Cloud Disk), and NORMAL_KV, which indicates Standard Cluster Edition (key-value). The default value is NORMAL. | NORMAL |
| projectId | String | The ID of the project. | li15c8s987d2arse****** |
| availableZones | Array | The number of available zones of the cluster. | ["4"] |
| version | String | The version of OceanBase Database. | 3.2.3.0 |
| obRpmVersion | String | The detailed information about the OceanBase Database version. | 4.2.3.0-100000232024042317 |
| cloudProvider | String | The name of the cloud service provider. Valid values:
|
QCLOUD |
| createTime | String | The time in UTC when the cluster was created. | 2023-08-28T08:30:54Z |
| dataMergeTime | String | The time when the major compaction of cluster data is performed. | 18:00Z |
| deployMode | String | The data replica distribution mode of the cluster.
|
1-1-1 |
| deployType | String | The deployment type of the cluster. Valid values:
|
multiple |
| instanceClass | String | The specification of the cluster. The following four plans are supported:
|
8C32G |
| instanceId | String | The ID of the OceanBase cluster. | ob5****** |
| instanceName | String | The name of the OceanBase cluster. | test |
| instanceRole | String | The role of the OceanBase cluster. | NORMAL |
| instanceType | String | The type of the cluster. Valid values:
|
CLUSTER |
| payType | String | The billing method for the OceanBase cluster. Valid values:
|
POSTPAY |
| region | String | The region. | ap-guangzhou |
| saleChannel | String | The sales channel. Valid values:
|
domestic |
| NodeNum | String | The number of nodes in the cluster. If the cluster is deployed in n-n-n mode, the number of nodes in the cluster equals n × 3. | 3 |
| CpuArchitecture | String | The CPU architecture of the cluster. | X86 |
| replicaMode | String | The number of full-featured replicas. Return value: 3 or 2.
|
3 |
| vpcId | String | The ID of the VPC. | vpc-xxxxx |
| status | String | The status of the cluster. Valid values:
|
ONLINE |
| primaryInstanceId | String | The ID of the primary cluster. | |
| standbyInstanceIds | Array | The IDs of standby clusters. | ["xxx","xxxx"] |
| tagList | Array | The tag list of the cluster instance. | [{"tagKey","tagValue"}] |
| expireTime | String | The time at which the cluster expires. | |
| resource | Object | The information about cluster resources. | |
| cpu | Object | The information about the CPU resources of the cluster. | |
| totalCpu | Long | The total number of CPU cores of the cluster. | 4.0 |
| usedCpu | Long | The number of CPU cores in use by cluster. | 1.0 |
| disk | Object | The information about the storage resources of the cluster. | |
| totalDiskSize | Long | The total size of the disk. | 100.0 |
| usedDiskSize | Long | The size of occupied disk space. | 1.0 |
| memory | Object | The information about the memory resources of the cluster. | |
| totalMemory | Long | The total memory size. | 16.0 |
| usedMemory | Long | The size of occupied memory space. | 4.0 |
| tagList | Array | The tag list of the cluster instance. | |
| tagKey | String | The key of the tag. | |
| tagValue | String | The value of the tag. | |
| success | Boolean | Indicates whether the request is successful. | true or false |
| requestId | String | The ID of the request. | dc302d76-66b5-48d8-ab53-a035****** (64-bit) |
Examples
Request example
curl --request GET \
--digest -u 'ak:sk' \
--url https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}
-H 'X-Ob-Project-Id: <Project ID>'
Note
A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
Response example
Here is a response example when the request is successful:
{
"data":{
"availableZones":[
"d",
"e"
],
"cloudProvider":"HUAWEI",
"cpuArchitecture":"X86",
"createTime":"2024-11-11T02:39:33Z",
"dataMergeTime":"18:00Z",
"deployMode":"1-1-1",
"deployType":"dual",
"diskType":"cloud_essd",
"instanceClass":"4C16G",
"instanceId":"ob68cg********",
"instanceName":"ob68cg********",
"instanceRole":"NORMAL",
"instanceType":"CLUSTER",
"managementMode":"DBaaS",
"nodeNum":3,
"obRpmVersion":"4.1.0.2-104030012023121217",
"payType":"POSTPAY",
"projectId":"li15c8s987d2arse********",
"region":"cn-southwest-2",
"replicaMode":"2",
"resource":{
"cpu":{
"totalCpu":4.0,
"usedCpu":2.0
},
"disk":{
"totalDiskSize":100.0,
"usedDiskSize":1.0
},
"memory":{
"totalMemory":16.0,
"usedMemory":8.0
}
},
"saleChannel":"domestic",
"series":"NORMAL",
"standbyInstanceIds":[],
"status":"ONLINE",
"version":"4.1.0",
"vpcId":"751bc080-d862-4917-972e-48ae********"
},
"requestId":"d5ce1e06-f263-4407-8ba0-5ad2********",
"success":true
}
Here is a response example when the request failed:
{
"errorCode": "Privilege.OpenAPI.AuthFailed",
"errorMessage": "OpenAPI authentication failed",
"requestId": "cb32942e-bdf2-4d85-a26f-6bf8********",
"success": false
}