Skip to main content

Get All Flagged Contributions

This endpoint retrieves all flagged contributions

info

This operation requires moderation role.

HTTP Request

GET /api/v2/moderation/contribution/

Parameters

NameInTypeRequiredDescription
min_flagsqueryintegerfalseMinimum number of flags received by a contribute to display it in this list
contribution_typequerystringfalseValid values are: post, discussion, status, comment
contribution_idquerystringfalseA unique integer value identifying this Contribution
authorquerystringfalseUsername (or part of it) of the contributes' author
flagged_byquerystringfalseUsername (or part of it) of the contributes' flagger
contentquerystringfalseContent text (or part of it) of the contributes
moderation_statusquerystringfalseModeration status of the contributes flagged
limitqueryintegerfalseNumber of results to return per page
offsetqueryintegerfalseThe initial index from which to return the results
order_byquerystringfalseDefault ordering is: -last_flagged_at. Other valid fields are: flag_count, last_moderated_at

Enumerated Values

PropertyValue
moderation_statusignored
moderation_statusdeleted
moderation_statushidden
moderation_statusopen
order_byflag_count
order_by-flag_count
order_bylast_moderated_at
order_by-last_moderated_at"
order_bylast_flagged_at
order_by-last_flagged_at

Example Request

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

fetch('/api/v2/moderation/contribution/',
{
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
» countintegerfalsenoneTotal results count
» nextstring(uri)¦nullfalsenoneNext page url
» previousstring(uri)¦nullfalsenonePrevious page url
» resultslist(Flagged Contribution)falsenoneList of results

Example responses

{
"count": "integer",
"next": "string(uri)",
"previous": "string(uri)",
"results": [
{
"contribution_type": "string",
"contribution": {
"id": "integer",
"author": {ModerationUser},
"added_at": "string",
"categories": [
{
"id": "integer,
"name": "string",
"slug": "string"
}
],
"title": "string",
"html": "string",
"summary": "string",
"deleted": "boolean",
"collapsed": "boolean",
"parent": "integer",
"in_reply_to": "integer",
"comment_count": "integer",
"vote_count": "integer",
"reactions_count": [{Reaction}],
"flag_count": "integer",
"flag_count_detail": {
"1": "integer",
"2": "integer",
"3": "integer",
"4": "integer",
"0": "integer"
},
"media_count_detail": {},
"share_count": "integer",
"has_poll": "boolean",
"thread_id": "integer",
"thread_type": "string",
"thread_slug": "string"
},
"last_flagged_at": "string",
"moderation_status": "string",
"moderation_type": "string",
"moderation_by": {User},
"moderation_at": "string"
}
]
}