Contents
On this page
Delete Tag - Plugixa Exam
DELETE /plugixa-exam/v1/tags/{id}
Take a tag off every question that carries it, then move the tag to the trash.
Scope questions:delete; the token’s user needs the questions:delete permission.
The Tags app must be on in Plugixa Exam -> App Manager. With it off, this endpoint answers 404 rest_no_route.
Note. The tag is removed from its questions before it is trashed, so those questions stop matching any exam pool rule that filters on it.
Request
DELETE https://your-site.example/wp-json/plugixa-exam/v1/tags/9
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The tag’s id |
Responses
200 OK. The tag is detached and in the trash.
{
"success": true,
"data": {
"deleted": true
}
}
| Field | Type | Meaning |
|---|---|---|
data.deleted |
boolean |
Always true |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_exam_not_found |
No tag with that id, or the tag is already in the trash. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/plugixa-exam/v1/tags/9" \
-H "Authorization: Bearer $PLUGIXA_EXAM_TOKEN"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/tags/9');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('PLUGIXA_EXAM_TOKEN'),
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-exam/v1/tags/9', {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${process.env.PLUGIXA_EXAM_TOKEN}`,
},
});
const { data } = await response.json();
Quick Links
Share