User assets - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service responds with the number and types of assets that authenticated users created during a period of time.

Method Endpoint
POST /analytics/api/v1/users/assets/time-report

Request example

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

{
    "startDate": "2024-01-01",
    "endDate": "2024-05-01",
    "groupByPeriod": "month",
    "filters": {
        "type": ["bookmarks", "personalBooks"]
    }
}
Field Type Required? Description
startDate String Yes Expects the inclusive start date. Can be any date within 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 assets. Can be day, week or month.
filters Object No An array containing the type field. If this field is absent or undefined, the web service returns data for all types
    type String No The type of user assets to return. Can be bookmarks, personalBooks, personalTopics, savedSearches, savedSearchesWithAlert, and collections. If this field is absent or undefined, the web service returns data for all types.
Return code Description
200 OK The request is valid and data was returned.
400 BAD REQUEST One or more of the 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.

For a comprehensive list of all possible return codes, see Return codes.

Response body

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

{
    "startDate": "2024-01-01",
    "endDate": "2024-05-01",
    "results": [
        {
            "type": "bookmarks",
            "periods": [
                {
                    "periodStartDate": "2024-01-01",
                    "periodEndDate": "2024-02-01",
                    "count": 222
                },
                {
                    "periodStartDate": "2024-02-01",
                    "periodEndDate": "2024-03-01",
                    "count": 222
                },
                {
                    "periodStartDate": "2024-03-01",
                    "periodEndDate": "2024-04-01",
                    "count": 231
                },
                {
                    "periodStartDate": "2024-04-01",
                    "periodEndDate": "2024-05-01",
                    "count": 234
                }
            ]
        },
        {
            "type": "personalBooks",
            "periods": [
                {
                    "periodStartDate": "2024-01-01",
                    "periodEndDate": "2024-02-01",
                    "count": 162
                },
                {
                    "periodStartDate": "2024-02-01",
                    "periodEndDate": "2024-03-01",
                    "count": 167
                },
                {
                    "periodStartDate": "2024-03-01",
                    "periodEndDate": "2024-04-01",
                    "count": 167
                },
                {
                    "periodStartDate": "2024-04-01",
                    "periodEndDate": "2024-05-01",
                    "count": 191
                }
            ]
        }
    ]
}
Field Type Description
startDate String The inclusive start date.
endDate String The exclusive end date.
groupByPeriod String The period by which results are grouped.
results Array An array containing the type and periods fields.
    type String The type of user assets returned. Can be bookmarks, personalBooks, personalTopics, savedSearches, savedSearchesWithAlert, and collections.
    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 date of the period.
        count Number The number of assets of this type that users created during the selected period.