Queries observability usage data for Application Monitoring, Managed Service for OpenTelemetry, Managed Service for Prometheus, and Real User Monitoring (RUM).
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| IntervalInSec |
integer |
No |
The time interval for data slicing, in seconds. Minimum: 3600. Valid values:
Valid values:
|
3600 |
| StartTime |
integer |
Yes |
The start of the time range to query, in milliseconds. |
1699200000000 |
| EndTime |
integer |
Yes |
The end of the time range to query, in milliseconds. |
1699286400000 |
| OrderBy |
string |
No |
The sort dimension. Valid value:
Valid values:
|
dataType |
| Metric |
string |
Yes |
The metric name. Valid value: USAGEFEE.STAT. Valid values:
|
USAGEFEE.STAT |
| Order |
string |
No |
The sort order. Valid values:
|
ASC |
| AdvancedFilters |
array<object> |
No |
The filter conditions. |
|
|
object |
No |
|||
| Key |
string |
No |
The key of the filter condition. |
regionId |
| Value |
string |
No |
The value of the filter condition. |
cn-hangzhou |
| OpType |
string |
No |
The operator. Valid values: Valid values:
|
eq |
| Dimensions |
array |
No |
The metric dimensions to query. Valid values:
|
|
|
string |
No |
The metric dimension. |
dataType |
|
| Measures |
array |
No |
The metric measures to query. |
|
|
string |
No |
The metric measure. Valid value: byte_sum. Valid values:
|
byte_sum |
|
| QueryType |
string |
Yes |
The data type. Valid values:
Valid values:
|
instantQuery |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The response code. 2XX indicates success, 3XX a redirect, 4XX a client error, and 5XX a server error. |
200 |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The error message returned on failure. |
success |
| RequestId |
string |
The request ID. |
99A663CB-8D7B-4B0D-A006-03C8EE38E7BB |
| Success |
boolean |
Whether the request succeeded. Valid values:
|
true |
| Data |
object |
The response data. |
|
| Complete |
boolean |
Whether the multi-region query is complete. Valid values:
|
true |
| Items |
array<object> |
The usage data entries. |
|
|
object |
The queried data. |
{ "date": "1697108400", "dataType": "metrics", "byte_sum": 9497922 } |
Examples
Success response
JSON format
{
"Code": 200,
"HttpStatusCode": 200,
"Message": "success",
"RequestId": "99A663CB-8D7B-4B0D-A006-03C8EE38E7BB",
"Success": true,
"Data": {
"Complete": true,
"Items": [
{
"date": "1697108400",
"dataType": "metrics",
"byte_sum": 9497922
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterMetricIllegal | The specified metric is invalid. | The specified metric is invalid. |
| 400 | ParameterMeasuresIllegal | The specified Measures is invalid. | The specified Measures is invalid. |
| 400 | ParameterTimeStampIllegal | The specified timeStamp is invalid. | The specified timeStamp is invalid. |
| 400 | ParameterOrderIllegal | The specified order is invalid. | The specified order is invalid. |
| 400 | ParameterPageSizeIllegal | The specified PageSize is invalid. | The specified PageSize is invalid. |
| 400 | ParameterIntervalIllegal | The specified interval is invalid. | The specified interval is invalid. |
| 400 | ParameterMeasuresMissing | You must specify measures. | You must specify measures. |
| 400 | ParameterDimensionsIllegal | The specified dimensions is invalid. | The specified dimensions is invalid. |
| 400 | ParameterRegionIdIllegal | The specified RegionId is invalid. | The specified RegionId is invalid. |
| 400 | InternalError | Internal error. Please try again. Contact the DingTalk service account if the issue persists after multiple retries. | |
| 403 | APINotAuthorize | The current user is not authorized to access the interface. | The current user is not authorized to access the interface. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.