Retrieve Content Activity Analytics

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

Log in to see full request history

/services/v2/analytics/content.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 content activity request:

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

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

ActionVerb (Type Name)Description
AskActionaskA user asked a new question.
AnswerActionanswerA user has posted a new answer to a question.
CommentActioncommentedA user has posted a new comment on a node.
AcceptNodeActionacceptedA node sent for moderation has been accepted for publishing.
DeleteActiondeletedA node has been deleted.
CloseNodeActionclosedA question has been closed.

Sample Requests

cURL Example 1:
A GET retrieve content activity analytics request sent to
https://apidocs.cloud.answerhub.com with a date range from 1/14/19 to 1/15/19 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/content.json?fromDate=1/14/19&toDate=1/15/19"

cURL Example 2:
A GET retrieve content activity analytics request sent to
https://apidocs.cloud.answerhub.com with a date range from 1/30/19 to 2/15/19 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/content.json?fromDate=1/30/19&toDate=2/15/19

Sample Responses

Successful Response:

  • HTTP Status 200 - OK
{ "actionsAnalytics": { "actions": [ { "type": "AskAction", "verb": "Questions Asked", "count": 8 }, { "type": "AnswerAction", "verb": "Answers To Questions", "count": 7 }, { "type": "CommentAction", "verb": "Comments Made", "count": 12 }, { "type": "AcceptNodeAction", "verb": "Answers Accepted", "count": 2 }, { "type": "DeleteAction", "verb": "Content Deleted", "count": 6 }, { "type": "CloseNodeAction", "verb": "Questions Closed", "count": 9 } ] } }
{ "actionsAnalytics": { "actions": [ { "type": "AskAction", "verb": "Questions Asked", "count": 7 }, { "type": "AnswerAction", "verb": "Answers To Questions", "count": 2 }, { "type": "CommentAction", "verb": "Comments Made", "count": 7 }, { "type": "AcceptNodeAction", "verb": "Answers Accepted", "count": 1 }, { "type": "DeleteAction", "verb": "Content Deleted", "count": 6 }, { "type": "CloseNodeAction", "verb": "Questions Closed", "count": 9 } ] } }
Query Params
string
Defaults to 1/14/19
string
Defaults to 1/15/19
Responses

Language
Credentials
:
Click Try It! to start a request and see the response here! Or choose an example:
application/json