Skip to main content

Get All Users for Moderation

This endpoint retrieves all users for moderation purpose

info

This operation requires moderation role.

HTTP Request

GET /api/v2/moderation/user/

Parameters

NameInTypeRequiredDescription
searchquerystringfalseA search term
statusquerystringfalseValid values are: a, b, d, u
days_blockedquerystringfalse"days" or "forever"
limitqueryintegerfalseNumber of results to return per page
offsetqueryintegerfalseThe initial index from which to return the results
order_byquerystringfalseDefault ordering is: -date_joined. Other valid fields are: expire_at, blocked_at

Enumerated Values

PropertyValueDescription
statusaactive
statusbblocked
statusddeleted
statusuunregistered (hard deleted user)

Example Request

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

fetch('/api/v2/moderation/user/',
{
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
» results[ModerationUser]falsenoneList of results

Example responses

{
"count": "integer",
"next": "string(uri)",
"previous": "string(uri)",
"results": [
{
"...User": {},
"blocked_at": "string",
"days_blocked": "integer",
"expire_at": "string",
"last_seen": "string",
"flags_given": "integer",
"flags_received": "integer",
"last_score_variation": {
"score": "integer",
"comment": "string",
"reputed_at": "string",
"created_by": {}
}
}
]
}