Queries the historical distribution of a specific metric over a specified time period.
Operation description
Request
This API queries the value distribution for specific metrics, such as CPU usage and memory usage, within a given date range. You can define custom value ranges for more detailed statistics. The API supports both the enterprise edition and commercial edition. By default, it returns statistics for the previous day (T-1).
BusinessChannel: Defaults to the enterprise edition. The commercial edition is also available.
StartDate & EndDate: Both default to T-1 (the previous day). The date must be in the
YYYY-MM-DDformat.MetricName: The metric to query. For a list of valid metrics, see the parameter description in this topic.
Ranges: Defines multiple value ranges for a more detailed analysis. For each range, you can set a minimum value, a maximum value, and whether to include these boundary values.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| StartDate |
string |
No |
The start date of the query period. The date must be in the |
2026-04-01 |
| EndDate |
string |
No |
The end date of the query period. The date must be in the |
2026-04-01 |
| MetricName |
string |
No |
The name of the metric to query. Valid values:
|
LOAD_SCORE |
| Ranges |
array<object> |
No |
An array of custom value ranges. |
|
|
object |
No |
An object that defines a custom value range. |
||
| Label |
string |
No |
The label for the value range. This label is returned in the response. |
label-02' |
| Min |
number |
No |
The minimum value of the value range. |
0 |
| IncludeMin |
boolean |
No |
Specifies whether to include the minimum value in the range. The default value is |
true |
| Max |
number |
No |
The maximum value of the value range. |
20 |
| IncludeMax |
boolean |
No |
Specifies whether to include the maximum value in the range. The default value is |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned for the request. |
||
| RequestId |
string |
The request ID. |
2F2BF549-CBD9-1FED-9ABB-086B62D7B293 |
| DistributionList |
array<object> |
An array of objects, each representing the distribution data for a specific value range. |
|
|
object |
The distribution data for a specific value range. |
||
| Label |
string |
The range label that you defined in the request. |
2F2BF549-CBD9-1FED-9ABB-086B62D7B293 |
| Min |
number |
The minimum value of the value range. |
0 |
| Max |
number |
The maximum value of the value range. |
20 |
| Count |
integer |
The number of data points in this value range. |
40 |
| TotalCount |
integer |
The total number of data points that match the query. |
94 |
Examples
Success response
JSON format
{
"RequestId": "2F2BF549-CBD9-1FED-9ABB-086B62D7B293",
"DistributionList": [
{
"Label": "2F2BF549-CBD9-1FED-9ABB-086B62D7B293",
"Min": 0,
"Max": 20,
"Count": 40
}
],
"TotalCount": 94
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.