Skip to main content

Search a Tag

This endpoint performs search to Tags.

info

This operation requires authentication and admin role.

HTTP Request

GET /api/v2/tag/search/

Parameters

NameInTypeRequiredDescription
limitqueryintegerfalseNumber of results to return per page
offsetqueryintegerfalseThe initial index from which to return the results
searchquerystringfalseA search term
typequerystringfalseOne of the following: 'user', 'category', 'contribution'
activequerystringfalseIf true, the tag is active
deletedquerystringfalseIf true, the tag has been deleted
visiblequerystringfalseIf true, this tag is publicly visible
visibility_boostquerystringfalseThe tag add a visibility boost
orderingquerystringfalseOrdering fields (eg: ?ordering=name,created_at), default is -created_at (minus char is used for descending ordering)

Example Request


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

fetch('/api/v2/tag/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(Tag)falsenoneList of results

Example responses

{
"count": "integer",
"next": "string(uri)",
"previous": "string(uri)",
"results": [
{
"id": "integer",
"type": "string",
"name": "string",
"description": "string",
"color": "string",
"visible": "boolean",
"visibility_boost": "boolean",
"created_at": "string",
"active": "boolean",
"deleted": "boolean"
}
]
}