Retrieve User Activity Analytics

You can use this API request to retrieve analytics related to users' activities on the AnswerHub platform.

/services/v2/analytics/user.json

🚧

Permissions & Notes:

  • You must have the View analytics permission under Site Administration Roles in the Advanced Editor.

  • If you use both the fromDate and toDate parameters, the request will be for all information between those dates.

  • We added this request in version 1.6.3.

You can use the following parameters in your retrieve user activity analytics request:

Analytics Common: period, rate, fromDate, toDate
Analytics Action: activity, histogram

The system considers the following action types, user activities, for the purpose of this request:

ActionVerb (Type Name)Description
AwardActionawardedA badge was awarded to a user.
SuspendUserActionsuspendedEither a moderator or administrator suspended a user (usually for violating site use policy).
UserJoinsActionjoinedA new user registered in the system and the system created a new account for them.

Sample Request

A GET retrieve user activity analytics request sent to
https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X GET "https://apidocs.cloud.answerhub.com/services/v2/analytics/user.json?fromDate=1/14/19&toDate=1/15/19"

Sample Response

Successful Response:

  • HTTP Status 200 - OK
{
    "actionsAnalytics": {
        "actions": [
            {
                "type": "UserJoinsAction",
                "verb": "Users Joined",
                "count": 8
            },
            {
                "type": "AwardAction",
                "verb": "",
                "count": 0
            },
            {
                "type": "SuspendUserAction",
                "verb": "Users Suspended",
                "count": 2
            }
        ]
    }
}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!