Skip to main content

Get All Scores

This endpoint retrieves all users scores.

info

This operation requires admin or moderation role.

HTTP Request

GET /api/v2/score/

Parameters

NameInTypeRequiredDescription
limitqueryintegerfalseNumber of results to return per page.
offsetqueryintegerfalseThe initial index from which to return the results.
searchquerystringfalseA search term.
user_idquerystringfalseThe id of a specific user
orderingquerystringfalseWhich field to use when ordering the results.

Example Request

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

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

Responses

StatusMeaningDescriptionSchema
200OKnoneInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» countintegerfalsenonenone
» nextstring(uri)¦nullfalsenonenone
» previousstring(uri)¦nullfalsenonenone
» results[Score]falsenonenone

Example responses

{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": 0,
"user": {
"id": 0,
"username": "string",
"real_name": "string",
"email": "user@example.com",
"description": "string",
"avatar": "string",
"reputation": 0
},
"score": "string",
"reputation_type": 1,
"reputation_type_description": "string",
"comment": "string"
}
]
}