Querying Top N Metrics of All Integration Applications
Function
This API is used to query the top N metrics values of all integration applications within the statistical period. The master account permission is required.
If you have any questions related to the restriction, contact technical support.
URI
GET /v2/{project_id}/apic/instances/{instance_id}/statistics/roma-app-usages
|
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 |
|---|---|---|---|
|
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.
|
|
top_roma_app_num |
No |
Integer |
The top integration applications. |
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). |
|
app_req_count |
Array of AppRequestStatisticInfo objects |
Top N number of API calling requests from applications. |
|
app_req_count_error |
Array of AppRequestErrorStatisticInfo objects |
Top N statistics about application request errors. |
|
app_input_throughput |
Array of AppInputStatisticInfo objects |
Top N uplink throughput of API calling requests sent by applications. |
|
app_output_throughput |
Array of AppOutputStatisticInfo objects |
Top N statistics about the downlink throughput of application requests. |
|
app_avg_latency |
Array of AppAvgLatencyInfo objects |
Top N average delay of API calling requests sent by applications. |
|
app_avg_backend_latency |
Array of AppAvgBackendLatencyInfo objects |
TOP_n statistics about the average backend latency of application requests. |
|
Parameter |
Type |
Description |
|---|---|---|
|
app_id |
String |
Application ID. |
|
app_name |
String |
Application name. |
|
req_count |
Integer |
Total number of requests. |
|
Parameter |
Type |
Description |
|---|---|---|
|
app_id |
String |
Application ID. |
|
app_name |
String |
Application name. |
|
req_count_error |
Integer |
Number of request errors. |
|
Parameter |
Type |
Description |
|---|---|---|
|
app_id |
String |
Application ID. |
|
app_name |
String |
Application name. |
|
input_throughput |
Long |
Total uplink throughput. |
|
Parameter |
Type |
Description |
|---|---|---|
|
app_id |
String |
Application ID. |
|
app_name |
String |
Application name. |
|
output_throughput |
Long |
Total downlink throughput. |
|
Parameter |
Type |
Description |
|---|---|---|
|
app_id |
String |
Application ID. |
|
app_name |
String |
Application name. |
|
avg_latency |
Float |
Average latency. |
|
Parameter |
Type |
Description |
|---|---|---|
|
app_id |
String |
Application ID. |
|
app_name |
String |
Application name. |
|
avg_backend_latency |
Float |
Average backend latency. |
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" : 1599508511,
"end_time" : 1599616511,
"app_req_count" : [ {
"app_id" : "1a7b421c-6103-4fcb-a0d7-3e322e863cb0",
"app_name" : "ycs-product",
"req_count" : 5
} ],
"app_req_count_error" : [ {
"app_id" : "1a7b421c-6103-4fcb-a0d7-3e322e863cb0",
"app_name" : "ycs-product",
"req_count" : 5
} ],
"app_input_throughput" : [ {
"app_id" : "1a7b421c-6103-4fcb-a0d7-3e322e863cb0",
"app_name" : "ycs-product",
"input_throughput" : 2990
} ],
"app_output_throughput" : [ {
"app_id" : "1a7b421c-6103-4fcb-a0d7-3e322e863cb0",
"app_name" : "ycs-product",
"output_throughput" : 1695
} ],
"app_avg_latency" : [ {
"app_id" : "1a7b421c-6103-4fcb-a0d7-3e322e863cb0",
"app_name" : "ycs-product",
"avg_latency" : 0
} ],
"app_avg_backend_latency" : [ {
"app_id" : "1a7b421c-6103-4fcb-a0d7-3e322e863cb0",
"app_name" : "ycs-product",
"avg_backend_latency" : 0
} ]
}
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.