Contents
On this page
Get Exam - Plugixa Exam
GET /plugixa-exam/v1/exams/{id}
Read one exam with everything that makes it up: its settings, its sections, the questions placed in fixed sections and the draw rules of pool sections.
Scope exams:read; the token’s user needs the exams:view permission.
Request
GET https://your-site.example/wp-json/plugixa-exam/v1/exams/7
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The exam’s id |
Responses
200 OK. data is the exam.
{
"success": true,
"data": {
"id": 7,
"title": "Algebra Midterm",
"slug": "algebra-midterm",
"description": "Linear equations and inequalities.",
"intro": "<p>You have 45 minutes. Calculators are allowed.</p>",
"subject_id": 12,
"time_limit": 45,
"max_attempts": 2,
"cooldown_minutes": 60,
"open_from": "2026-11-16 08:00:00",
"open_until": "2026-11-20 18:00:00",
"pass_mark": 65,
"shuffle_questions": true,
"shuffle_options": false,
"access_type": "code",
"access_level": null,
"result_release": "after_close",
"release_at": null,
"show_answers": true,
"pass_message": "<p>Well done, you passed.</p>",
"fail_message": "",
"lock_policy": "auto",
"attempt_mode": "exam",
"practice_reveal": "on_submit",
"layout": "one_per_page",
"review_before_submit": true,
"allow_early_finish": true,
"fullscreen_mode": "off",
"require_answer": "off",
"allow_pause": false,
"max_pauses": 0,
"max_pause_minutes": 0,
"auto_close_action": "submit",
"idle_timeout_minutes": 1440,
"window_close_action": "close",
"auto_close_held": false,
"auto_close_time_spent": "capped",
"auto_close_notify": "auto",
"track_integrity": true,
"certificate_template_id": 0,
"settings": null,
"custom_fields": null,
"published": true,
"created_at": "2026-11-12 09:30:00",
"modified_at": "2026-11-12 10:15:00",
"created_by": 1,
"modified_by": 1,
"deleted_at": null,
"sections": [
{
"id": 21,
"exam_id": 7,
"title": "Part A",
"description": "",
"ordering": 1,
"section_type": "fixed",
"points_per_question": null,
"questions": [
{ "id": 101, "exam_id": "7", "section_id": 21, "question_id": 41, "ordering": 1, "points": null },
{ "id": 102, "exam_id": "7", "section_id": 21, "question_id": 42, "ordering": 2, "points": 2 }
],
"rules": []
},
{
"id": 22,
"exam_id": 7,
"title": "Part B",
"description": "",
"ordering": 2,
"section_type": "pool",
"points_per_question": 1,
"questions": [],
"rules": [
{
"id": 9,
"section_id": 22,
"subject_id": 15,
"difficulty": null,
"question_type": "mcq_single",
"draw_count": 5,
"points_per_question": null,
"tag_ids": []
}
]
}
],
"has_access_code": true
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The exam’s id |
data.time_limit |
integer |
Minutes, 0 for an untimed exam |
data.open_from |
string|null |
UTC datetime the exam opens |
data.open_until |
string|null |
UTC datetime the exam closes |
data.pass_mark |
number |
Percent needed to pass |
data.access_type |
string |
Who may sit the exam. The values are listed on Create Exam |
data.result_release |
string |
When people see their result |
data.settings |
object|null |
Extra per-exam flags, such as an LMS course link |
data.custom_fields |
object|null |
Custom field values PRO |
data.published |
boolean |
Whether the exam is published |
data.sections[].ordering |
integer |
Position of the section, from 1 |
data.sections[].section_type |
string |
fixed lists its questions, pool draws them by rules |
data.sections[].questions |
object[] |
Questions placed in a fixed section, in order. points is null when the question keeps its own points. exam_id arrives as a string here |
data.sections[].rules |
object[] |
Draw rules of a pool section: subject_id, difficulty and question_type are null when the rule does not filter on them |
data.has_access_code |
boolean |
Whether an access code is set. The code itself is never returned |
Section, question-placement and rule ids change every time the sections are saved, so do not store them.
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_exam_not_found |
No exam has this id, or the exam is in the trash. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-exam/v1/exams/7" \
-H "Authorization: Bearer $PLUGIXA_EXAM_TOKEN"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/exams/7');
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/exams/7', {
headers: {
'Authorization': `Bearer ${process.env.PLUGIXA_EXAM_TOKEN}`,
},
});
const { data } = await response.json();
Quick Links
Share