Unassign a Tag
This endpoint unassigns a tag to a user or to a category.
info
This operation requires admin role.
HTTP Request
POST /api/v2/tag/{id}/assign/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | A unique integer value identifying this tag |
user | body | integer | false | A unique integer value identifying the user |
category | body | integer | false | A unique integer value identifying the category |
contribution | body | integer | false | A unique integer value identifying the contribution |
One between "user", "category" and "contribution" need to be passed to this endpoint.
Example Body Parameters
- JSON
{
"user": "integer"
}
Example Request
- JavaScript
- Bash
const inputBody = '{
"user": "integer"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/tag/{id}/assign/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X POST /api/v2/tag/{id}/assign/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
--DATA '{body}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Response status code | None |