Contents
On this page

Get Passage - Plugixa Exam

GET /plugixa-exam/v1/passages/{id}

Get one passage by its id.

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.

Needs Plugixa Exam Pro, with the Passages app on in Plugixa Exam -> App Manager.

Request

GET https://your-site.example/wp-json/plugixa-exam/v1/passages/7

Path parameters

Name Type Description
id integer The passage’s id

Responses

200 OK. data is the passage.

{
  "success": true,
  "data": {
    "id": 7,
    "title": "The lighthouse keeper",
    "body": "<p>For forty years the light on Gull Rock never failed.</p>",
    "transcript": "<p>Speaker: For forty years the light on Gull Rock never failed.</p>",
    "audio_name": "lighthouse-keeper.mp3",
    "audio_mime": "audio/mpeg",
    "audio_bytes": 2457600,
    "audio_seconds": 154,
    "audio_max_plays": 2,
    "audio_seek": false,
    "audio_pause": true,
    "published": true,
    "created_at": "2026-11-12 09:30:00",
    "modified_at": "2026-11-12 09:48:20",
    "created_by": 1,
    "modified_by": 1,
    "deleted_at": null,
    "question_count": 5,
    "has_audio": true,
    "audio_limit_mb": 64
  }
}
Field Type Meaning
data.id integer The passage’s id
data.title string Title
data.body string The text candidates read, as HTML
data.transcript string The recording’s transcript, as HTML
data.audio_name string File name of the recording, empty when there is none
data.audio_mime string audio/mpeg or audio/mp4, empty when there is none
data.audio_bytes integer Size of the recording
data.audio_seconds integer Length of the recording
data.audio_max_plays integer How many times a candidate may play it, 0 for no limit
data.audio_seek boolean Whether a candidate may skip around in the recording
data.audio_pause boolean Whether a candidate may pause a limited play. With no play limit, pausing is always allowed.
data.published boolean Whether the passage is published
data.question_count integer Questions linked to this passage
data.has_audio boolean Whether a recording is attached
data.audio_limit_mb integer Largest recording the site accepts, in MB: 200, or less when the site’s upload limit is lower

The recording file itself is never exposed here: it is served to candidates only while they sit the exam.

Errors

Status Code When
404 plugixa_exam_not_found No passage with that id, or the passage is in the trash.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share