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
user_id
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
metric_names
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
start_time
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
end_time
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
request_id
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
user_id
String
User ID
resource_id
String
Resource ID
metric_name
String
Metric name
dimensions
Dimension[]
Dimension list
data_points
DataPoints[]
Metric data
DataPoints
Name
Types
Description
average
float
Average of Metrics within the statistical period
sum
float
Sum of Metrics within the statistical period
minimum
float
Minimum value of Metrics within the statistical period
maximum
float
Maximum value of Metrics within the counting cycle
sample_count
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