Queries a metric.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
xtrace:SearchTrace |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| IntervalInSec |
integer |
No |
The time interval at which you want to query metric data. Unit: milliseconds. Minimum value: 60000. Note
If you set this parameter to 2147483647, all data in the specified time interval is returned. |
100000 |
| StartTime |
integer |
Yes |
The beginning of the time range to query. The value is a timestamp that is accurate to milliseconds. Note
The value of this parameter is of the LONG type. Precision loss may occur during serialization or deserialization. The value must be less than or equal to 9007199254740991. |
1575561600000 |
| EndTime |
integer |
Yes |
The end of the time range to query. The value is a timestamp that is accurate to milliseconds. Note
The value of this parameter is of the LONG type. Precision loss may occur during serialization or deserialization. The value must be less than or equal to 9007199254740991. |
1575622455686 |
| OrderBy |
string |
No |
The field based on which you want to sort the returned entries. |
count |
| Limit |
integer |
No |
The maximum number of entries that you want to return. |
100 |
| Metric |
string |
Yes |
The name of the metric. Valid values:
|
appstat.incall |
| Order |
string |
No |
The order in which you want to sort the returned entries. Valid values:
|
ASC |
| ProxyUserId |
string |
No |
The ID of the proxy user. |
testefgag12 |
| Filters |
array<object> |
No |
The filter conditions. |
|
|
object |
No |
The filter conditions. |
||
| Key |
string |
No |
The key of the field that you want to use to filter the returned entries. |
service |
| Value |
string |
No |
The value of the field that you want to use to filter the returned entries. |
service-test |
| Dimensions |
array |
No |
The dimensions of the metric that you want to query. |
RT |
|
string |
No |
The dimensions of the metric that you want to query. |
pid |
|
| Measures |
array |
Yes |
The measures of the metric that you want to query. |
count |
|
string |
No |
If you set the Metric parameter to
If you set the Metric parameter to
|
rt |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Data |
string |
The returned statistics. |
{ "Data": "{\"data\":[{\"date\":1583686800000,\"count\":0,\"rt\":0,\"rpc\":\"childSpan3\"}]}} |
| RequestId |
string |
The ID of the request. |
1E2B6A4C-6B83-4062-8B6F-AEEC1F****** |
Examples
Success response
JSON format
{
"Data": "{ \"Data\": \"{\\\"data\\\":[{\\\"date\\\":1583686800000,\\\"count\\\":0,\\\"rt\\\":0,\\\"rpc\\\":\\\"childSpan3\\\"}]}}",
"RequestId": "1E2B6A4C-6B83-4062-8B6F-AEEC1F******"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.