All Products
Search
Document Center

ApsaraDB for OceanBase:DescribeMetricsDataV2

Last Updated:Nov 14, 2025

You can call this operation to return metric data.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the OceanBase cluster.

ob317v4uif****
MetricsstringYes

The metrics. Separate multiple metrics with commas (,). Example: "sql_all_count,sql_all_rt...".

sql_all_rt
StartTimestringYes

The start time, in the format of YYYY-MM-DDThh:mm:ssZ.

2023-04-12T04:38:38Z
EndTimestringYes

The end time, in the format of YYYY-MM-DDThh:mm:ssZ.

2023-04-12T05:38:38Z
LabelsstringYes

A string of key-value pairs separated with commas (,). Each key and its value are separated with a colon (:). Multiple values of a key are separated with semicolons (;). Example: "clusterId:ob*****,tenantId:t******;t*******,serverId:*****,zoneId:cn-hangzhou-j". The string can contain only the following fixed keys:

  • clusterId: the ID of the OceanBase cluster.
  • tenantId: the ID of the OceanBase Database tenant.
  • zoneId: the ID of the zone.
  • serverId: the ID of the OBServer node.
clusterId:ob***
GroupByLabelsstringYes

The one or more keys used for grouping. Separate multiple keys with commas (,). Example: "clusterId,tenantId".

clusterId
SortMetricKeystringNo

The sort column.

tps
SortOrderstringNo

The sorting rule. Valid values:

  • ASC: in ascending order
  • DESC: in descending order
DESC
LimitstringNo

The length of the data array returned after sorting.

20
ReplicaTypestringNo

The type of the replica. Node filtering conditions are configured based on the replica type when you query the monitoring data of the OceanBase cluster.

  • By default, the replica type is not specified when you query the monitoring data of OceanBase clusters or the access proxy. If you do not specify the replica type when you query the monitoring data of an OceanBase cluster, the monitoring data of all nodes is queried.
  • If you set the replica type to FULL when you query the monitoring data of an OceanBase cluster, the monitoring data of only the full-featured replica nodes is queried.
  • If you set the replica type to READONLY when you query the monitoring data of an OceanBase cluster, the monitoring data of only the read-only replica nodes is queried.
FULL

Response parameters

ParameterTypeDescriptionExample
object

The return result of the request.

RequestIdstring

The ID of the request.

EE205C00-30E4-****-****-87E3A8A2AA0C
Dataarray<object>

The returned data.

Dataobject

The returned data.

Labelsobject

The data label.

string

The details of the label.

clusterId:ob********
Dataarray<object>

The returned data.

Dataobject

The returned data.

MetricValueobject

The metric data.

string

The metric data.

'load1': 1.29
Timestamplong

The timestamp.

1702434300

Examples

Sample success responses

JSONformat

{
  "RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
  "Data": [
    {
      "Labels": {
        "key": "clusterId:ob********"
      },
      "Data": [
        {
          "MetricValue": {
            "key": "'load1': 1.29"
          },
          "Timestamp": 1702434300
        }
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.