Skip to main content

Get List of Votes for a Specific Post

This endpoint retrieves all votes (with the relative reactions) for a specific post

info

This operation requires authentication only if content_availability community option is false.

HTTP Request

GET /api/v2/post/{id}/vote/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this post.
limitqueryintegerfalseNumber of results to return per page.
offsetqueryintegerfalseThe initial index from which to return the results.
reactionqueryintegerfalseFilter votes using the unique integer value identifying a specific Reaction

Example Request

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

fetch('/api/v2/post/{id}/vote/',
{
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
» countintegertruenoneTotal results count
» nextstring¦nullfalsenoneNext page url
» previousstring¦nullfalsenonePrevious page url
» resultslist(Vote)truenoneList of results

Example responses

{
"count": "integer",
"next": "string(uri)",
"previous": "string(uri)",
"results": [{Vote}]
}