Contents
On this page

Get Question Version - Plugixa Exam

GET /plugixa-exam/v1/questions/{id}/versions/{version}

Read one saved version of a question, with the full snapshot of the question at that version.

Not reachable with an API token: since 1.4.1 a token request to this route answers 403 plugixa_exam_token_route. Call it as a signed-in WordPress user (from a script, with an Application Password) who holds the questions:view permission. It needs Plugixa Exam Pro with the Version history app on in Plugixa Exam -> App Manager: with the app off, the route answers 404.

Request

GET https://your-site.example/wp-json/plugixa-exam/v1/questions/12/versions/2

Path parameters

Name Type Description
id integer The question’s id
version integer The version number, as in version on Get Question History

Responses

200 OK. data is the saved version.

{
  "success": true,
  "data": {
    "id": 205,
    "version": 2,
    "created_at": "2026-11-12 09:30:00",
    "created_by": "1",
    "snapshot": {
      "title": "Capital of France",
      "stem": "<p>What is the capital of France?</p>",
      "explanation": "<p>Paris is the capital of France.</p>",
      "answer_key": { "negative_marking": false, "min_score": 0 },
      "rubric": 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 }
      ]
    }
  }
}
Field Type Meaning
data.id integer The id of this saved version
data.version integer The question’s version number
data.created_at string UTC datetime the version was saved
data.created_by string WordPress user id of whoever saved it. A string here, not an integer
data.snapshot object The question at that version: title, stem, explanation, answer_key, rubric and options

The item has the same shape as one entry of List Question Versions.

Errors

Status Code When
404 plugixa_exam_not_found That question has no such version.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-exam/v1/questions/12/versions/2" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/questions/12/versions/2');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Basic ' . base64_encode(getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD')),
    ],
]);
$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/versions/2', {
  headers: {
    'Authorization': 'Basic ' + btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share