edit-icon download-icon

Query the response time monitoring data of an API

Last Updated: May 17, 2017

Description

For querying the response time (ms) monitoring information of a specified API.

  • This function is intended for API activators.
  • This API returns the statistics on the response time 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: DescribeApiLatencyData.
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
CallLatencys MonitorItem Returned metric information about API call latency, in a format consisting of MonitorItem.

Examples

Request example

  1. https://apigateway.cn-qingdao.aliyuncs.com/?Action=DescribeApiLatencyData
  2. &GroupId=63be9002440b4778a61122f14c2b2bbb
  3. &ApiId=d6f679aeb3be4b91b3688e887ca1fe16
  4. &StartTime=2016-07-23T08:28:48Z
  5. &EndTime=2016-07-23T09:28:48Z
  6. &<Public request parameters>

Response example

XML format

  1. <DescribeApiLatencyDataResponse>
  2. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BZ001</RequestId>
  3. <CallLatencys>
  4. <MonitorItem>
  5. <ItemTime>2016-07-28T08:20:00Z</ItemTime>
  6. <ItemValue>15</ItemValue>
  7. </MonitorItem>
  8. <MonitorItem>
  9. <ItemTime>2016-07-28T08:22:00Z</ItemTime>
  10. <ItemValue>30</ItemValue>
  11. </MonitorItem>
  12. <MonitorItem>
  13. <ItemTime>2016-07-28T08:24:00Z</ItemTime>
  14. <ItemValue>24</ItemValue>
  15. </MonitorItem>
  16. </CallLatencys>
  17. </DescribeApiLatencyDataResponse>

JSON format

  1. {
  2. "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BZ001",
  3. "CallLatencys": {
  4. "MonitorItem": [
  5. {
  6. "ItemTime": "2016-07-28T08:20:00Z",
  7. "ItemValue": "15"
  8. },
  9. {
  10. "ItemTime": "2016-07-28T08:22:00Z",
  11. "ItemValue": "30"
  12. },
  13. {
  14. "ItemTime": "2016-07-28T08:24:00Z",
  15. "ItemValue": "24"
  16. }
  17. ]
  18. }
  19. }
Thank you! We've received your feedback.