Skip to main content

Get All Flags for a Specific Contribution

This endpoint retrieves all flags for a specific contribution

info

This operation requires moderation role.

HTTP Request

GET /api/v2/moderation/contribution/{id}/flag/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this contribution
contribution_typebodystringtrueValid values are: post, discussion, status, comment
flag_typebodyintegerfalseFilter results by flag_type

Enumerated Values

ParameterValueDescription
flag_type0spam
flag_type1aggressive
flag_type2vulgar
flag_type3poor
flag_type4offtopic

Example Request

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

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

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeFlag

Example responses

{
"count": "integer",
"next": "string(uri)",
"previous": "string(uri)",
"results": [
{
"user": {User},
"added_at": "string",
"flag_type": "integer",
"flag_type_description": "string"
}
]
}