Retrieve Action Analytics

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

/services/v2/analytics/actions.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 action analytics request:

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

We consider the following action types, action activities, for the purpose of this request:

ActionVerb (Type Name)Description
QuestionViewActionviewedA user has viewed/visited a question.
VoteDownActionvotedA node was down-voted.
VoteUpActionvotedA node was up-voted.

Sample Request

A GET retrieve action 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/actions.json"

Sample Response

{
    "actions": [
        {
            "type": "NodeViewAction",
            "verb": "Viewed Posts",
            "count": 6
        },
        {
            "type": "VoteDownAction",
            "verb": "Down Votes",
            "count": 0
        },
        {
            "type": "VoteUpAction",
            "verb": "Up Votes",
            "count": 0
        }
    ]
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!