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": "2022-11-01",
    "endDate": "2022-12-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": "2022-11-01",
    "endDate": "2022-12-01",   
    "groupByPeriod": "month", 
    "results": [
        {
            "type": "bookmarks",
            "periods": [
                {
                    "periodStartDate": "2022-11-01",
                    "periodEndDate": "2022-12-01",
                    "count": 474
                }
            ]
        },
        {
            "type": "personalBooks",
            "periods": [
                {
                    "periodStartDate": "2022-11-01",
                    "periodEndDate": "2022-12-01",
                    "count": 92
                }
            ]
        }
    ]
}
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.