> 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 Users Summary Report

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

Learning report: one row per user of the organization with its courses summed.

Enrolled, completed and in-progress courses (courses, not routes), average
progress of the active enrollments, certificates, progress hours and last
activity, plus the headquarter, position, level and area of the user. Users
without enrollments come with zeros. Rows come ordered by user; page through
them with `cursor` / `next_cursor`.

Reference: https://developer.crehana.com/api-reference/endpoints/reports/get-learning-users-summary-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

- `user_id` (integer, optional) — Learning user id.
- `user_email` (string, optional) — Exact match on the user email.
- `user_status` (enum, optional) — Membership status of the user in the organization.
  - Allowed values: `active`, `inactive`, `pending`, `deleted`
- `headquarter_id` (integer, optional) — Headquarter id of the user.
- `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 last activity of the user in the course (`last_activity_at`), interpreted in UTC — the same zone the report returns that field in. Keeps the users with at least one course in the range.
- `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 last activity of the user in the course (`last_activity_at`), interpreted in UTC — the same zone the report returns that field in.
- `limit` (integer, optional, default: 1000) — Rows per page, up to 1000. 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 LearningUsersSummaryReport, required)
- `total` (integer, optional) — Users 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

### LearningUsersSummaryReport

One row per user of the organization, enrollments aggregated.

- `user_id` (integer, optional) — Learning user id — the same `user_id` the other `/reports/learning/…` reports use.
- `user_name` (string, optional)
- `user_email` (string, optional)
- `identification_number` (string, optional) — Identity document as loaded in the organization. Always a string, so leading zeros are kept. Null when the person has none.
- `user_status` (string, optional) — Membership status of the user in the organization: `active`, `inactive`, `pending` or `deleted`.
- `headquarter` (string, optional)
- `position` (string, optional)
- `level` (string, optional)
- `area` (string, optional)
- `courses_enrolled` (integer, optional, default: 0) — Courses the user is enrolled in (courses, not routes).
- `courses_completed` (integer, optional, default: 0) — Courses completed.
- `courses_in_progress` (integer, optional, default: 0) — `courses_enrolled` minus `courses_completed`; includes the courses not started yet.
- `avg_progress_percentage` (double, optional, default: 0) — Average progress, 0–100, over the active enrollments only.
- `certificates_obtained` (integer, optional, default: 0) — Courses with the certificate obtained.
- `total_hours` (double, optional, default: 0) — Progress hours (course duration × progress) summed over the courses, like the courses Excel.
- `last_activity_at` (datetime, optional) — Latest activity across the user's courses, UTC.

### ValidationError

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

### ValidationErrorLocItems

- string
- integer

## Examples

**Response**

```json
{
  "results": [
    {
      "user_id": 1,
      "user_name": "string",
      "user_email": "string",
      "identification_number": "string",
      "user_status": "string",
      "headquarter": "string",
      "position": "string",
      "level": "string",
      "area": "string",
      "courses_enrolled": 0,
      "courses_completed": 0,
      "courses_in_progress": 0,
      "avg_progress_percentage": 0,
      "certificates_obtained": 0,
      "total_hours": 0,
      "last_activity_at": "2024-01-15T09:30:00Z"
    }
  ],
  "total": 1,
  "next_cursor": "string",
  "has_next_page": false
}
```

**SDK Code**

```python
import requests

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

headers = {
    "Secret-Access": "Secret-Access",
    "Api-Key": "<apiKey>"
}

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

print(response.json())
```

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

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"
	"net/http"
	"io"
)

func main() {

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

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

	req.Header.Add("Secret-Access", "Secret-Access")
	req.Header.Add("Api-Key", "<apiKey>")

	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/users-summary/")

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>'

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/users-summary/")
  .header("Secret-Access", "Secret-Access")
  .header("Api-Key", "<apiKey>")
  .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/users-summary/', [
  'headers' => [
    'Api-Key' => '<apiKey>',
    '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/users-summary/");
var request = new RestRequest(Method.GET);
request.AddHeader("Secret-Access", "Secret-Access");
request.AddHeader("Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Secret-Access": "Secret-Access",
  "Api-Key": "<apiKey>"
]

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

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()
```