Operation description
This topic provides an example to show how to query the statistics of the Availability
metric for a site monitoring task whose ID is ef4cdc8b-9dc7-43e7-810e-f950e56c****
. The result indicates that the availability rate of the site is 100%
.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TaskId | string | Yes | The ID of the site monitoring task. For more information about how to obtain the ID of a site monitoring task, see DescribeSiteMonitorList . | ef4cdc8b-9dc7-43e7-810e-f950e56c**** |
TimeRange | string | No | The statistical period. Unit: minutes. Default value: 1440 (1 day). Maximum value: 43200 (30 days). | 1440 |
StartTime | string | No | The timestamp that specifies the beginning of the time range to query. Unit: milliseconds. The default value is 1 hour ahead of the current time. | 1576142850527 |
MetricName | string | Yes | The name of the metric. Valid values:
| Availability |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "Succcessful",
"Data": "100",
"RequestId": "3AD2724D-E317-4BFB-B422-D6691D071BE1",
"Success": "true"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
206 | %s | %s |
400 | InvalidParameterValue | The specified parameter is not valid. |
400 | InvalidParameterValue | %s |
401 | AccessDeniedException | You donot have sufficient access to perform this action. |
403 | Forbidden | You are not authorized to operate the specified resource. |
403 | InvalidClientTokenId | The X.509 certificate or cms access key ID provided does not exist in our records. |
429 | Throttli∂ngException | The request was denied due to request throttling. |
500 | InternalError | The request processing has failed due to some unknown error. |
For a list of error codes, visit the Service error codes.