> For the complete documentation index, see [llms.txt](https://developerdocs.instructure.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developerdocs.instructure.com/services/canvas/resources/new_quizzes_reports.md).

# New Quizzes Reports

API for generating New Quizzes Reports.

#### A Progress object looks like: <a href="#progress" id="progress"></a>

```js
{
  // the ID of the Progress object
  "id": 1,
  // the context owning the job.
  "context_id": 1,
  "context_type": "Assignment",
  // the id of the user who started the job
  "user_id": 123,
  // percent completed
  "completion": 100,
  // the state of the job one of 'queued', 'running', 'completed', 'failed'
  "workflow_state": "completed",
  // the time the job was created
  "created_at": "2013-01-15T15:00:00Z",
  // the time the job was last updated
  "updated_at": "2013-01-15T15:04:00Z",
  // for successfully completed jobs, this is a JSON object containing url of the
  // report and other details
  "results": {"url":"https:\/\/canvas.example.edu\/api\/assignments\/1\/files\/2\/download"},
  // url where a progress update can be retrieved
  "url": "https://canvas.example.edu/api/v1/progress/1"
}
```

## [Create a quiz report](#method.new_quizzes/reports_api.create) <a href="#method.new_quizzes-reports_api.create" id="method.new_quizzes-reports_api.create"></a>

#### `POST /api/quiz/v1/courses/:course_id/quizzes/:assignment_id/reports`

**Scope:** `url:POST|/api/quiz/v1/courses/:course_id/quizzes/:assignment_id/reports`

Generate a new report for this quiz. Returns a progress object that can be used to track the progress of the report generation.

*Responses*

* \<code>400 Bad Request\</code> if the specified report type or format is invalid
* \<code>409 Conflict\</code> if a quiz report of the specified type is already being generated

#### Request Parameters:

| Parameter                  | Type              | Description                                                                             |
| -------------------------- | ----------------- | --------------------------------------------------------------------------------------- |
| `quiz_report[report_type]` | Required `string` | The type of report to be generated. Allowed values: `student_analysis`, `item_analysis` |
| `quiz_report[format]`      | Required `string` | The format of report to be generated. Allowed values: `csv`, `json`                     |

Returns a [Progress](https://developerdocs.instructure.com/services/canvas/resources/progress.md#progress) object.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developerdocs.instructure.com/services/canvas/resources/new_quizzes_reports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
