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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| search | query | string | false | A search term |
| status | query | string | false | Valid values are: a, b, d, u |
| days_blocked | query | string | false | "days" or "forever" |
| limit | query | integer | false | Number of results to return per page |
| offset | query | integer | false | The initial index from which to return the results |
| order_by | query | string | false | Default ordering is: -date_joined. Other valid fields are: expire_at, blocked_at |
Enumerated Values
| Property | Value | Description |
|---|---|---|
| status | a | active |
| status | b | blocked |
| status | d | deleted |
| status | u | unregistered (hard deleted user) |
Example Request
- JavaScript
- Bash
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);
});
# You can also use wget
curl -X GET /api/v2/moderation/user/ \
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Response status code | Inline |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » count | integer | false | none | Total results count |
| » next | string(uri)¦null | false | none | Next page url |
| » previous | string(uri)¦null | false | none | Previous page url |
| » results | [ModerationUser] | false | none | List of results |
Example responses
- 200
{
"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": {}
}
}
]
}