Developer Platform (December 2026)

Quizzes

«  Release Conditions   ·  [   home  ·   reference  ·   community   |   search  ·   index   ·  routing table   ·  scopes table   ]   ·  Surveys  »

Attributes

LATESUBMISSIONOPTION_T

Late submission allowances can be accommodated in several ways. We use the term LATESUBMISSIONOPTION_T to stand in for an appropriate integer type.

Late submission option

Value

AllowNormalSubmission

0

UseLateLimit

1 ^

AutoSubmitAttempt

2

^ As of LE API v1.71, this type value is no longer supported or used.

OVERALLGRADECALCULATION_T

The grade calculation for a quiz, where multiple attempts are allowed. We use the term OVERALLGRADECALCULATION_T to stand in for an appropriate integer type.

Overall Grade Calculation Option

Value

Highest Attempt

1

Lowest Attempt

2

Average of all Attempts

3

First Attempt

4

Last Attempt

5

QUIZPAGINGTYPEID_T

Exposes page break information from the New Quiz Experience.

Overall Grade Calculation Option

Value

All questions on one page

0

One question per page

1

Page breaks after each section

2

Five questions per page

3

Ten questions per page

4

Quiz.QuizReadData

When the service sends you information about a quiz, it will send back a JSON structure like this:

{
    "QuizId": <number:D2LID>,
    "Name": <string>,
    "IsActive": <boolean>,
    "SortOrder": <number>,
    "AutoExportToGrades": <boolean>|null,
    "GradeItemId": <number:D2LID>|null,
    "IsAutoSetGraded": <boolean>,
    "Instructions": {
        "Text": { <composite:RichText> },
        "IsDisplayed": <boolean>
    },
    "Description": {
        "Text": { <composite:RichText> },
        "IsDisplayed": <boolean>
    },
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "DueDate": <string:UTCDateTime>|null,
    "DisplayInCalendar": <boolean>,
    "AttemptsAllowed": {
        "IsUnlimited": <boolean>,
        "NumberOfAttemptsAllowed": <number>|null
    },
    "LateSubmissionInfo": {
        "LateSubmissionOption": <number:LATESUBMISSIONOPTION_T>,
        "LateLimitMinutes": <number>|null
    },
    "SubmissionTimeLimit": {
        "IsEnforced": <boolean>,
        "ShowClock": <boolean>,
        "TimeLimitValue": <number>
    },
    "SubmissionGracePeriod": <number>|null,
    "Password": <string>|null,
    "Header": {
        "Text": { <composite:RichText> },
        "IsDisplayed": <boolean>
    },
    "Footer": {
        "Text": { <composite:RichText> },
        "IsDisplayed": <boolean>
    },
    "AllowHints": <boolean>,
    "DisableRightClick": <boolean>,
    "DisablePagerAndAlerts": <boolean>,
    "NotificationEmail": <string>|null,
    "CalcTypeId": <number:OVERALLGRADECALCULATION_T>,
    "RestrictIPAddressRange": null|[
        {
            "IPRangeStart": <string>,
            "IPRangeEnd": <string>|null
        }
    ],
    "CategoryId": <number>|null,
    "PreventMovingBackwards": <boolean>,
    "Shuffle": <boolean>,
    "ActivityId": <string>|null,
    "AllowOnlyUsersWithSpecialAccess": <boolean>,
    "IsRetakeIncorrectOnly": <boolean>,
    "PagingTypeId": <number:QUIZPAGINGTYPEID_T>|null,
    "IsSynchronous": <boolean>,
    "DeductionPercentage": <number>|null,
    "HideQuestionPoints": <boolean>,
    "IsSingleSession": <boolean>,  // Added with LMS v20.26.2
    "AnnotationToolsEnabled": <boolean>  // Added with LMS v20.26.9
}
Instructions.Text, Description.Text, Header.Text, Footer.Text

These RichText properties can be displayed, or hidden, upon presentation of the quiz to those taking it (based on the value of their associated IsDisplayed property).

AttemptsAllowed

If the IsUnlimited property is True, then the NumberOfAttemptsAllowed property will be null; if IsUnlimited is False, then NumberOfAttemptsAllowed will contain the number of attempts allowed (default value is 1).

LateSubmissionInfo

As of LE API v1.71, the back-end service will ignore any value you set for LateLimitMinutes and if you set LateSubmissionOption to 1 it will instead use the value 2 (for “AutoSubmitAttempt”).

SubmissionGracePeriod

As of LE API v1.71, the back-end service will not use any value you set for this field.

Password

If not null (and visible to the calling user context), the current password set for the quiz.

NotificationEmail

If not null (and visible to the calling user context), the current notification email to receive notice of quiz attempts.

RestrictIpAddressRange

Null, or, if some IP address ranges are restricted, a list of start-end pairs that describe the restricted ranges. Within each range, both the range-start and range-end strings must be valid IPv4 addresses; if a range has range-start string, but null for the range-end, then this restricts all IP address after than the range-start address.

PreventMovingBackwards

When true, prevents the quiz taker from paging backwards in this quiz.

Shuffle

When true, the order of the questions is randomized.

AllowOnlyUsersWithSpecialAccess

When true, allow only users with special access to see this quiz.

IsRetakeIncorrectOnly

When true, the quiz taker will only need to answer questions that were previously incorrect on second and subsequent attempts of this quiz.

PagingTypeId

For quizzes using modern paging methods, contains the number corresponding to the quiz paging type. For quizzes using the classic paging method, this field value will be null.

