Delete multiple questions

Method Description
exam.questionDeleteBatch Delete multiple questions in one call.

Deletes up to 50 questions in a single call, all from the same exam - every entry's {ExamId} must be identical, or the whole call is rejected before anything is deleted. Each entry in questions is shaped exactly like a single exam.questionDelete request (just {QuestionId} and {ExamId}).

Partial success: every entry is deleted independently - one missing or invalid entry does not block the others. The response lists a per-entry result in the same order (and of the same length) as the request's questions array. Useful for clearing all existing questions before re-generating a full replacement set: list question ids first with exam.questionList, then delete them all in one call.

Request parameters

{
    "questions": [
        {
            "id": {QuestionId},
            "exam_id": {ExamId}
        },
        ...
    ]
}

Response parameters

{
    "results": [
        // example entry for a question that was deleted successfully
        {
            "index": {ResultIndex},
            "completed": true
        },
        // example entry for a question that could not be deleted
        {
            "index": {ResultIndex},
            "completed": false,
            "error": "{ResultError}"
        }
        // ... one entry per requested question, in the same order as the request's "questions" array ...
    ],
    "deleted_count": {DeletedCount},
    "failed_count": {FailedCount}
}

Parameters meaning

Variable Type Appearance Description
questions Array Mandatory One entry per question to delete. Must be non-empty and contain no more than 50 entries, or the whole call is rejected before any question is deleted.
{QuestionId} Integer Mandatory Question id.
{ExamId} Integer Mandatory Exam id.
response
results Array Mandatory One entry per requested question, in the same order as the request's questions array.
{ResultIndex} Integer Mandatory 0-based position of this entry within the request's questions array.
{Completed} Boolean Mandatory Whether this specific question was deleted. When false, {ResultError} is present instead.
{ResultError} String Optional Present only when {Completed} is false. The error for this specific entry - the same message exam.questionDelete itself would have returned for this entry alone (e.g. the question or exam was not found).
{DeletedCount} Integer Mandatory Number of entries successfully deleted.
{FailedCount} Integer Mandatory Number of entries that were not deleted.