Query Monitoring Data for Partial Dimensions API description
Monitor data from cloud products within a specified time range can be fetched using multiple dimensions, a single metric, and various statistics.
API restriction
For any metric of a specific instance, the number of data points returned in one response cannot exceed 1,440.
Each query can include up to 100 dimension combinations.
Request structure
Method: POST
Url: /csm/api/v2/userId/{userId}/services/{service}/data/metricData/PartialDimension
Request parameters
Name
Types
Description
Required or not
Parameter location
userId
String
User ID
Yes
Path
service
String
Cloud product identifier. For values, refer to [Cloud Product Identifier List](BCM/Cloud Product Monitor List/Cloud Product Monitor Object Type List.md)
Yes
Path
startTime
String
Monitor data start time, refer to [Date and Time](BCM/API Reference/General Description.md), expressed in UTC date
Yes
Body
endTime
String
Monitor data end time, refer to [Date and Time](BCM/API Reference/General Description.md), expressed in UTC date
Yes
Body
statistics
List<String>
List of Statistic Method Types, options: average, maximum, minimum, sum, sampleCount.
Yes
Body
cycle
int
Statistical period, unit: second, default value: 60
No
Body
dimensions
List<Dimension>
Dimension list
Yes
Body
resourceType
String
Monitor object type. For values, refer to [Cloud Product Monitor Object Type List](BCM/Cloud Product Monitor List/Cloud Product Monitor Object Type List.md)
No
Body
metricName
String
Monitor Metric name
Yes
Body
region
String
Region identifier. For values, refer to [Region List](BCM/API Reference/Service domain.md)
No
Body
pageNo
int
Page number, defaulting to 1
No
Body
pageSize
int
Page size, default: 10, maximum: 100
No
Body
Dimension
Name
Types
Description
Required or not
name
String
Dimension key
Yes
value
String
Dimension value
Yes
Response parameters
Name
Types
Description
requestId
String
Request identifier
code
String
Return code
message
String
Error message
result
PageResult
Paginated results
Name
Types
Description
pageNo
int
Page number
pageSize
int
Page size
totalCount
int
Total count
result
List<AllDataMetric>
List of Monitor Metrics
AllDataMetric
Name
Types
Description
region
String
Region identifier
scope
String
Cloud product identifier
userId
String
User ID
resourceId
String
Resource ID
metricName
String
Monitor Metric name
dimensions
List<Dimensions>
Dimension list
dataPoints
List<DataPoint>
Monitor Metric data
DataPoint
Name
Types
Description
average
double
Average of Metrics within the statistical period
sum
double
Sum of Metrics within the statistical period
minimum
double
Minimum value of Metrics within the statistical period
maximum
double
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 monitor data
Request example
1 POST /csm/api/v2 /userId/453 bf9588 c9 *******a2 c984129090 dc/services/BCE_BLB/data/metricData/PartialDimension
2 {
3 "startTime" : "2024-03-20T02:21:17Z" ,
4 "endTime" : "2024-03-20T03:21:17Z" ,
5 "dimensions" : [
6 {
7 "name" : "BlbPortType" ,
8 "value" : "TCP"
9 }
10 ] ,
11 "statistics" : [
12 "sum"
13 ] ,
14 "resourceType" : "AppIpv6Blb" ,
15 "metricName" : "ActiveConnClusterPercent"
16 }
Response example
1 {
2 "requestId" : "55b74de262694686999adad5b4832047" ,
3 "code" : "success" ,
4 "message" : "" ,
5 "result" : {
6 "pageNo" : 1 ,
7 "pageSize" : 10 ,
8 "totalCount" : 4 ,
9 "result" : [
10 {
11 "region" : "bj" ,
12 "scope" : "BCE_BLB" ,
13 "userId" : "453bf9588c9*******a2c984129090dc" ,
14 "resourceId" : "lb-****f1c3" ,
15 "metricName" : "ActiveConnClusterPercent" ,
16 "dimensions" : [
17 {
18 "name" : "BlbId" ,
19 "value" : "lb-****f1c3"
20 } ,
21 {
22 "name" : "BlbPort" ,
23 "value" : "80"
24 } ,
25 {
26 "name" : "BlbPortType" ,
27 "value" : "TCP"
28 }
29 ] ,
30 "dataPoints" : [
31 {
32 "sum" : 0.0 ,
33 "timestamp" : "2024-03-20T02:21:17Z"
34 } ,
35 {
36 "sum" : 0.0 ,
37 "timestamp" : "2024-03-20T02:22:17Z"
38 }
39 .....
40 ]
41 }
42 ....
43 ]
44 }
45 }