Querying Statistics on Application Request Metrics
Function
This API is used to query the request metrics for all integration applications or for one application within a specified period.
This function is restricted for use. If you have any questions, contact technical support.
Constraints
If the invoking times out or the error message "request statistics error" is returned, switch to another mode or shorten the statistics collection duration.
URI
GET /v2/{project_id}/apic/instances/{instance_id}/statistics/roma-app
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Appendix > Obtaining a Project ID in the ROMA Connect API Reference. |
instance_id |
Yes |
String |
Instance ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
mode |
No |
String |
Query mode. The default value is INSTANCE.
Note: If mode is set to APP or ALL, the fields cycle, api_id, group_id, roma_app_id, provider, register_time and status are not returned in the response. If cycle is set to HOUR or DAY, req_time is not returned in the response. If both consumer_app_id and roma_app_id are not set, the master account permission is required. |
consumer_app_id |
No |
String |
Application ID. This parameter is mandatory when mode is set to APP. |
roma_app_id |
No |
String |
Integration application ID. This parameter is mandatory when mode is set to INSTANCE. |
cycle |
No |
String |
Statistical period.
|
start_time |
No |
String |
Start time, for example, 2020-06-18 10:00:01. |
end_time |
No |
String |
End time, for example, 2020-06-18 23:00:00. |
duration |
No |
String |
The measurement duration is in the format of "integer+unit (m or h)". m indicates minute, and h indicates hour. The combination of hour and minute is supported. For example, 1h or 2h45m.
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
code |
String |
Response code. |
start_time |
Long |
Timestamp (UTC) of the statistics start time. |
end_time |
Long |
End time (UTC). |
list |
Array of StatisticsRomaApp objects |
List of KPIs in different periods in the integration application dimension. |
Parameter |
Type |
Description |
---|---|---|
max_latency |
Integer |
Maximum latency. |
avg_latency |
Float |
Average latency. |
req_count |
Integer |
Total number of requests. |
req_count2xx |
Integer |
Total number of 2xx response codes. |
req_count4xx |
Integer |
Total number of 4xx response codes. |
req_count5xx |
Integer |
Total number of 5xx response codes. |
req_count_error |
Integer |
Number of errors. |
max_inner_latency |
Integer |
Maximum gateway latency. |
avg_inner_latency |
Float |
Average gateway latency. |
max_backend_latency |
Integer |
Maximum backend latency. |
avg_backend_latency |
Float |
Average backend latency. |
output_throughput |
Long |
Downstream throughput (bytes). |
input_throughput |
Long |
Upstream throughput (bytes). |
current_minute |
Long |
Current timestamp in UTC format. |
req_time |
String |
Request time. |
cycle |
String |
Period for query. |
roma_app_id |
String |
Integration application ID. |
provider |
String |
Project ID. |
register_time |
String |
Registration time. |
status |
Integer |
Status:
Reserved field, not supported yet. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
None
Example Responses
Status code: 200
OK
{ "code" : "APIG.0000", "start_time" : 1599112186, "end_time" : 1599616186, "list" : [ { "current_minute" : 1599552000, "max_latency" : 0, "avg_latency" : 0, "max_inner_latency" : 0, "avg_inner_latency" : 0, "max_backend_latency" : 0, "avg_backend_latency" : 0, "req_count" : 5, "req_count2xx" : 0, "req_count4xx" : 0, "req_count5xx" : 5, "req_count_error" : 5, "output_throughput" : 1695, "input_throughput" : 2990, "req_time" : "" } ] }
Status code: 400
Bad Request
{ "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:api_id. Please refer to the support documentation" }
Status code: 401
Unauthorized
{ "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" }
Status code: 403
Forbidden
{ "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" }
Status code: 404
Not Found
{ "error_code" : "APIG.3002", "error_msg" : "API 39bce6d25a3f470e8cf7b2c97174f7d9 does not exist" }
Status code: 500
Internal Server Error
{ "error_code" : "APIG.9999", "error_msg" : "System error" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Error Codes
See Error Codes.
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