IsSynchronous

When true, the timer for the quiz starts automatically at StartDate instead of when the user actually starts the quiz.

DeductionPercentage

If not null, denotes the percentage of each incorrect question’s point value to be deducted from the final attempt grade.

HideQuestionPoints

When true, the points for each question will not be displayed to the user when they take the quiz.

IsSingleSession

When true, each student’s quiz attempt will be locked to their current browser session. They will not be able to exit and resume the quiz from another browser or device without first being manually unlocked by the instructor.

AnnotationToolsEnabled

When true, the bookmarking and strikethrough buttons are displayed to the user during quiz taking.

Quiz.QuizData

When updating quiz data, use a JSON structure like this:

{
    "Name": <string>,
    "IsActive": <boolean>,
    "SortOrder": <number>,
    "AutoExportToGrades": <boolean>|null,
    "GradeItemId": <number:D2LID>|null,
    "IsAutoSetGraded": <boolean>,
    "Instructions": {
        "Text": { <composite:RichTextInput> },
        "IsDisplayed": <boolean>
    },
    "Description": {
        "Text": { <composite:RichTextInput> },
        "IsDisplayed": <boolean>
    },
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "DueDate": <string:UTCDateTime>|null,
    "DisplayInCalendar": <boolean>,
    "NumberOfAttemptsAllowed": <number>|null,
    "LateSubmissionInfo": {
        "LateSubmissionOption": <number:LATESUBMISSIONOPTION_T>,
        "LateLimitMinutes": <number>|null
    },
    "SubmissionTimeLimit": {
        "IsEnforced": <boolean>,
        "ShowClock": <boolean>,
        "TimeLimitValue": <number>
    },
    "SubmissionGracePeriod": <number>|null,
    "Password": <string>|null,
    "Header": {
        "Text": { <composite:RichTextInput> },
        "IsDisplayed": <boolean>
    },
    "Footer": {
        "Text": { <composite:RichTextInput> },
        "IsDisplayed": <boolean>
    },
    "AllowHints": <boolean>,
    "DisableRightClick": <boolean>,
    "DisablePagerAndAlerts": <boolean>,
    "NotificationEmail": <string>|null,
    "CalcTypeId": <number:OVERALLGRADECALCULATION_T>,
    "RestrictIPAddressRange": null|[
        {
            "IPRangeStart": <string>,
            "IPRangeEnd": <string>|null
        }, ...
    ],
    "CategoryId": <number>|null,
    "PreventMovingBackwards": <boolean>,
    "Shuffle": <boolean>,
    "AllowOnlyUsersWithSpecialAccess": <boolean>,
    "IsRetakeIncorrectOnly": <boolean>,
    "PagingTypeId": <number:QUIZPAGINGTYPEID_T>|null,  // Added with LE API v1.78
    "IsSynchronous": <boolean>,
    "DeductionPercentage": <number>|null,
    "HideQuestionPoints": <boolean>,  // Added with LE API v1.88
    "IsSingleSession": <boolean>,  // Added with LE API v1.92
    "AnnotationToolsEnabled": <boolean>  // Added with LE API v1.98
}
Instructions.Text, Description.Text, Header.Text, Footer.Text

Note that these properties all use the RichTextInput structure type.

StartDate

Date and time that marks the start of the quiz. If IsSynchronous is true, then the quiz’s timer starts at the StartDate; otherwise, the quiz’s timer starts when the user first starts the quiz.

NumberOfAttemptsAllowed

Must be between 1 and 10 inclusive or null for unlimited.

LateSubmissionInfo

As of LE API v1.71, the back-end service will ignore any value you set for LateLimitMinutes and if you set LateSubmissionOption to 1 it will instead use the value 2 (for “AutoSubmitAttempt”).

SubmissionGracePeriod

As of LE API v1.71, the back-end service will not use any value you set for this field.

SubmissionGracePeriod.TimeLimitValue

Represented in minutes. For no time limit, set TimeLimitValue to 0 with IsEnforced and IsSynchronous set to false. For enforced time limit, set TimeLimitValue between 1 and 9999 with IsEnforced set to true.

Password

If not null (no password to set), must not be an empty string or whitespace.

NotificationEmail

If not null (no email to notify), must be a valid email address.

RestrictIpAddressRange

Null, or, if some IP address ranges are restricted, a list of start-end pairs that describe the restricted ranges. Within each range, both the range-start and range-end strings must be valid IPv4 addresses; if a range has range-start string, but null for the range-end, then this restricts all IP address after than the range-start address.

PreventMovingBackwards

When true, prevents the quiz taker from paging backwards in this quiz.

Shuffle

When true, the order of the questions is randomized.

AllowOnlyUsersWithSpecialAccess

When true, allow only users with special access to see this quiz.

Note

The AllowOnlyUsersWithSpecialAccess property is ignored (but still required with some value) if the calling user does not have permission to add special access to quizzes.

IsRetakeIncorrectOnly

When true, the quiz taker will only need to answer questions that were previously incorrect on second and subsequent attempts of this quiz.

PagingTypeId

For quizzes using modern paging methods, contains the number corresponding to the quiz paging type. As of LE API v1.78, any attempt to set the value NULL or to update the classic quiz will reset the PagingTypeId value to 0

IsSynchronous

When true, the timer for the quiz starts automatically at StartDate instead of when the user actually starts the quiz.

DeductionPercentage

If not null, denotes the percentage of each incorrect question’s point value to be deducted from the final attempt grade. Must be between 0 and 100.

HideQuestionPoints

When true, the points for each question will not be displayed to the user when they take the quiz. The default value for this field is false. Required as of LE API v1.88.

IsSingleSession

When true, each student’s quiz attempt will be locked to their current browser session. They will not be able to exit and resume the quiz from another browser or device without first being manually unlocked by the instructor. The default value for this field is false. Required as of LE API v1.92. The d2l.Tools.Quizzes.SingleSessionQuizzes config must be enabled in the orgUnit in order to use this feature.

AnnotationToolsEnabled

When true, the bookmarking and strikethrough buttons are displayed to the user during quiz taking. The default value for this field is true. Required as of LE API v1.98. The d2l.Tools.Quizzes.AnnotationTools config must be enabled in the orgUnit in order to use this feature.

Quiz.QuestionDataJSON

When creating or updating question data, use a JSON structure like this:

{
    "QuestionTypeId": <number:QUESTION_T>,
    "Name": <string>|null,
    "Hint": { <composite:RichTextInput> }|null,
    "Feedback": { <composite:RichTextInput> }|null,
    "Points": <number:decimal>,
    "Bonus": <boolean>|null,
    "Mandatory": <boolean>|null,
    "Difficulty": <number>|null,
    "QuestionInfo": <composite:QuestionInfoJSON>
}
QuestionTypeId

The back-end service uses this value for create actions; however, it will ignore this value on update actions (once created, you cannot change a question’s type).

Mandatory

Indicates whether the question is mandatory. Defaults to false if null.

Bonus

Indicates whether the question is a bonus question. Defaults to false if null.

Difficulty

The difficulty level of the question. Defaults to 1 if null.

Feedback

The feedback for the question.

QuestionInfo

The value for this property varies with the quiz question type. Each property value type is an appropriately named JSON block; for example, the MultipleChoice question type uses the QuestionInfoMultipleChoice JSON structure as the value here, and so forth.

Note that several question types have a Randomize or Weight field that merit further explanation:

Randomize

Boolean value that determines if the question answers will be ordered or not when presented to the user.

Weight

A JSON number that must be between 0 and 1 inclusive. When the back-end service shows this value on output, it will convert your provided weight to a percentage value.

Quiz.QuestionInfoJSON

When creating or updating question data, use a JSON structure like this for QuestionType. For example, if the question type key is MultipleChoice, use the MultipleChoice body.

QuestionInfoMultipleChoice. QuestionInfoJSON of the MultipleChoice type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "Randomize": <boolean>|null,
   "Enumeration": <number:ENUMERATION_T>|null,
   "Answers": [
       {
       "Answer": { <composite:RichTextInput> },
       "Weight": <number:decimal>,
       "AnswerFeedback": { <composite:RichTextInput> }|null
       }, ...
   ]
}

QuestionInfoTrueFalse. QuestionInfoJSON of the TrueFalse type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "IsTrue": <boolean>,
   "Enumeration": <number:ENUMERATION_T>|null,
   "TrueFeedback": { <composite:RichTextInput> }|null,
   "FalseFeedback": { <composite:RichTextInput> }|null
}

QuestionInfoMultiSelect. QuestionInfoJSON of the MultiSelect type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "Randomize": <boolean>|null,
   "Enumeration": <number:ENUMERATION_T>|null,
   "GradingType": <number:GRADINGRULE_T>|null,
   "Answers": [
      {
         "Answer": { <composite:RichTextInput> },
         "IsCorrect": <boolean>,
         "AnswerFeedback": { <composite:RichTextInput> }|null
      }, ...
   ]
}

QuestionInfoFillInTheBlank. QuestionInfoJSON of the FillInTheBlank type would have these properties:

{
   "Segments": [
      {
         "Text": { <composite:RichTextInput> }|null,
         "Blank": null|{
            "Size": <number>|null,
            "Answers": [
               {
                   "Text": <string>,
                   "Weight": <number:decimal>,
                   "Evaluation": <number:EVALULATION_T>|null
               }, ...
            ]
         }
      }, ...
   ]
}
Segments

Each segment is either a text segment (Text set, Blank null) or a blank (Blank set, Text null). Segments must contain at least one text segment or at least one blank.

QuestionInfoShortAnswer. QuestionInfoJSON of the ShortAnswer type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "GradingType": <number:GRADINGRULE_T>|null,
   "Blanks": [
      {
         "Answers": [<string>, ... ],
         "EvaluationType": <number:EVALULATION_T>|null
      }, ...
   ]
}

QuestionInfoMultiShortAnswer. QuestionInfoJSON of the MultiShortAnswer type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "Boxes": <number>,
   "Rows": <number>|null,
   "Columns": <number>|null,
   "Answers": [
      {
         "AnswerText": <string>,
         "Weight": <number:decimal>,
         "EvaluationType": <number:EVALULATION_T>|null
      }, ...
   ]
}
Boxes, Rows, Columns

Number of input boxes, rows, and columns for the MultiShortAnswer question type.

QuestionInfoWrittenResponse. QuestionInfoJSON of the WrittenResponse type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "InitialText": { <composite:RichTextInput> }|null,
   "AnswerKey": { <composite:RichTextInput> }|null,
   "EnableStudentEditor": <boolean>|null,
   "EnableAttachments": <boolean>|null
}

QuestionInfoOrdering. QuestionInfoJSON of the Ordering type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "GradingType": <GRADINGRULE_T>|null,
   "Items": [
      {
         "Item": { <composite:RichTextInput> },
         "ItemFeedback": { <composite:RichTextInput> }|null
      }, ...
   ]
}

QuestionInfoMatching. QuestionInfoJSON of the Matching type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "GradingType": <GRADINGRULE_T>|null,
   "Choices": [
      {
         "ChoiceId": <string>,
         "Choice": { <composite:RichTextInput> },
      }, ...
   ],
   "Prompts": [
      {
         "Prompt": { <composite:RichTextInput> },
         "CorrectChoiceId": <string>,
      }, ...
   ]
}

QuestionInfoSignificantFigures. QuestionInfoJSON of the SignificantFigures type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "Formula": <string>,
   "SigFigCount": <number>|null,
   "SigFigWorth": <number:decimal>|null,
   "ToleranceType": <number:TOLERANCE_T>|null,
   "ToleranceValue": <number:decimal>|null,
   "Units": <string>|null,
   "UnitsWorth": <number:decimal>|null,
   "UnitsGradingType": <number:UNITSGRADING_T>|null,
   "EnableFileUpload": <boolean>,
   "Variables": [
      {
         "Name": <string>,
         "MinValue": <number:decimal>,
         "MaxValue": <number:decimal>,
         "StepValue": <number:decimal>|null
      }, ...
   ]
}

QuestionInfoArithmetic. QuestionInfoJSON of the Arithmetic type would have these properties:

{
   "QuestionText": { <composite:RichTextInput> },
   "Formula": <string>,
   "EnableFileUpload": <boolean>|null,
   "PrecisionLength": <number>|null,
   "EnforcePrecision": <boolean>|null,
   "ToleranceType": <number:TOLERANCE_T>|null,
   "ToleranceValue": <number:decimal>|null,
   "Units": <string>|null,
   "UnitsWorth": <number:decimal>|null,
   "UnitsGradingType": <number:UNITSGRADING_T>|null,
   "Variables": [
      {
         "Name": <string>,
         "DecimalPlaces": <number>|null,
         "MinValue": <number:decimal>,
         "MaxValue": <number:decimal>,
         "StepValue": <number:decimal>|null
      }, ...
   ]
}

Quiz Attempts

Quiz.QuizAttemptData

When the service sends you information about a quiz attempt, it will send back a JSON structure like this:

{
     "AttemptId": <number:D2LID>,
     "QuizId": <number:D2LID>,
     "UserId": <number:D2LID>,
     "AttemptNumber": <number>,
     "Score": <number:decimal>|null,
     "Started": <string:UTCDateTime>,
     "Completed": <string:UTCDateTime>|null,
     "AttemptFeedback": { <composite:RichText> },
     "FeedbackLastModified": <string:UTCDateTime>|null,
     "IsPublished":  <boolean>,
     "IsRetakeIncorrectOnly": <boolean>,
     "AttemptDueDate": <string:UTCDateTime>|null,
     "AttemptEnforceTimeLimit": <boolean>,
     "AttemptSubmissionTimeLimit": <number>,
     "AttemptSubmissionGraceLimit": <number>,
     "AttemptSubmissionLateTypeId": <number>,
     "AttemptSubmissionLateData": <number>,
     "AttemptIsSynchronous": <boolean>,
     "DeductionPercentage": <number>|null
}
Started

The date and time that this quiz attempt was started.

Completed

The date and time that this quiz attempt was completed or null if it in progress.

IsPublished

When true, the quiz attempt feedback is available to the student.

IsRetakeIncorrectOnly

When true, this quiz attempt was a retake incorrect questions only attempt.

AttemptSubmissionLateTypeId

Specifies the behaviour for when the grace period is exceeded for this attempt; see LATESUBMISSIONOPTION_T for the possible values.

AttemptSubmissionLateData

Specifies the extended deadline (in minutes) for this attempt.

AttemptIsSynchronous

When true, this quiz attempt has a synchronous start time.

DeductionPercentage

If not null, denotes the percentage of each incorrect question’s point value that was deducted from the final attempt grade.

Quiz Categories

Quiz.QuizCategoryData

When creating or updating a quiz category, use a structure like this:

{
    "Name": <string>,
    "SortOrder": <number>
}
Quiz.QuizCategoryReadData

When the service sends you information about a quiz category, it will send back a JSON structure like this:

{
    "CategoryId": <number:D2LID>,
    "Name": <string>,
    "SortOrder": <number>
}

Quiz Question Pools

Quiz.CreateQuestionPoolData

When creating a quiz question pool, use a structure like this:

{
    "Name": <string>,
    "QuestionPoints": <number>
}
Name

The name of the question pool.

QuestionPoints

The points awarded for each question drawn from the pool.

Quiz.UpdateQuestionPoolData

When updating a quiz question pool, use a structure like this:

{
    "Name": <string>,
    "QuestionPoints": <number>,
    "NumQuestions": <number>
}
Name

The name to assign to the question pool.

NumQuestions

The number of questions to randomly select from the pool for each attempt.

QuestionPoints

The points awarded for each question drawn from the pool.

Quiz.QuestionPoolReadData

When the service sends you information about a quiz question pool, it will send back a JSON structure like this:

{
    "QuestionPoolId": <number:D2LID>,
    "CollectionId": <number:D2LID>,
    "Name": <string>,
    "NumQuestions": <number>,
    "QuestionPoints": <number>
}
Name

The name of the question pool.

NumQuestions

The number of questions to randomly select from the pool for each attempt.

QuestionPoints

The points awarded for each question drawn from the pool.

Quiz Sections

Quiz.CreateSectionData

When creating or updating a quiz section, use a structure like this:

{
    "Name": <string>,
    "Message":  { <composite:RichTextInput> }|null,
    "HideName": <boolean>,
    "HideMessage": <boolean>,
    "Shuffle": <boolean>
}
Name

The name of the section.

Message

Rich text message (instructions) displayed with the section. If provided null, the message is treated as empty. Input is sanitized.

HideName

When true, the section name is not displayed to learners.

HideMessage

When true, the section message is not displayed to learners.

Shuffle

When true, the questions in the section are presented in random order.

Quiz.SectionReadData

When the service sends you information about a quiz section, it will send back a JSON structure like this:

{
    "SectionId": <number:D2LID>,
    "CollectionId": <number:D2LID>,
    "Name": <string>,
    "Message":  { <composite:RichText> },
    "HideName": <boolean>,
    "HideMessage": <boolean>,
    "Shuffle": <boolean>
}
SectionId

The ID of the section.

CollectionId

The ID of the quiz the section belongs to.

Name

The name of the section.

Message

The rich text message (instructions) displayed with the section.

HideName

When true, the section name is not displayed to learners.

HideMessage

When true, the section message is not displayed to learners.

Shuffle

When true, the questions in the section are presented in random order.

Quiz.ObjectPosition

When the service sends you information about the positions of questions, sections, or question pools inside a section, it will send back a list of items where the items have a JSON structure like this:

{
    "ObjectId": <number:D2LID>,
    "Position": <number>
}
ObjectId

The ID of the object within the section.

Position

The position of the object within the section.

Questions

QUESTION_T

Quizzing supports questions that assess answers in a variety of ways. We use the term QUESTION_T to stand in for an appropriate integer type.

Question Type

Value

MultipleChoice

1

TrueFalse

2

FillInTheBlank

3

MultiSelect

4

Matching

5^

Ordering

6^

LongAnswer

7

ShortAnswer

8

Likert

9

ImageInfo

10^

TextInfo

11^

Arithmetic

12^

SignificantFigures

13^

MultiShortAnswer

14

^ QuestionInfo is populated for

Matching, Ordering, Arithmetic, and SignificantFigures as of LE API v1.100; on prior versions they will be null for these question types.

EVALULATION_T

The questions have several evaluation types. We use the term EVALULATION_T to stand in for an appropriate integer type.

Evaluation Type

Value

CaseInsensitive

0

CaseSensitive

1

RegularExpression

2

ENUMERATION_T

The questions have several evaluation types. We use the term ENUMERATION_T to stand in for an appropriate integer type.

Enumeration

Value

Numbers

1

Roman Numerals

2

UpperCase Roman Numerals

3

Letters

4

UpperCase Letters

5

No Enumeration

6

GRADINGRULE_T

The questions have grading rules. We use the term GRADINGRULE_T to stand in for an appropriate integer type.

Grading Rule

Value

All or nothing

0

Right minus wrong

1

Correct answers

2

Equally weighted/Correct answers limited selections

3

The meaning of some of these integer values varies with different question types:

  • For Multi-Select questions, grading rule 3 means “Correct answers imited selections”.

  • For Short Answer questions, grading rule 0 means “Equally weighted” and grading rule 1 means “All or nothing”, and grading rule 3 does not exist.

  • For Matching and Ordering questions, grading rule 0 means “Equally weighted”, grading rule 1 means “All or nothing”, grading rule 2 means “Right minus wrong”, and grading rule 3 does not exist.

  • For Arithmetic questions, grading rule 3 does not exist.

  • For Significant Figures questions, grading rule 3 does not exist.

STYLE_T

The questions have style options. We use the term STYLE_T to stand in for an appropriate integer type.

Style

Value

Horizontal

1

Vertical

2

Dropdown

3

CALE_T The questions have scale options. We use the term SCALE_T to stand in for an appropriate integer type.

Style

Value

One to Five

0

One to Eight

1

One to Ten

2

Agreement

3

Satisfaction

4

Frequency

5

Importance

6

Opposition

7

OLERANCE_T The questions have tolerance options. We use the term TOLERANCE_T to stand in for an appropriate integer type. For Arithmetic question types, there is no Tolerance Type for Tolerance Type 3.

Style

Value

Units

0

Percent

1

One Half from the least significant figure

2

NITSGRADING_T The questions have units grading options. We use the term UNITSGRADING_T to stand in for an appropriate integer type.

Style

Value

Case Insensitive

0

Case Sensitive

1

Regular Expression

2

Quiz.QuestionData

When the service sends you information about a quiz question, it will send back a JSON structure like this:

{
   "QuestionId": <number:D2LID>,
   "QuestionTypeId": <number:QUESTION_T>,
   "Name": <string>|null,
   "QuestionText": { <composite:RichText> },
   "Points": <number>,
   "Difficulty": <number>,
   "Bonus": <boolean>,
   "Mandatory": <boolean>,
   "Hint": { <composite:RichText> },
   "Feedback": { <composite:RichText> },
   "LastModified": <utcdatetime>,
   "LastModifiedBy": <number:D2LID>|null,
   "SectionId": <number:D2LID>,
   "QuestionTemplateId": <number:D2LID>,
   "QuestionTemplateVersionId": <number:D2LID>,
   "QuestionInfo": { <composite:QuestionInfo> }
}

Each question type adds its own set of QuestionInfo data. Note that several question types have a Randomize or Weight field that merit further explanation:

Randomize

Boolean value that determines if the question answers will be ordered or not when presented to the user.

Weight

A JSON number to be read as a percentage value; the back-end service produces this percentage by conversion of your weight value provided on input between 0 and 1.

Question.QuestionInfo

Multiple Choice. Question info of the MultipleChoice type (1), have these properties:

{
   "Answers": [
       {
       "PartId": <number:D2LID>,
       "Answer": { <composite:RichText> },
       "AnswerFeedback": { <composite:RichText> },
       "Weight": <number>
       }, ...
   ],
   "Randomize": <boolean>,
   "Enumeration": <number:ENUMERATION_T>
}

True-False. Question info of the TrueFalse type (2) have these properties:

{
   "TruePartId": <number:D2LID>,
   "TrueWeight": <number>,
   "TrueFeedback": { <composite:RichText> },
   "FalsePartId": <number:D2LID>,
   "FalseWeight": <number>,
   "FalseFeedback": { <composite:RichText> },
   "Enumeration": <number:ENUMERATION_T>
}

Fill In The Blank. Question info of the FillInTheBlank type (3) have these properties:

{
   "Texts": [
       {
       "Text": { <composite:RichText> }
       }, ...
   ],
   "Blanks": [
       {
       "PartId": <number:D2LID>,
       "Size": <number>,
       "Answers": [
          {
             "TextAnswer": <string>,
             "Weight": <number>,
             "EvaluationType": <number:EVALULATION_T>
          }, ...
       ]
       }, ...
   ]
}

Multi-Select. Question info of the MultiSelect type (4), have these properties:

{
    "Answers": [
        {
           "PartId": <number:D2LID>,
           "Answer": { <composite:RichText> },
           "AnswerFeedback": { <composite:RichText> },
           "IsCorrect": <boolean>
        }, ...
    ],
    "Randomize": <boolean>,
    "Enumeration": <number:ENUMERATION_T>,
    "Style": <number:STYLE_T>,
    "GradingType": <number:GRADINGRULE_T>
}

Long Answer. Question info of the LongAnswer type (7) have these properties:

{
   "PartId": <number:D2LID>,
   "EnableStudentEditor": <boolean>,
   "InitialText": { <composite:RichText> },
   "AnswerKey": { <composite:RichText> },
   "EnableAttachments": <boolean>
}

Short Answer. Question info of the ShortAnswer type (8) have these properties:

{
   "Blanks": [
       {
       "PartId": <number:D2LID>,
       "Answers": [
            {
            "Text": <string>,
            "Weight": <number>
            }, ...
       ],
       "EvaluationType": <number:EVALULATION_T>
       }, ...
   ],
   "GradingType": <number:GRADINGRULE_T>
}

Likert. Question info of the Likert type (9), have these properties:

{
   "Scale": <number:SCALE_T>,
   "NaOption": <boolean>,
   "Statements": [
       {
           "PartId": <number:D2LID>,
           "Statement": { <composite:RichText> }
       }, ...
   ],
}

Multiple Short Answer. Question info of the MultipleShortAnswer type (14) have these properties:

{
   "PartIds": [ <number:D2LID>, ... ],
   "Boxes": <number>,
   "Rows": <number>,
   "Columns": <number>,
   "Answers": [
       {
       "AnswerText": <string>,
       "Weight": <number>,
       "EvaluationType": <number:EVALUATION_T>
       }, ...
   ]
}

Matching. Question info of the Matching type (5) have these properties:

{
   "Choices": [
      {
         "ChoiceId": <number:D2LID>,
         "Choice": { <composite:RichText> }
      }, ...
   ],
   "Prompts": [
      {
      "PromptId": <number:D2LID>,
      "Prompt": { <composite:RichText> },
      "CorrectChoiceId": <number:D2LID>
      }, ...
   ],
   "Randomize": <boolean>,
   "GradingType": <number:GRADINGRULE_T>
}

Ordering. Question info of the Ordering type (6) have these properties:

{
   "Items": [
      {
         "ItemId": <number:D2LID>,
         "Item": { <composite:RichText> },
         "ItemFeedback": { <composite:RichText> }
      }, ...
   ],
   "Randomize": <boolean>,
   "GradingType": <number:GRADINGRULE_T>
}

Arithmetic. Question info of the Arithmetic type (12) have these properties:

{
   "PrecisionLength": <number>,
   "UnitsWorth": <number:decimal>,
   "ResponseWorth": <number:decimal>,
   "EnforcePrecision": <boolean>,
   "EnableFileUpload": <boolean>,
   "Units": <string>,
   "ToleranceType": <number:TOLERANCE_T>,
   "UnitsGradingType": <number:UNITSGRADING_T>,
   "ToleranceValue": <number:decimal>,
   "Formula": <string>,
   "Variables": [
      {
         "VariableId": <number:D2LID>,
         "Name": <string>,
         "DecimalPlaces": <number>,
         "MinValue": <number:decimal>,
         "MaxValue": <number:decimal>,
         "StepValue": <number:decimal>
      }, ...
   ],
}

SignificantFigures. Question info of the SignificantFigures type (13) have these properties:

{
   "SigFigCount": <number>,
   "UnitsWorth": <number:decimal>,
   "SigFigWorth": <number:decimal>,
   "ResponseWorth": <number:decimal>,
   "EnableFileUpload": <boolean>,
   "Units": <string>,
   "ToleranceType": <number:TOLERANCE_T>,
   "UnitsGradingType": <number:UNITSGRADING_T>,
   "ToleranceValue": <number:decimal>,
   "Formula": <string>,
   "Variables": [
      {
         "VariableId": <number:D2LID>,
         "Name": <string>,
         "MinValue": <number:decimal>,
         "MaxValue": <number:decimal>,
         "StepValue": <number:decimal>
      }, ...
   ],
}

Question Import

Quiz.ImportQuizQuestionData

When importing a single question into a quiz from another question collection in the same org unit, use a structure like this:

{
    "SourceCollectionId": <number:D2LID>,
    "SourceQuestionId": <number:D2LID>,
    "DestinationParentObjectId": <number:D2LID>
}
SourceCollectionId

ID of the question collection to import from. Must belong to the same org unit as the destination quiz.

SourceQuestionId

ID of the question within the source collection to import.

DestinationParentObjectId

ID of the container to import into: 0 for the quiz root, otherwise the ID of a section or question pool in the destination quiz.

Question Move

Quiz.MoveQuizObjectData

When moving a single quiz object (question, section, or question pool), use a structure like this:

{
    "SourceObjectId": <number:D2LID>,
    "DestinationParentObjectId": <number:D2LID>|null,
    "Position": <number>|null
}
SourceObjectId

ID of the question, section or question pool to move. Must belong to the quiz in the request URL.

DestinationParentObjectId

ID of the container to move the object into: 0 for the quiz root, otherwise a section ID. If not provided, the object stays in its current container and is only repositioned.

Position

1-based position the object should occupy within the destination container. If not provided, the object is placed at the end.

Special Access

Quiz.SpecialAccessData

When creating or updating special access for a quiz, use a structure like this:

{
   "StartDate": <string:UTCDateTime>|null,
   "EndDate": <string:UTCDateTime>|null,
   "DueDate": <string:UTCDateTime>|null,
   "SubmissionTimeLimit": null|{
         "IsEnforced": <boolean>,
         "TimeLimitValue": <number>
   },
   "AttemptsAllowed": null|{
      "IsUnlimited": <boolean>,
      "NumberOfAttemptsAllowed": <number>|null
   }
}
SubmissionTimeLimit

When null, SubmissionTimeLimit will not be overridden.

TimeLimitValue

Represented in minutes. Must be between 0 and 9999 inclusive. For no time limit, set TimeLimitValue to 0 with IsEnforced set to false. For enforced time limit, set TimeLimitValue between 1 and 9999 with IsEnforced set to true.

AttemptsAllowed

When null, AttemptsAllowed will not be overridden.

NumberOfAttemptsAllowed

Must be between 1 and 10 inclusive or null for unlimited.

Quiz.SpecialAccessUserData

When retrieving special access in a quiz, use a structure like this:

{
    "UserId": <number:D2LID>,
    "SpecialAccess": <composite:Quiz.SpecialAccessData>
}

Actions

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)

Delete a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/

Retrieve the quizzes belonging to an org unit.

Parameters:
Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns an ObjectListPage JSON block containing a list of QuizReadData blocks.

Note

This action only returns the quiz objects that the calling user context has permission to see. If the calling user has no permission to see any quiz objects, this action returns an empty result page.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)

Retrieve a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns a QuizReadData JSON block containing the properties of your identified quiz.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/access/

Retrieve a list of users with access to a specified quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Query Parameters:
  • userId (D2LID) – Optional. Retrieve access for a single user.

  • roleId (D2LID) – Optional. Retrieve access for users with the given role.

Oauth2 Scopes:

quizzing:access:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns an ObjectListPage JSON block containing a list of UserAccess blocks.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/

Create a new quiz.

Parameters:
JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:read quizzing:quizzes:create

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns a QuizReadData JSON block containing the properties of your quiz.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)

Update a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:read quizzing:quizzes:write

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Input. Note that your provided block’s data replaces all the associated quiz’s properties on the service.

This action will also report an invalid quiz data error if you try to restrict a shared quiz for special access or if you try to set auto-submit on for a quiz with mandatory questions.

Return. This action returns a QuizReadData JSON block containing the updated properties of your quiz.

Quiz Attempts

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/attempts/

Retrieve a list of attempts for a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Query Parameters:
  • userId (D2LID) – Optional. Retrieve attempts for a single user.

Oauth2 Scopes:

quizzing:attempts:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns an ObjectListPage JSON block containing a list of QuizAttemptData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/attempts/(attemptId)

Retrieve a quiz attempt.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • attemptId (D2LID) – Attempt ID.

Oauth2 Scopes:

quizzing:attempts:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns a QuizAttemptData JSON block containing the properties of your identified quiz attempt.

Quiz Categories

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/(categoryId)

Delete a quiz category.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • categoryId (D2LID) – Quiz Category ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/

Retrieve the quiz categories belonging to an org unit.

Parameters:
Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns an ObjectListPage JSON block containing a list of QuizCategoryReadData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/(categoryId)

Retrieve a quiz category.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • categoryId (D2LID) – Quiz Category ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns a QuizCategoryReadData JSON block containing the properties of your identified quiz category.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/

Create a new quiz category.

Parameters:
JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:read quizzing:quizzes:create

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns a QuizCategoryReadData JSON block containing the data for the newly created quiz category.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/(categoryId)

Update a quiz category.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • categoryId (D2LID) – Quiz Category ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:read quizzing:quizzes:write

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns a QuizCategoryReadData JSON block containing the updated data for your quiz category.

Quiz Question Pools

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questionPools/(questionPoolId)

Delete a quiz question pool.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionPoolId (D2LID) – Question Pool ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questionPools/(questionPoolId)/questions/(questionId)

Delete a question from a quiz question pool.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionPoolId (D2LID) – Question Pool ID.

  • questionId (D2LID) – Question ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questionPools

Retrieve the quiz question pools belonging to a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns an ObjectListPage JSON block containing a list of QuestionPoolReadData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questionPools/(questionPoolId)

Retrieve a quiz question pool.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionPoolId (D2LID) – Question Pool ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a QuestionPoolReadData JSON block containing the properties of your identified quiz question pool.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questionPools/(questionPoolId)/questions/

Retrieve the list of questions in a quiz question pool.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionPoolId (D2LID) – Quiz question pool ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns an ObjectListPage JSON block containing a list of QuestionData blocks.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questionPools

Create a new question pool inside a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a QuestionPoolReadData JSON block containing the data for the newly created quiz question pool.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questionPools/(questionPoolId)/questions/

Create a new question inside a quiz question pool.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionPoolId (D2LID) – Quiz Question Pool ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a QuestionData JSON block containing the data for the newly created quiz question.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questionPools/(questionPoolId)

Update a quiz question pool.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionPoolId (D2LID) – Question Pool ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a QuestionPoolReadData JSON block containing the updated data for your quiz question pool.

Quiz Sections

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)

Delete a quiz section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Section ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/

Retrieve the quiz sections belonging to a quiz on the quiz root level.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns an ObjectListPage JSON block containing a list of SectionReadData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)

Retrieve a single quiz section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz section ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a SectionReadData JSON block.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)/questions/

Retrieve the list of questions in a quiz section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz section ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns an ObjectListPage JSON block containing a list of QuestionData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)/sections/

Retrieve the quiz sections belonging to a section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz section ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns an ObjectListPage JSON block containing a list of SectionReadData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)/questionPools

Retrieve the child question pools of a quiz section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz section ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a ObjectListPage JSON block containing a list of QuestionPoolReadData blocks for the child question pools of the quiz section.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)/positions
Returns the list of 1-based position of the question, section or question pool

within the sections container.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz section ID. Use 0 to get the positions from the root.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a ObjectListPage JSON block containing a list of Quiz.ObjectPosition blocks.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/

Create a new section inside the quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a SectionReadData JSON block containing the data for the newly created quiz section.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)/sections/

Create a new section inside an existing section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz section ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a SectionReadData JSON block containing the data for the newly created quiz section.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)/questionPools/

Create a new question pool inside an existing section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz section ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a QuestionPoolReadData JSON block containing the data for the newly created question pool.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)/questions/

Create a new question inside an existing section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz section ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a QuestionData JSON block containing the data for the newly created question.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/sections/(sectionId)

Update a quiz section.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • sectionId (D2LID) – Quiz Section ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Return. This action returns a SectionReadData JSON block containing the updated data for your quiz section.

Questions

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questions/(questionId)

Delete a specific question in a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionId (D2LID) – Question ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.100+ – Route first appears in LMS v20.26.10.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questions/

Retrieve all the questions in a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns an ObjectListPage JSON block containing a list of QuestionData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questions/(questionId)

Retrieve a specific question in a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionId (D2LID) – Question ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.100+ – Route first appears in LMS v20.26.10.

Return. This action returns an QuestionData JSON block.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questions/

Create a new question in a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.100+ – Route first appears in LMS v20.26.10.

Return. This action returns an QuestionData JSON block.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questions/(questionId)

Update an existing question in a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • questionId (D2LID) – Question ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.100+ – Route first appears in LMS v20.26.10.

Return. This action returns an QuestionData JSON block.

Question Import

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/import

Import a quiz question into a question pool, section, or the root of a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Question Move

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/move

Move a question, section, or question pool from one location to another within the same collection.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:manage

Status Codes:
API Versions:
  • 1.101+ – Route first appears in LMS v20.26.12.

Special Access

Members of the classlist can be given access to a quiz either for a limited time or in perpetuity. The quiz access data will be in a SpecialAccessData JSON data block or in SpecialAccessUserData JSON Data blocks if a non-empty set of students’ data is returned in the response.

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/specialaccess/(userId)

Delete a user’s special access rule for a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • userId (D2LID) – User ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/specialaccess/

Retrieve special access rules for users in a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns an ObjectListPage JSON block containing the resulting SpecialAccessUserData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/specialaccess/(userId)

Retrieve a user’s special access rule for a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • userId (D2LID) – User ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

Return. This action returns a SpecialAccessData JSON block.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/specialaccess/(userId)

Create or update a user’s special access rule for a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • userId (D2LID) – User ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:write

Status Codes:
API Versions:
  • 1.82+ – Route first appears in LMS v20.25.1.

  • 1.75-81 – Deprecated as of LMS v20.26.1.

  • 1.74- – Obsolete as of LMS v20.26.1.

«  Release Conditions   ·  [   home  ·   reference  ·   community   |   search  ·   index   ·  routing table   ·  scopes table   ]   ·  Surveys  »