1. Who this guide is for
This guide explains how to use the API to retrieve the training content your users have completed within a specific period, so you can record it in your company's LMS or other systems.
For each completion, you'll also receive the source learning path, so you can assign it to the correct course even when the same content is part of multiple paths. If you want to enroll users in courses before they complete content, use Training API: learning paths assigned to users instead.
Your IT team or integration partner is responsible for automating the calls (scheduling, processing, and storing the data): LibraCyber provides the data and supports you with its meaning.
Before you start, read Start here: API authentication for instructions on how to get your credentials and token.
2. The API call
GET <api_base_url>/training/completed-user-activities
with the header Authorization: Bearer <access_token>.
| Parameter | Required | Format | Purpose |
|---|---|---|---|
start_date |
Yes | YYYY-MM-DD | Start of the period |
end_date |
Yes | YYYY-MM-DD | End of the period |
lang |
No | language code (e.g. en) |
Language for content and path names |
country |
No | ISO country code (e.g. US) |
Only users from that country |
3. What you receive
| Field | Meaning |
|---|---|
Firstname, Lastname
|
First and last name |
Username, Email
|
User's username and email on the platform |
Country, Team
|
User's country and team |
External_data |
Present only if your organization has configured this data |
Learning_Code |
Content code (may be empty) |
Learning_Activity |
Content name in the requested language |
Availability_Date |
Date when the content was made available |
Start_Date |
Date when the user started the content |
Completion_Date |
Date of first completion |
Time_Spent |
Time spent by the user (hh:mm:ss) |
Effective_Duration |
Expected duration of the content (hh:mm:ss) |
Points |
Score obtained, as text (e.g. "12.00") |
Bagde |
1 if the user earned the badge, otherwise 0 |
Learning_Path_Id |
Source learning path ID. This never changes and is not language-dependent |
Learning_Path |
Name of the learning path in the requested language |
Example
{
"status": 200,
"data": [
{
"Firstname": "Mario",
"Lastname": "Rossi",
"Username": "mario.rossi",
"Email": "mario.rossi@example.com",
"Country": "IT",
"Team": "Amministrazione",
"Learning_Code": "AW-001",
"Learning_Activity": "Password",
"Availability_Date": "2026-03-06",
"Start_Date": "2026-03-17",
"Time_Spent": "00:22:35",
"Effective_Duration": "00:15:30",
"Points": "12.00",
"Completion_Date": "2026-03-25",
"Bagde": 1,
"Learning_Path_Id": "7ed6ce69-685b-4842-a0c1-dc22a98a9ed2",
"Learning_Path": "Essentials"
}
]
}
If there are no completions in the period, you'll receive:
{ "status": 204, "message": "No data found for this range of dates" }
4. Integration tips
| 💡 |
To record a completion, use both Learning_Path_Id and Learning_Code together. If the same content is part of two paths and the user completes it in both, you'll get two separate rows: this is expected behavior. |
- Request short periods (one day or one week): the response is not paginated, and with many users, a long period will produce very large responses.
- If
Learning_Pathis empty butLearning_Path_Idis present, the name is not available in the requested language: the ID is still valid. - For older completions, the source path may not be available (fields will be empty). If you need to import historical data, contact support.
5. If something doesn't work
| Code | What it means | What to do |
|---|---|---|
EXT_1000 |
A parameter is invalid (the message will specify which one) | Correct the parameter, for example the date format |
EXT_1002, EXT_1003
|
Temporary error retrieving data | Try again later; if it persists, contact support |
EXT_1004 |
Problem with the requested language | Try again without lang or with a different language |
EXT_1001 |
Token expired or invalid | Request a new token |
If the problem persists, contact support and provide the API call you made, the date and time, and the full error message. We can assist you with testing, first in the test environment and then in production.