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 Exam

GET /v1/nextexams/exams/{id}

Get an exam

The exam's settings and its structure — sections, the questions placed in them and the random-draw rules. Scope exams:read.

Request

GET https://your-site.example/api/index.php/v1/nextexams/exams/{id}

Parameters

Name Type In Required Description
id integer path Yes The record's id. (min 1)

Responses

200 — The exam.

{
    "data": {
        "id": 1,
        "title": "string",
        "alias": "string",
        "description": "string",
        "intro": "string",
        "subject_id": 1,
        "published": true,
        "attempt_mode": "exam",
        "layout": "single_page",
        "time_limit": 1,
        "max_attempts": 1,
        "pass_mark": 1.5,
        "shuffle_questions": true,
        "shuffle_options": true,
        "access_type": "open",
        "result_release": "immediate",
        "release_at": "2026-01-01T12:00:00Z",
        "show_answers": true,
        "open_from": "2026-01-01T12:00:00Z",
        "open_until": "2026-01-01T12:00:00Z",
        "cooldown_minutes": 1,
        "allow_pause": true,
        "track_integrity": true,
        "certificate_template_id": 1,
        "created": "2026-01-01T12:00:00Z",
        "modified": "2026-01-01T12:00:00Z",
        "in_progress_attempts": 1,
        "sections": [
            {
                "id": 1,
                "title": "string",
                "description": "string",
                "ordering": 1,
                "section_type": "fixed",
                "points_per_question": 1.5,
                "questions": [
                    {
                        "question_id": 1,
                        "ordering": 1,
                        "points": 1.5,
                        "question_title": "string",
                        "question_type": "string"
                    }
                ],
                "pool_rules": [
                    {
                        "id": 1,
                        "subject_id": 1,
                        "difficulty": 1,
                        "question_type": "string",
                        "draw_count": 1,
                        "points_per_question": 1.5
                    }
                ]
            }
        ]
    }
}
Field Type Meaning
data.id integer
data.title string
data.alias string
data.description string|null
data.intro string|null
data.subject_id integer
data.published boolean
data.attempt_mode string One of exam, practice.
data.layout string One of single_page, one_per_page.
data.time_limit integer
data.max_attempts integer
data.pass_mark number
data.shuffle_questions boolean
data.shuffle_options boolean
data.access_type string One of open, access_level, guest, code, restricted.
data.result_release string One of immediate, after_close, manual, scheduled.
data.release_at string|null ISO 8601 in UTC, or null when not set. (date-time)
data.show_answers boolean
data.open_from string|null ISO 8601 in UTC, or null when not set. (date-time)
data.open_until string|null ISO 8601 in UTC, or null when not set. (date-time)
data.cooldown_minutes integer
data.allow_pause boolean
data.track_integrity boolean
data.certificate_template_id integer
data.created string|null ISO 8601 in UTC, or null when not set. (date-time)
data.modified string|null ISO 8601 in UTC, or null when not set. (date-time)
data.in_progress_attempts integer Attempts running now.
data.sections[].id integer
data.sections[].title string|null
data.sections[].description string|null
data.sections[].ordering integer
data.sections[].section_type string fixed places chosen questions; pool draws at random by its rules. One of fixed, pool.
data.sections[].points_per_question number|null
data.sections[].questions[].question_id integer
data.sections[].questions[].ordering integer
data.sections[].questions[].points number|null Overrides the question's default points.
data.sections[].questions[].question_title string
data.sections[].questions[].question_type string
data.sections[].pool_rules[].id integer
data.sections[].pool_rules[].subject_id integer|null
data.sections[].pool_rules[].difficulty integer|null
data.sections[].pool_rules[].question_type string|null
data.sections[].pool_rules[].draw_count integer
data.sections[].pool_rules[].points_per_question number|null

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).
404 NOT_FOUND No record has this id.

Examples

curl

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

PHP

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

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/exams/1", {
  headers: {
    "Authorization": `Bearer ${API_TOKEN}`,
  },
});
const data = await response.json();

All Extensions