Quiz Reports
API for accessing and generating statistical reports for a quiz
A QuizReport object looks like:
Quizzes::QuizReportsController#index
GET /api/v1/courses/:course_id/quizzes/:quiz_id/reports
GET /api/v1/courses/:course_id/quizzes/:quiz_id/reports
Scope: url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/reports
Returns a list of all available reports.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Whether to retrieve reports that consider all the submissions or only the most recent. Defaults to false, ignored for item_analysis reports. |
Returns a list of QuizReport objects.
Quizzes::QuizReportsController#create
POST /api/v1/courses/:course_id/quizzes/:quiz_id/reports
POST /api/v1/courses/:course_id/quizzes/:quiz_id/reports
Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/reports
Create and return a new report for this quiz. If a previously generated report matches the arguments and is still current (i.e. there have been no new submissions), it will be returned.
Responses
400 Bad Request
if the specified report type is invalid409 Conflict
if a quiz report of the specified type is already being generated
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | The type of report to be generated. Allowed values: |
|
| Whether the report should consider all submissions or only the most recent. Defaults to false, ignored for item_analysis. |
|
| Whether the output should include documents for the file and/or progress objects associated with this report. (Note: JSON-API only) Allowed values: |
Returns a QuizReport object.
Quizzes::QuizReportsController#show
GET /api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id
GET /api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id
Scope: url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id
Returns the data for a single quiz report.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Whether the output should include documents for the file and/or progress objects associated with this report. (Note: JSON-API only) Allowed values: |
Returns a QuizReport object.
Quizzes::QuizReportsController#abort
DELETE /api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id
DELETE /api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id
Scope: url:DELETE|/api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id
This API allows you to cancel a previous request you issued for a report to be generated. Or in the case of an already generated report, you’d like to remove it, perhaps to generate it another time with an updated version that provides new features.
You must check the report’s generation status before attempting to use this interface. See the “workflow_state” property of the QuizReport’s Progress object for more information. Only when the progress reports itself in a “queued” state can the generation be aborted.
Responses
204 No Content
if your request was accepted422 Unprocessable Entity
if the report is not being generated or can not be aborted at this stage
© Instructure, Inc. Generated on Wed Nov 6 14:20:08 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated