Querying API Calls Under an API Group in the Last One Hour
Function
This API is used to query the number of times APIs are called within a period by API group ID. The query is based on 1 minute. If the time range is within one hour, the server returns the number of API calls made every minute.
For security purposes, clear your operation records, including but not limited to records in the ~/.bash_history and /var/log/messages directories (if any), after running the curl command on the server to query information.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
Request Method |
URI |
---|---|
GET |
/v1.0/apigw/statistics/group/latest?group_id=[group_id] |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
group_id |
Yes |
String |
API group ID |
Response
Parameter |
Type |
Description |
Operation Type |
---|---|---|---|
code |
String |
Response code |
R |
msg |
String |
Response message |
R |
start_time |
Long |
Timestamp (UTC) of the start time |
R |
end_time |
Long |
Timestamp (UTC) of the end time |
R |
list |
Structure |
Statistic data |
R |
Parameter |
Type |
Description |
Operation Type |
---|---|---|---|
group_id |
String |
API group ID |
R |
current_minute |
Long |
Timestamp (UTC) |
R |
provider |
String |
API provider |
R |
req_count |
Integer |
Total number of requests |
R |
max_latency |
Integer |
Maximum latency (ms) |
R |
avg_latency |
Double |
Average latency (ms) |
R |
output_throughput |
Integer |
Downstream throughput (bytes) |
R |
input_throughput |
Integer |
Upstream throughput (bytes) |
R |
req_count4xx |
Integer |
Total number of 4xx response codes |
R |
req_count5xx |
Integer |
Total number of 5xx response codes |
R |
req_count2xx |
Integer |
Total number of 2xx response codes |
R |
req_count_error |
Integer |
Number of errors |
R |
register_time |
String |
Recording time (yyyy-MM-dd HH:mm:ss) |
R |
req_time |
String |
Request time (yyyy-MM-dd HH:mm:ss) |
R |
Example response:
{ "code": "000000", "msg": "", "list": [{ "group_id": "d7b52683-341b-4234-8261-66b4cfbfbda5", "current_minute": 1516849440, "provider": "205fa874817a4dcfae9222a3be4725e8", "req_count": 1981, "max_latency": 199, "avg_latency": 98.17, "output_throughput": 694483, "input_throughput": 694483, "req_count4xx": 669, "req_count5xx": 312, "req_count2xx": 327, "req_count_error": 981, "register_time": "2018-01-25 11:04:09", "req_time": "2018-01-25 11:04:00" }], "start_time": 1516845900, "end_time": 1516849440 }
Status Codes
Status Code |
Description |
---|---|
200 |
Query Success |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot