PHP2Shell: Is Your Joomla Site Safe? What to Do Today Introducing Next Boards: Kanban project and task boards for Joomla Next Exams 6.2.0: Exam Studio, six visual question types, exam embeds and six new languages Building the Future of Joomla Extensions
NextSoftware

Get Student Report

GET /v1/nextexams/reports/{exam_id}/students

Per-student summary

One row per examinee — attempts, best and average percent, passes. Guests are grouped into one row with no user id. Scope reports:read.

Request

GET https://your-site.example/api/index.php/v1/nextexams/reports/{exam_id}/students

Parameters

Name Type In Required Description
exam_id integer path Yes The exam to report on. (min 1)

Responses

200 — One row per examinee.

{
    "data": [
        {
            "user_id": 1,
            "name": "string",
            "attempts": 1,
            "best": 1.5,
            "average": 1.5,
            "passed": 1
        }
    ]
}
Field Type Meaning
data[].user_id integer|null Null for the row that groups guests.
data[].name string|null
data[].attempts integer
data[].best number|null Best percent.
data[].average number|null Average percent.
data[].passed integer Passing attempts.

Errors

Status Code When
401 INVALID_TOKEN No token (MISSING_TOKEN), or one that is wrong, expired, revoked, or whose owner can no longer sign in (INVALID_TOKEN).
403 MISSING_SCOPE The token is valid but this request is not allowed, and code says why: MISSING_SCOPE (the token lacks the scope), FORBIDDEN (the owner's role does not allow it), ACCESS_DENIED (the owner cannot manage Next Exams), API_DISABLED (the API Tokens app is off), APP_DISABLED (the feature's app is off — meta.app names it), ACCOUNT_UNUSABLE (the owner is blocked or must reset their password), DEMO_LOCKED (a demo site).

Examples

curl

curl -s "https://your-site.example/api/index.php/v1/nextexams/reports/1/students" \
  -H "Authorization: Bearer $API_TOKEN"

PHP

<?php
$ch = curl_init('https://your-site.example/api/index.php/v1/nextexams/reports/1/students');

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer ' . getenv('API_TOKEN'),
    ],
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

JavaScript

const API_TOKEN = process.env.API_TOKEN;

const response = await fetch("https://your-site.example/api/index.php/v1/nextexams/reports/1/students", {
  headers: {
    "Authorization": `Bearer ${API_TOKEN}`,
  },
});
const data = await response.json();

All Extensions