This web service responds with the number of users (total and authenticated) who accessed the portal or a public API during the selected period.
Method | Endpoint |
---|---|
POST |
/analytics/api/v1/traffic/user-activity |
Request example
The following lines show an example of a JSON request body:
{
"startDate": "2024-01-01",
"endDate": "2024-05-01",
"groupByPeriod": "month"
}
Field | Type | Required? | Description |
---|---|---|---|
startDate |
String | Yes | Expects the inclusive start date. Can be any date in the past 13 months. Must follow the accepted format. |
endDate |
String | Yes | Expects the exclusive end date. Must follow the accepted format and be after the start date. |
groupByPeriod |
String | Yes | Expects the period by which to group user activity. Valid values are month , week , and day . |
Response body
The following lines show an example of a JSON response body:
{
"startDate": "2024-01-01",
"endDate": "2024-05-01",
"groupByPeriod": "month",
"results": [
{
"realm": "internal",
"periods": [
{
"periodStartDate": "2024-01-01",
"periodEndDate": "2024-02-01",
"activeCount": 41,
"totalCount": 191
},
{
"periodStartDate": "2024-02-01",
"periodEndDate": "2024-03-01",
"activeCount": 40,
"totalCount": 200
},
{
"periodStartDate": "2024-03-01",
"periodEndDate": "2024-04-01",
"activeCount": 41,
"totalCount": 203
},
{
"periodStartDate": "2024-04-01",
"periodEndDate": "2024-05-01",
"activeCount": 69,
"totalCount": 234
}
]
},
{
"realm": "ldap",
"periods": [
{
"periodStartDate": "2024-01-01",
"periodEndDate": "2024-02-01",
"activeCount": 0,
"totalCount": 20
},
{
"periodStartDate": "2024-02-01",
"periodEndDate": "2024-03-01",
"activeCount": 0,
"totalCount": 20
},
{
"periodStartDate": "2024-03-01",
"periodEndDate": "2024-04-01",
"activeCount": 0,
"totalCount": 19
},
{
"periodStartDate": "2024-04-01",
"periodEndDate": "2024-05-01",
"activeCount": 0,
"totalCount": 19
}
]
}
]
}
The data is based on the number of HTTP requests by authenticated users through browsers or the API.
Field | Type | Description |
---|---|---|
startDate |
String | The inclusive start date. |
endDate |
String | The exclusive end date. |
realm |
String | The realm to which the users belong. |
periods |
Array | An array containing the data grouped by the selected period. |
periodStartDate |
String | The inclusive start date of the period. |
periodEndDate |
String | The exclusive end data of the period. |
activeCount |
Number | The number of authenticated users who accessed the portal or a public API during the period for the realm. |
totalCount |
Number | The total number of users registered during the period for the realm. |
Return code | Description |
---|---|
200 OK |
The request is valid and data was returned. |
400 BAD REQUEST |
One or more required parameters is missing. |
401 UNAUTHORIZED |
The authorization header was not provided or is invalid. |
403 FORBIDDEN |
The user or API key does not have the ADMIN or ANALYTICS_USER role. |