Contents
On this page
Get Item Analysis - Plugixa Exam
GET /plugixa-exam/v1/analytics/{exam}/items
Read how each question of an exam performed: how easy it was, how often it was answered correctly, and how well it separates strong candidates from weak ones.
Scope reports:read; the token’s user needs the reports:view permission. Needs Plugixa Exam Pro with the Analytics app on in Plugixa Exam -> App Manager (it also needs the Notifications app); with it off, this route answers 404.
Only answers from attempts that are no longer in progress and have a score are counted. An unknown exam id answers 200 with an empty list.
Request
GET https://your-site.example/wp-json/plugixa-exam/v1/analytics/7/items
Path parameters
| Name | Type | Description |
|---|---|---|
exam |
integer |
The exam’s id |
Responses
200 OK. data is one row per question.
Sorted by question title. Not paged.
{
"success": true,
"data": [
{
"question_id": 41,
"title": "Solve for x: 3x + 5 = 20",
"question_type": "short_answer",
"responses": 38,
"difficulty": 0.842,
"correct_rate": 84.2,
"discrimination": 0.412,
"avg_seconds": 48.6
},
{
"question_id": 42,
"title": "Which inequality matches the graph?",
"question_type": "mcq_single",
"responses": 38,
"difficulty": 0.395,
"correct_rate": 39.5,
"discrimination": -0.087,
"avg_seconds": null
}
]
}
| Field | Type | Meaning |
|---|---|---|
data[].question_id |
integer |
The question’s id |
data[].title |
string |
The question’s title |
data[].question_type |
string |
The question type |
data[].responses |
integer |
Answers counted |
data[].difficulty |
number |
Average share of the question’s points scored, 0 to 1, to 3 decimals. Higher means easier: 0.95 means nearly everyone got it |
data[].correct_rate |
number|null |
Percent of marked answers that were correct. null while no answer has been marked |
data[].discrimination |
number |
Correlation between doing well on this question and doing well on the exam, -1 to 1, to 3 decimals. 0 when it cannot be measured, for example when everyone scored the same. A negative value usually means a wrong answer key or misleading wording |
data[].avg_seconds |
number|null |
Average time to first answer, in seconds. null when no timing was recorded for the question |
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-exam/v1/analytics/7/items" \
-H "Authorization: Bearer $PLUGIXA_EXAM_TOKEN"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/analytics/7/items');
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 response = await fetch('https://your-site.example/wp-json/plugixa-exam/v1/analytics/7/items', {
headers: {
'Authorization': `Bearer ${process.env.PLUGIXA_EXAM_TOKEN}`,
},
});
const { data } = await response.json();
Quick Links
Share