Skip to main content

Search a Score

This endpoint performs search to user scores.

info

This operation requires admin or moderation role.

HTTP Request

GET /api/v2/score/search/

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/search/',
{
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(Score)falsenoneList of results

Example responses

{
"count": "integer",
"next": "string(uri)",
"previous": "string(uri)",
"results": [
{
"id": "integer",
"user": {
"id": "integer",
"username": "string",
"real_name": "string",
"email": "string",
"description": "string",
"avatar": "string",
"reputation": "integer"
},
"score": "string",
"reputation_type": "integer",
"reputation_type_description": "string",
"comment": "string"
}
]
}