Contents
List Passages - Plugixa Exam
GET /plugixa-exam/v1/passages
List passages, with the number of questions linked to each and whether it has a recording.
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. With it off, every passage endpoint answers 404 rest_no_route.
Request
GET https://your-site.example/wp-json/plugixa-exam/v1/passages?search=lighthouse&orderby=title&order=asc
Query parameters
This endpoint takes only the list parameters every paged list accepts.
searchmatchestitle.orderbyacceptsid,title,created_atandmodified_at.
Responses
200 OK. data is a page of passages.
{
"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
}
],
"meta": {
"total": 1,
"pages": 1
}
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
integer |
The passage’s id |
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_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[].deleted_at |
string|null |
null unless the passage is in the trash (view=trash) |
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 |
meta.total |
integer |
Passages matching, across all pages |
meta.pages |
integer |
Number of pages at this per_page |
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-exam/v1/passages?search=lighthouse&orderby=title&order=asc" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/passages?search=lighthouse&orderby=title&order=asc');
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?search=lighthouse&orderby=title&order=asc', {
headers: {
'Authorization': 'Basic ' + btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`),
},
});
const { data, meta } = await response.json();
Quick Links
Share