Contents
Get Question - Plugixa Exam
GET /plugixa-exam/v1/questions/{id}
Read one question in full: its text, options, answer key, rubric and tags.
Scope questions:read; the token’s user needs the questions:view permission.
Request
GET https://your-site.example/wp-json/plugixa-exam/v1/questions/12
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The question’s id |
Responses
200 OK. data is the question.
{
"success": true,
"data": {
"id": 12,
"subject_id": 4,
"question_type": "mcq_single",
"title": "Capital of France",
"slug": "capital-of-france",
"stem": "<p>What is the capital of France?</p>",
"difficulty": 2,
"default_points": 1,
"answer_key": { "negative_marking": false, "min_score": 0 },
"explanation": "<p>Paris is the capital of France.</p>",
"shuffle_options": true,
"published": true,
"version": 3,
"approval_status": "approved",
"rubric": null,
"custom_fields": null,
"render_hint": null,
"created_at": "2026-11-10 14:05:00",
"modified_at": "2026-11-12 09:30:00",
"created_by": 1,
"modified_by": 1,
"deleted_at": null,
"options": [
{ "id": 41, "question_id": 12, "ordering": 1, "option_text": "Paris", "is_correct": true, "match_key": null, "feedback": null },
{ "id": 42, "question_id": 12, "ordering": 2, "option_text": "Lyon", "is_correct": false, "match_key": null, "feedback": null },
{ "id": 43, "question_id": 12, "ordering": 3, "option_text": "Marseille", "is_correct": false, "match_key": null, "feedback": null }
],
"tag_ids": [5, 8]
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The question’s id |
data.subject_id |
integer |
Its subject, 0 when it has none |
data.question_type |
string |
Type key, from List Question Types |
data.stem |
string |
The question text, HTML |
data.explanation |
string |
Shown after marking, HTML |
data.difficulty |
integer |
1 to 5 |
data.default_points |
number |
Points the question is worth by default |
data.answer_key |
object|null |
Marking rules; the shape depends on the type (see Create Question) |
data.shuffle_options |
boolean |
Whether options are shown in random order |
data.published |
boolean |
Whether the question is published |
data.version |
integer |
Starts at 1 and goes up by one on every update |
data.approval_status |
string |
draft or approved |
data.rubric |
object[]|null |
Marking criteria, each {key, label, max_points, description} |
data.custom_fields |
object|null |
PRO Custom field values, as the Custom fields app presents them |
data.render_hint |
object|null |
Display hints |
data.options |
object[] |
The options in order. Empty for types without options |
data.options[].option_text |
string |
HTML |
data.options[].is_correct |
boolean |
Whether the option is a correct answer |
data.options[].match_key |
string|null |
Pairing key, for module types that use it |
data.options[].feedback |
string|null |
Feedback for this option |
data.tag_ids |
integer[] |
Tag ids. Only present when the Tags app is on |
data.created_at |
string |
UTC datetime |
data.created_by |
integer |
WordPress user id of the author |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_exam_not_found |
No question with that id, or it is in the trash. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-exam/v1/questions/12" \
-H "Authorization: Bearer $PLUGIXA_EXAM_TOKEN"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/questions/12');
curl_setopt_array($ch, [
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/questions/12', {
headers: {
'Authorization': `Bearer ${process.env.PLUGIXA_EXAM_TOKEN}`,
},
});
const { data } = await response.json();
Quick Links
Share