API to obtain data for multiple instances, multiple metrics, and multiple statistics, including Cloud Product Monitor data, Site Monitor data, or Custom Monitor data pushed by users.
API restriction
For any metric of a specific instance, the number of data points returned in one response cannot exceed 1,440.
A single request can query up to 100 instances.
Request parameters
Name
Types
Description
Required or not
Parameter location
userId
string
User ID
Yes
Body
scope
string
For cloud product identifiers, please refer to [Cloud Product Identifier List](BCM/Cloud Product Monitor List/Cloud Product Monitor Object Type List.md)
Yes
Body
region
string
Region identifier. For values, refer to [Region List](BCM/API Reference/Service domain.md)
Yes
Body
type
string
Monitor object type, refer to [Monitor Object Type List](BCM/Cloud Product Monitor List/Cloud Product Monitor Object Type List.md)
Yes
Body
metricNames
string[]
The list of Monitor Metrics is limited to the following character set: "0~9, A~Z, a~z", "_" . When searching for multiple Metric items, use a String array, with each array element being a Metric item
Yes
Body
statistics
string[]
The list of Statistic Method Types includes average, maximum, minimum, sum, and sampleCount. To query multiple Statistic values, use a String array
Yes
Body
dimensions
Dimension[]
List of dimensions. When querying data for multiple instances, use a two-dimensional array: the first-level array specifies multiple instances, and the second-level array specifies multiple dimensions.
Yes
Body
startTime
string
Query start time, please refer to [Date and Time](BCM/API Reference/General Description.md#Date and time regulations), expressed in UTC
Yes
Body
endTime
string
Query end time, please refer to [Date and Time](BCM/API Reference/General Description.md#Date and time regulations), expressed in UTC
Yes
Body
cycle
int
Statistic Period, multiples of 60, unit: seconds
Yes
Body
Dimension
Name
Types
Description
name
string
Dimension key
value
string
Dimension value
Parameter explanation
For concepts like Scope, Metric, Statistic, and Dimension, refer to [Core Concepts](BCM/Product Description/Core concepts.md).
Response result
Name
Types
Description
requestId
string
Request identifier
code
string
Return code
message
string
Error message
metrics
AllDataMetric[]
Monitor Metric
AllDataMetric
Name
Types
Description
region
string
Region
scope
string
Cloud product identifier
userId
string
User ID
resourceId
string
Resource ID
metricName
string
Metric name
dimensions
Dimension[]
Dimension list
dataPoints
DataPoints[]
Metric data
DataPoints
Name
Types
Description
average
float64
Average of Metrics within the statistical period
sum
float64
Sum of Metrics within the statistical period
minimum
float64
Minimum value of Metrics within the statistical period
maximum
float64
Maximum value of Metrics within the counting cycle
sampleCount
int
Number of DataPoints for the Metric within the statistical period
timestamp
string
Time corresponding to the statistical period of Metric, refer to [Date and Time](BCM/API Reference/General Description.md#Date and time regulations), expressed in UTC date