edit-icon download-icon

Query the QPS monitoring data of an API

Last Updated: May 17, 2017

Description

For querying the QPS monitoring data of a specified API.

  • This function is intended for API activators.
  • This interface is used to query the statistics on QPS 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: DescribeApiQpsData.
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
CallSuccesses MonitorItem Returned metric information about successful API calls, in a format consisting of MonitorItem.
CallFails MonitorItem Returned metric information about failed API calls, in a format consisting of MonitorItem.

Examples

Request example

  1. https://apigateway.cn-qingdao.aliyuncs.com/?Action=DescribeApiQpsData
  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. <DescribeApiQpsDataResponse>
  2. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BZ001</RequestId>
  3. <CallSuccesses>
  4. <MonitorItem>
  5. <ItemTime>2016-07-28T08:20:00Z</ItemTime>
  6. <ItemValue>670</ItemValue>
  7. </MonitorItem>
  8. <MonitorItem>
  9. <ItemTime>2016-07-28T08:22:00Z</ItemTime>
  10. <ItemValue>770</ItemValue>
  11. </MonitorItem>
  12. <MonitorItem>
  13. <ItemTime>2016-07-28T08:24:00Z</ItemTime>
  14. <ItemValue>650</ItemValue>
  15. </MonitorItem>
  16. </CallSuccesses>
  17. <CallFails>
  18. <MonitorItem>
  19. <ItemTime>2016-07-28T08:20:00Z</ItemTime>
  20. <ItemValue>0</ItemValue>
  21. </MonitorItem>
  22. <MonitorItem>
  23. <ItemTime>2016-07-28T08:22:00Z</ItemTime>
  24. <ItemValue>0</ItemValue>
  25. </MonitorItem>
  26. <MonitorItem>
  27. <ItemTime>2016-07-28T08:24:00Z</ItemTime>
  28. <ItemValue>1</ItemValue>
  29. </MonitorItem>
  30. </CallFails>
  31. </DescribeApiQpsDataResponse>

JSON format

  1. {
  2. "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BZ001",
  3. "CallSuccesses": {
  4. "MonitorItem": [
  5. {
  6. "ItemTime": "2016-07-28T08:20:00Z",
  7. "ItemValue": "670"
  8. },
  9. {
  10. "ItemTime": "2016-07-28T08:22:00Z",
  11. "ItemValue": "770"
  12. },
  13. {
  14. "ItemTime": "2016-07-28T08:24:00Z",
  15. "ItemValue": "650"
  16. }
  17. ]
  18. },
  19. "CallFails": {
  20. "MonitorItem": [
  21. {
  22. "ItemTime": "2016-07-28T08:20:00Z",
  23. "ItemValue": "0"
  24. },
  25. {
  26. "ItemTime": "2016-07-28T08:22:00Z",
  27. "ItemValue": "0"
  28. },
  29. {
  30. "ItemTime": "2016-07-28T08:24:00Z",
  31. "ItemValue": "1"
  32. }
  33. ]
  34. }
  35. }
Thank you! We've received your feedback.