Contents
On this page
List Attempts - Plugixa Exam
GET /plugixa-exam/v1/attempts
List exam attempts across the site, one page at a time, with filters for exam and status and a search by examinee.
Scope attempts:read; the token’s user needs the attempts:view permission.
Note.
attempts:readis read-only. Grading, unlocking and deleting attempts are not reachable by any token.
Listing can close attempts. Reading this list runs the same tidy-up the admin does, at most once a minute: attempts that were abandoned past their time are closed, which can fire
attempt.submittedwebhooks.
Request
GET https://your-site.example/wp-json/plugixa-exam/v1/attempts?exam_id=7&status=needs_grading
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
exam_id |
integer |
Attempts at this exam only. | |
status |
string |
An exact status (in_progress, submitted, locked_review, graded, abandoned), or needs_grading: attempts that are submitted or locked_review and not fully graded yet. |
|
search |
string |
Matches the guest name or guest e-mail, or a WordPress user whose display name, e-mail or login contains the term (up to 200 matching users). |
Plus the list parameters every paged list accepts. search works as described above rather than over columns of the attempt. orderby accepts id, started, submitted, percent, status and created_at. view has no effect: attempts are never moved to the trash.
Responses
200 OK. data is one page of attempts.
{
"success": true,
"data": [
{
"id": 318,
"exam_id": 7,
"user_id": 25,
"guest_name": null,
"guest_email": null,
"attempt_number": 1,
"status": "locked_review",
"started": "2026-11-12 08:40:00",
"expires_at": "2026-11-12 09:40:00",
"paused_at": null,
"time_remaining": null,
"pause_count": 0,
"paused_total": 0,
"submitted": "2026-11-12 09:22:00",
"time_spent": 2520,
"score": 14,
"max_score": 20,
"percent": 70,
"passed": null,
"is_graded": false,
"extra_attempts_granted": 0,
"grader_comment": null,
"last_graded_by": null,
"last_graded_at": null,
"review_flags": null,
"last_seen": "2026-11-12 09:22:00",
"current_question_id": null,
"monitor_note": null,
"monitor_hold": false,
"closure_reason": null,
"created_at": "2026-11-12 08:40:00",
"modified_at": "2026-11-12 09:22:00",
"created_by": 25,
"modified_by": 25,
"exam_title": "Algebra midterm",
"examinee": "Lucas Bernard"
}
],
"meta": { "total": 9, "pages": 1 }
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
integer |
The attempt’s id |
data[].exam_id |
integer |
The exam |
data[].exam_title |
string |
The exam’s title. Empty on a site with more than 500 exams, for attempts at exams beyond the first 500 |
data[].user_id |
integer|null |
WordPress user id, null for a guest |
data[].guest_name |
string|null |
A guest’s name |
data[].guest_email |
string|null |
A guest’s e-mail |
data[].examinee |
string |
The user’s display name, else the guest name, else Guest |
data[].attempt_number |
integer |
Which attempt of this examinee at this exam |
data[].status |
string |
in_progress, submitted, locked_review, graded or abandoned |
data[].started |
string|null |
UTC datetime the attempt started |
data[].submitted |
string|null |
UTC datetime it was submitted |
data[].time_spent |
integer|null |
Seconds |
data[].score |
number|null |
Points scored |
data[].max_score |
number|null |
Points possible |
data[].percent |
number|null |
Score as a percentage |
data[].passed |
boolean|null |
Pass or fail, null until decided |
data[].is_graded |
boolean |
Whether marking is complete |
meta.total |
integer |
Attempts matching the filters, before paging |
meta.pages |
integer |
Number of pages at this per_page |
List rows never include the question set, the guest’s access token or integrity signals. Get Attempt adds the marking paper.
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-exam/v1/attempts?exam_id=7&status=needs_grading" \
-H "Authorization: Bearer $PLUGIXA_EXAM_TOKEN"
<?php
$query = http_build_query(['exam_id' => 7, 'status' => 'needs_grading']);
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/attempts?' . $query);
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 query = new URLSearchParams({ exam_id: '7', status: 'needs_grading' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-exam/v1/attempts?${query}`, {
headers: {
'Authorization': `Bearer ${process.env.PLUGIXA_EXAM_TOKEN}`,
},
});
const { data, meta } = await response.json();
Quick Links
Share