Contents
On this page

List Question Versions - Plugixa Exam

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

List every saved version of a question, newest first, each with a 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.

Note. The question is not checked to exist: an unknown id answers 200 with an empty list, not 404. The list is not paged. For a lighter list without the snapshots, see Get Question History PRO.

Request

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

Path parameters

Name Type Description
id integer The question’s id

Responses

200 OK. data is the question’s versions, newest first.

{
  "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 }
        ]
      }
    },
    {
      "id": 198,
      "version": 1,
      "created_at": "2026-11-10 14:05:00",
      "created_by": "1",
      "snapshot": {
        "title": "Capital city of France",
        "stem": "<p>What is the capital of France?</p>",
        "explanation": "",
        "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 }
        ]
      }
    }
  ]
}
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.title string The title at that version
data[].snapshot.stem string The question text, HTML
data[].snapshot.explanation string The explanation, HTML
data[].snapshot.answer_key object|null The answer key
data[].snapshot.rubric object[]|null The rubric
data[].snapshot.options object[] The options, in the same shape as on Get Question

Errors

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share