-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] [control plane] api activity statistics diagram #19
Comments
* KRAKEN-76: standard API mapping * fix error and code smell * correct style
Get API requests stats url - /products/{productId}/envs/{env}/statistics/api-activity-requests?requestStartTime={date}&requestEndTime={date} curl --location --request GET 'http://localhost:8001/products/mef.sonata/envs/2fd92244-a8d1-43fc-b76d-d87ffb0172f4/statistics/api-activity-requests?requestStartTime=2024-10-17T00%3A00%3A00%2B02%3A00&requestEndTime=2024-10-21T00%3A00%3A00%2B02%3A00' \
--header 'Authorization: Bearer XXX' response {
"code": 200,
"message": "OK",
"data": {
"requestStatistics": [
{
"date": "2024-10-17",
"success": 388,
"error": 620
},
{
"date": "2024-10-18",
"success": 357,
"error": 651
},
{
"date": "2024-10-19",
"success": 393,
"error": 615
}
]
}
} |
Get error statistics url - /products/{productId}/envs/{env}/statistics/error-requests?requestStartTime={date}&requestEndTime={date} curl --location --request GET 'http://localhost:8001/products/mef.sonata/envs/2fd92244-a8d1-43fc-b76d-d87ffb0172f4/statistics/error-requests?requestStartTime=2024-10-17T00%3A00%3A00%2B02%3A00&requestEndTime=2024-10-21T00%3A00%3A00%2B02%3A00' \
--header 'Authorization: Bearer XXX' response {
"code": 200,
"message": "OK",
"data": {
"errorBreakdowns": [
{
"date": "2024-10-17",
"errors": {
"400": 237,
"401": 229,
"404": 24,
"500": 130
}
},
{
"date": "2024-10-18",
"errors": {
"400": 228,
"401": 229,
"404": 24,
"500": 170
}
}
]
}
} |
Get most popular endpoints url - /products/{productId}/envs/{env}/statistics/most-popular-endpoint?requestStartTime={date}&requestEndTime={date} curl --location --request GET 'http://localhost:8001/products/mef.sonata/envs/2fd92244-a8d1-43fc-b76d-d87ffb0172f4/statistics/most-popular-endpoint?requestStartTime=2024-10-17T00%3A00%3A00%2B02%3A00&requestEndTime=2024-10-21T00%3A00%3A00%2B02%3A00' \
--header 'Authorization: Bearer XXX' response {
"code": 200,
"message": "OK",
"data": {
"endpointUsages": [
{
"method": "GET",
"endpoint": "/mefApi/sonata/order/789",
"usage": 459,
"popularity": 11.38
},
{
"method": "GET",
"endpoint": "/mefApi/sonata/product/825",
"usage": 306,
"popularity": 7.58
},
{
"method": "GET",
"endpoint": "/mefApi/sonata/product/789",
"usage": 306,
"popularity": 7.58
},
{
"method": "POST",
"endpoint": "/mefApi/sonata/order/789",
"usage": 288,
"popularity": 7.14
},
{
"method": "GET",
"endpoint": "/mefApi/sonata/geographicAddressManagement/v7/geographicAddress/825",
"usage": 255,
"popularity": 6.32
},
{
"method": "GET",
"endpoint": "/mefApi/sonata/order/825",
"usage": 204,
"popularity": 5.05
},
{
"method": "POST",
"endpoint": "/mefApi/sonata/product/825",
"usage": 192,
"popularity": 4.76
}
]
}
} |
Hi @KsiBart example
response {
"code": 200,
"message": "OK",
"data": {
"requestStatistics": [
{
"date": "2024-11-01",
"error": 12
},
{
"date": "2024-11-04",
"error": 3
},
{
"date": "2024-11-05",
"error": 1
},
{
"date": "2024-11-06",
"success": 2
},
{
"date": "2024-11-07",
"success": 1,
"error": 38
},
{
"date": "2024-11-08",
"success": 54,
"error": 30
},
{
"date": "2024-11-09",
"success": 62,
"error": 6
},
{
"date": "2024-11-10",
"success": 2,
"error": 4
},
{
"date": "2024-11-11",
"success": 11,
"error": 21
},
{
"date": "2024-11-12",
"success": 11,
"error": 6
}
]
}
} |
BE need to handle the data without status code - put them into error group |
a/c:
The text was updated successfully, but these errors were encountered: