Get requests stats
Get requests stats for last 24 hours
averageRequestsPerSecond and peakRequestsPerSecond would countain 1440 values corresponding to now - 1440 minutes until now - 1 minute.
A value of -1 would mean that there is no data for that minute.
GET
/appid-{appId}/requests/statsAuthorization
api-keyAPI key · headerrequiredThe core service API token. If you are using a self-hosted core service and you have not generated a token, you can omit the header.
Header parameters
cdi-versionstringX.Y of the X.Y.Z CDI version.
Responses
200The operation was successful
statusstatusOKAllowed:
OKatMinutenumberaverageRequestsPerSecondnumber[]peakRequestsPerSecondnumber[]400error code 400
string401error code 401
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Request
curl -X GET "/appid-{appId}/requests/stats" \
-H "api-key: YOUR_API_KEY"const response = await fetch("/appid-{appId}/requests/stats", {
method: "GET",
headers: {
"api-key": "YOUR_API_KEY"
}
});import requests
response = requests.get(
"/appid-{appId}/requests/stats",
headers={
"api-key": "YOUR_API_KEY"
},
)Response
{
"status": "OK",
"atMinute": 16382348,
"averageRequestsPerSecond": [
10.5
],
"peakRequestsPerSecond": [
20
]
}"string""Invalid API key""Not Found""Internal Error"