> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.crehana.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.crehana.com/_mcp/server.

# Get Learning Quiz Results Report

GET https://www.crehana.com/api/v5/rest/org/{organization_slug}/reports/learning/quiz-results/

Learning report: results of the class quizzes, one row per user, course and quiz.

Covers the quizzes attached to a class (video), not the final evaluation of
the course, which `/reports/learning/quizzes/` already reports. Attempts are
consolidated: `attempts_count`, the dates of the first, last and best
attempt, the score of the last attempt (`score`) and the highest one
(`best_score`). Correct and incorrect answers, duration and `status` belong
to the last attempt. Rows come ordered by `last_attempt_at`, newest first;
page through them with `cursor` / `next_cursor`.

Reference: https://developer.crehana.com/api-reference/endpoints/reports/get-learning-quiz-results-report

## Authentication

- `Api-Key` header (required) — API key of the organization. Always sent together with the `Secret-Access` header.

## Servers

- `https://www.crehana.com` (Production, default)
- `https://qa.creha.co` (QA)

## Request

### Path parameters

- `organization_slug` (string, required)

### Query parameters

- `course_id` (list of integer, optional) — Learning course ids to filter by. Repeat the parameter for several courses (`course_id=1&course_id=2`), up to 100. A course that does not belong to the organization simply matches no row.
- `user_email` (string, optional) — Exact match on the user email.
- `document` (string, optional) — Exact match on the identity document loaded in the organization (`user_document`). Organizations that keep no documents match no row.
- `status` (enum, optional) — Status of the last attempt.
  - Allowed values: `approved`, `failed`, `incomplete`, `not_started`
- `from_date` (string, optional) — Start of the range, in YYYY-MM-DD format. Inclusive. With no `to_date` the range stays open going forward. Applies to the date of the last attempt of the class quiz (`last_attempt_at`), interpreted in UTC — the same zone the report returns that field in.
- `to_date` (string, optional) — End of the range, in YYYY-MM-DD format. Inclusive: the whole day is covered, not just its midnight. For a single day, send the same date in `from_date` and in `to_date`. Applies to the date of the last attempt of the class quiz (`last_attempt_at`), interpreted in UTC — the same zone the report returns that field in.
- `limit` (integer, optional, default: 100) — Rows per page, up to 500. Defaults to 100 when omitted.
- `cursor` (string, optional) — Cursor for the next page. Take it from `next_cursor` in the previous response and send it back unchanged; it is opaque. Omit it for the first page.

## Response

### 200

Successful Response

- `results` (list of LearningQuizResultReport, required)
- `total` (integer, optional) — Rows matching the filters, ignoring pagination.
- `next_cursor` (string, optional) — Cursor of the next page. Send it back unchanged in `cursor`; null on the last page.
- `has_next_page` (boolean, optional, default: false) — Whether there is a page after this one.

## Errors

### 400 Bad Request Error

Bad Request

- `message` (string, required)
- `errors` (list of string, required)
- `datetime` (string, optional)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### LearningQuizResultReport

One row per user × course × class quiz, attempts consolidated.

- `evaluation_type` (string, required) — Always `class`: this report covers class quizzes only.
- `course_id` (integer, optional) — Learning course id.
- `course_title` (string, optional)
- `user_id` (integer, optional) — Learning user id — the same `user_id` the other `/reports/learning/…` reports use.
- `user_full_name` (string, optional)
- `user_email` (string, optional)
- `user_document` (string, optional) — Identity document as loaded in the organization. Always a string, so leading zeros are kept. Null when the person has none.
- `quiz_id` (integer, optional) — Quiz id. Quiz names repeat across classes; this does not.
- `quiz_name` (string, optional)
- `quiz_type` (enum, optional) — `summative` (graded) or `formative` (not graded).
  - Allowed values: `summative`, `formative`
- `attempts_count` (integer, optional) — Attempts the user submitted for this quiz.
- `first_attempt_at` (datetime, optional) — Date of the first attempt, UTC.
- `last_attempt_at` (datetime, optional) — Date of the last attempt, UTC. Rows come newest first.
- `best_attempt_at` (datetime, optional) — Date of the attempt with the highest score, UTC.
- `correct_answers` (integer, optional) — Correct answers in the last attempt.
- `incorrect_answers` (integer, optional) — Incorrect answers in the last attempt.
- `total_questions` (integer, optional) — Questions in the last attempt.
- `passing_percentage` (double, optional) — Minimum percentage configured to pass the quiz.
- `score` (double, optional) — Score of the last attempt, as a percentage.
- `best_score` (double, optional) — Highest score across all attempts.
- `status` (enum, optional) — Status of the last attempt: `approved`, `failed`, `incomplete` (started but not submitted) or `not_started`.
  - Allowed values: `approved`, `failed`, `incomplete`, `not_started`
- `duration_seconds` (integer, optional) — Seconds spent on the last attempt.
- `time_limit_seconds` (integer, optional) — Time limit configured for the quiz, in seconds. Null = no limit.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "results": [
    {
      "evaluation_type": "class",
      "course_id": 245,
      "course_title": "Advanced Graphic Design Techniques",
      "user_id": 7890,
      "user_full_name": "Maria Lopez",
      "user_email": "maria.lopez@example.com",
      "user_document": "A123456789",
      "quiz_id": 532,
      "quiz_name": "Color Theory Basics",
      "quiz_type": "summative",
      "attempts_count": 3,
      "first_attempt_at": "2024-01-10T14:20:00Z",
      "last_attempt_at": "2024-01-15T09:30:00Z",
      "best_attempt_at": "2024-01-12T16:45:00Z",
      "correct_answers": 8,
      "incorrect_answers": 2,
      "total_questions": 10,
      "passing_percentage": 70,
      "score": 80,
      "best_score": 90,
      "status": "approved",
      "duration_seconds": 600,
      "time_limit_seconds": 900
    }
  ],
  "total": 1,
  "next_cursor": "eyJjdXJzb3IiOiIxMjM0NTY3ODkwIn0=",
  "has_next_page": false
}
```

**SDK Code**

```python
import requests

url = "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/quiz-results/"

payload = {}
headers = {
    "Secret-Access": "Secret-Access",
    "Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/quiz-results/';
const options = {
  method: 'GET',
  headers: {
    'Secret-Access': 'Secret-Access',
    'Api-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/quiz-results/"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Secret-Access", "Secret-Access")
	req.Header.Add("Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/quiz-results/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Secret-Access"] = 'Secret-Access'
request["Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/quiz-results/")
  .header("Secret-Access", "Secret-Access")
  .header("Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/quiz-results/', [
  'body' => '{}',
  'headers' => [
    'Api-Key' => '<apiKey>',
    'Content-Type' => 'application/json',
    'Secret-Access' => 'Secret-Access',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/quiz-results/");
var request = new RestRequest(Method.GET);
request.AddHeader("Secret-Access", "Secret-Access");
request.AddHeader("Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Secret-Access": "Secret-Access",
  "Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/quiz-results/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```