All Products
Search
Document Center

ApsaraDB for OceanBase:DescribeMetricsData

Last Updated:Nov 14, 2025

You can call this operation to query single-dimensional or multi-dimensional metric data of an OceanBase cluster.

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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
oceanbase:DescribeMetricsDataget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the OceanBase cluster.

ob317v4uif****
StartTimestringYes

The start time for querying metric data. The value must be UTC time in the format of YYYY-MM-DDThh:mm:ssZ.

2021-06-13T15:40:43Z
EndTimestringYes

The end time for querying metric data. The value must be UTC time in the format of YYYY-MM-DDThh:mm:ssZ.

2021-06-13T15:40:43Z
MetricsstringYes

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

tps
LabelsstringYes

A string of key-value pairs separated with commas (,). Each key and its value are separated with a colon (:). Example: "app:OB,clusterId:ob*****,tenantId:t******,serverId:*****,zoneId:cn-hangzhou-j". The string can contain only the following fixed keys: * app: the application type. At present, only OceanBase Database is supported. * 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. | app:OB,clusterId:ob***

app:OB,clusterId:ob***
GroupByLabelsstringYes

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

app,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.

5
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
MetricScopestringNo

The dimensions of the performance metric.

cluster

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

EE205C00-30E4-****-****-87E3A8A2AA0C
Datastring

The returned data.

[ { "sql_select_count":75.****15****1515, "timestamp":165079**** }, ...... ]

Examples

Sample success responses

JSONformat

{
  "RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
  "Data": "[\n                {\n                    \"sql_select_count\":75.****15****1515,\n                    \"timestamp\":165079****\n                },\n                ......\n            ]"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2025-07-03The request parameters of the API has changedView Change Details
2024-04-15The response structure of the API has changedView Change Details
2023-12-26The request parameters of the API has changedView Change Details