Description
For querying the error metric data of a specified API.
- This function is intended for API activators.
- This interface is used to query the statistics on failed calls in the monitoring data of a specified API.
- By default, statistics is collected by the monitoring function only on the APIs in the product stage excluding the API calls in the test stage.
Request parameters
Name | Type | Required? | Description |
---|---|---|---|
Action | String | Yes | Operation interface, which is a required parameter; value: DescribeApiErrorData. |
GroupId | String | No | ID of the group. |
ApiId | String | Yes | ID of the API. |
StartTime | String | Yes | Start time, which follows the ISO8601 standard and uses UTC time. The format is YYYY-MM-DDThh:mm:ssZ. |
EndTime | String | Yes | End time, which follows the ISO8601 standard and uses UTC time. The format is YYYY-MM-DDThh:mm:ssZ. |
Return parameters
Name | Type | Description |
---|---|---|
ClientErrors | MonitorItem | Returned metric information about API call failure (due to client reasons), in a format consisting of MonitorItem. All calls for which the HTTP status code returned to the callers is 4XX are all included in failed calls due to the client reasons. |
ServerErrors | MonitorItem | Returned metric information about API call failure (due to server reasons), in a format consisting of MonitorItem. All calls for which the HTTP status code returned to the callers is 5XX are all included in failed calls due to the server reasons. |
Examples
Request example
https://apigateway.cn-qingdao.aliyuncs.com/?Action=DescribeApiErrorData
&GroupId=63be9002440b4778a61122f14c2b2bbb
&ApiId=d6f679aeb3be4b91b3688e887ca1fe16
&StartTime=2016-07-23T08:28:48Z
&EndTime=2016-07-23T09:28:48Z
&<Public request parameters>
Response example
XML
format
<DescribeApiErrorDataResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BZ001</RequestId>
<ClientErrors>
<MonitorItem>
<ItemTime>2016-07-28T08:20:00Z</ItemTime>
<ItemValue>2</ItemValue>
</MonitorItem>
<MonitorItem>
<ItemTime>2016-07-28T08:22:00Z</ItemTime>
<ItemValue>5</ItemValue>
</MonitorItem>
<MonitorItem>
<ItemTime>2016-07-28T08:24:00Z</ItemTime>
<ItemValue>6</ItemValue>
</MonitorItem>
</ClientErrors>
<ServerErrors>
<MonitorItem>
<ItemTime>2016-07-28T08:20:00Z</ItemTime>
<ItemValue>0</ItemValue>
</MonitorItem>
<MonitorItem>
<ItemTime>2016-07-28T08:22:00Z</ItemTime>
<ItemValue>1</ItemValue>
</MonitorItem>
<MonitorItem>
<ItemTime>2016-07-28T08:24:00Z</ItemTime>
<ItemValue>1</ItemValue>
</MonitorItem>
</ServerErrors>
</DescribeApiErrorDataResponse>
JSON
format
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BZ001",
"ClientErrors": {
"MonitorItem": [
{
"ItemTime": "2016-07-28T08:20:00Z",
"ItemValue": "2"
},
{
"ItemTime": "2016-07-28T08:22:00Z",
"ItemValue": "5"
},
{
"ItemTime": "2016-07-28T08:24:00Z",
"ItemValue": "6"
}
]
},
"ServerErrors": {
"MonitorItem": [
{
"ItemTime": "2016-07-28T08:20:00Z",
"ItemValue": "0"
},
{
"ItemTime": "2016-07-28T08:22:00Z",
"ItemValue": "1"
},
{
"ItemTime": "2016-07-28T08:24:00Z",
"ItemValue": "1"
}
]
}
}