User activity - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service responds with the number of authenticated users who accessed the portal or a public API during the selected period.

Method Endpoint
POST /analytics/api/v1/traffic/user-activity
Field Type Required? Description
startDate Date Yes Expects the inclusive start date. Can be any date in the past 13 months. Must follow the accepted format.
endDate Date 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".

Request example

The following lines show an example of a JSON request body:

{
    "startDate": "2022-11-01",
    "endDate": "2022-12-01",
    "groupByPeriod": "month"
}

Data is available on the two previous years.

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.

Response body

The following lines show an example of a JSON response body:

{
    "startDate": "2022-11-01",
    "endDate": "2022-12-01",   
    "groupByPeriod": "month", 
    "results": [
        {
            "realm": "internal",
            "periods": [
                {
                    "periodStartDate": "2022-11-01",
                    "periodEndDate": "2022-12-01",
                    "activeCount": 24,
                    "totalCount": 218
                }
            ]
        },
        {
            "realm": "ldap",
            "periods": [
                {
                    "periodStartDate": "2022-11-01",
                    "periodEndDate": "2022-12-01",
                    "activeCount": 42,
                    "totalCount": 171
                }
            ]
        }
    ]
}
Field Type Description
startDate Date The inclusive start date.
endDate Date 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 Date The inclusive start date of the period.
        periodEndDate Date The exclusive end data of the period.
        activeCount Integer The number of authenticated users who accessed the portal or a public API during the period for the realm.
        totalCount Integer The total number of users registered during the period for the realm.