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 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": "2022-11-01",
    "endDate": "2022-12-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": "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
                }
            ]
        }
    ]
}

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.