Skip to main content

Get Contribution's Insight Counters

This endpoint retrieves a specific contribution's insight counters.

HTTP Request

GET /api/v2/insight/contribution/counters/

Parameters

NameInTypeRequiredDescription
category_idpathstringfalseCan be a single category id or list (comma separated) of categories ids. 0 means empty (no category)
created_at__gtepathstring(date-time)falseDatetime of creation(greater than or equal to the given value)
created_at__ltepathstring(date-time)falseDatetime of creation(less than or equal to the given value)
contribution_idpathstringfalseThe contribution id

Example Request

const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/insight/contribution/counters/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
num_viewsintegerfalsenoneThe number of views
num_commentsintegerfalsenoneThe number of comments
num_votesintegerfalsenoneThe number of votes
num_sharesintegerfalsenoneThe number of shares

Example responses

{
"num_views": "integer",
"num_comments": "integer",
"num_votes": "integer",
"num_shares": "integer"
}