Trainings
My Trainings
GET /trainings.json
Retrieve the authenticated user's training enrollments, teaching assignments, and upcoming classes. Paginated (30 per page).
Path Parameters
user_id
string
No
Optional user UUID to list enrollments for. Ignored unless the caller is an API user; non-API callers always see their own enrollments. Defaults to the authenticated user.
Per-row enrichment
Per-row progress is computed in batch, grouped by training_id, so the endpoint runs O(distinct trainings) queries instead of O(rows). Each enrollment is enriched as follows:
Training.subjects_count(always): integer count ofTrainingSubjectrows for the training. The fullTrainingSubjectlist is no longer included — fetch it from the training-view endpoint when needed.Training.Lessons(only whenTraining.theory == true): ground-school progress.For
type = "DISTANCE", computed from passed exams + slide-attendance.For
type = "ONSITE"/"REMOTE", computed from class attendance on pastLessonClassrows.Shape:
{ "total": <int>, "completed": <int>, "finished": <bool> }.
Training.FlightProgress(only whenTraining.flights == true):{ "completed": <int>, "total": <int> }— distinctTrainingFlighttemplates marked completed for the enrollment.
The legacy per-row Training.Progress field has been replaced by Training.Lessons (theory) and Training.FlightProgress (flights). Clients that read Progress.total / Progress.completed should switch to Lessons.total / Lessons.completed.
Removed in this revision (drop them from clients):
Training.TrainingSubject(the embedded subject list) — replaced bysubjects_count.Top-level
LessonClassper row (the flattened upcoming-class list) — query the calendar endpoint or the training-view endpoint instead.Training.PhaseandTraining.LastFlight— removed for performance. Use the manager students-list endpoint when you need them.
Response
Manager Trainings List
GET /manager/trainings.json
List all trainings for the company. Manager-only (user_group_id <= 135). Paginated (50 per page), ordered by name asc.
Per-row fields
Training.id, name, type, active, theory, flights, flights_count, competencies, metrics, announcement, start, end, color, created, plus:
students_count(int): totaltrainings_usersrows for the training (includes finished enrollments; not deduplicated by user).subjects_count(int): non-deletedtraining_subjectsrows for the training.
The previous Student and TrainingSubject association arrays are no longer returned — use the counts instead.
Response
Training View
GET /trainings/trainings/view/{id}.json
Retrieve full details for a specific training enrollment.
Path Parameters
id
string
Training ID
Response
My Subjects
GET /trainings/subjects/mine.json
Retrieve subjects assigned to the authenticated user (as student).
Response
Subject View
Manager View
GET /manager/trainings/subjects/view/{id}.json
Student View
GET /trainings/subjects/view/{enrollmentId}/{subjectId}.json
Retrieve subject details with lessons, exams, and progress.
Response
Lessons
View Lesson
GET /trainings/lessons/view/{lessonId}/{enrollmentId}.json
Retrieve lesson details and attendance records.
Lesson Slides
GET /trainings/lessons/slides/{lessonId}.json
Retrieve e-learning slides for a lesson.
View Slide
GET /trainings/lessons/slide/{slideId}.json
Retrieve a single slide with content and navigation.
Complete Lesson
POST /trainings/lessons/complete.json
Mark a lesson's slides as completed. Sent as application/x-www-form-urlencoded.
lessonId
string
Yes
Lesson ID
timeSpent
number
Yes
Time spent in seconds
enrollmentId
string
Yes
Enrollment ID
Response
Lesson Attendance
GET /trainings/lessons/attendance/{subjectId}.json
Retrieve attendance records for all lessons in a subject.
Class Sessions
View Class
GET /trainings/onsite/class/{id}.json
Retrieve class session details including attendance.
Schedule Class
POST /manager/trainings/onsite/class.json
Create or update a class session. Sent as application/x-www-form-urlencoded.
training_subject_id
string
Yes
Subject ID
training_subject_lesson_id
string
No
Lesson ID (if class covers a specific lesson)
training_subject_exam_id
string
No
Exam ID (if class is an exam session)
start
string
Yes
Start datetime
teacher_id
string
Yes
Teacher user ID
location_id
string
No
Location ID
remarks
string
No
Notes
notify
boolean
No
Send notification to students
students
string
Yes
Comma-separated student user IDs
Delete Class
GET /manager/trainings/onsite/delete_class/{classId}/true.json
Delete a scheduled class session.
Store Attendance
POST /trainings/onsite/store_attendance.json
Record attendance for a class session.
Sign Attendance
POST /trainings/onsite/sign_class.json
Digitally sign class attendance (teacher confirmation).
classId
string
Yes
Class session ID
password
string
Yes
Teacher's password for verification
Unsign Class
POST /trainings/onsite/unsign_class.json
Remove digital signature from a class.
Student Evaluation
Get Evaluation
GET /trainings/onsite/get_student_evaluation/{classId}/{userId}.json
Retrieve evaluation data for a student in a class.
Save Evaluation
POST /trainings/onsite/save_student_evaluation.json
Save student evaluation for a class session.
class_id
string
Yes
Class session ID
student_id
string
Yes
Student user ID
remarks
string
No
Evaluation remarks
measures
string
No
Evaluation measures
objectives
string
No
Learning objectives assessment
Online Exams
Exam Info
GET /trainings/exams/index/{type}:{id}.json
Retrieve exam information. Type can be subject or lesson.
Preview Exam
GET /trainings/exams/start/{enrollmentId}/{examId}.json
Preview exam details and previous attempts before starting.
Start Exam
POST /trainings/exams/start/{enrollmentId}/{examId}.json
Begin an exam attempt.
Response
Take Exam
GET /trainings/exams/do/{attemptId}.json
Retrieve exam questions for an active attempt.
Submit Answer
POST /trainings/exams/answer.json
Submit an answer to an exam question.
attemptDetailId
string
Yes
ExamAttemptDetail ID
questionOptionId
string
Yes
Selected option ID
Finish Exam
GET /trainings/exams/finish/{attemptId}.json
Submit the exam for grading.
View Result
GET /trainings/exams/view/{attemptId}.json
Retrieve exam results and (when enabled) correct answers.
Students Management
List Students
GET /manager/trainings/students/list/training:{trainingId}/finished:{finished}/group:{groupId}/pilot_group:{pilotGroupId}/username:{search}.json
Retrieve students with filtering. All filter parameters optional (use empty string to skip).
View Student
GET /manager/trainings/students/view/{enrollmentId}.json
Retrieve full student enrollment details.
Enroll Students
POST /manager/trainings/students/enroll.json
Enroll one or more students (or whole pilot groups) in a training. Sent as application/x-www-form-urlencoded or JSON.
Request Body
training_id
string
Yes
Training UUID. Must belong to the authenticated user's company.
students
array
Yes
Array of identifiers. Numeric entries are treated as user IDs. Non-numeric entries are treated as pilot group IDs and expanded server-side to all member users.
supervisor_id
string
No
UUID of the supervisor/instructor assigned to each new enrollment.
finish_before
integer
No
Deadline as a Unix timestamp. Cast to int; falsy values mean "no deadline".
Behavior
A student already enrolled in the training is skipped, unless their prior enrollment is marked
finished = true— in which case a fresh enrollment is created (re-take).Pilot group entries are expanded to their members; members already enrolled are skipped.
For each successful enrollment on an
activetraining, an in-app notification is sent to the student linking to the enrollment.
Response
results is a map keyed by user ID. The value is the saved record on success or false if that individual save failed validation.
Errors
400 Bad Request
Not a POST, empty body, missing training_id, or students is not an array.
404 Not Found
students array is empty, or training_id does not match a training in the user's company.
Save Student Notes
POST /manager/trainings/students/notes.json
Update notes for a student enrollment.
Training Calendar
GET /trainings/trainings/calendar.json
Retrieve training-related calendar events.
Query Parameters
start
string
Yes
Start date
end
string
Yes
End date
timeZone
string
Yes
IANA timezone
training
string
No
Filter by training ID
Training Certificate
GET /trainings/trainings/certificate/{enrollmentId}.json
Retrieve training completion certificate data.
Locations
List Locations
GET /trainings/locations.json
Retrieve all training locations.
View Location
GET /trainings/locations/view/{id}.json
Retrieve location details and scheduled classes.
Edit Location
POST /manager/trainings/locations/edit.json
Create or update a training location. Sent as application/x-www-form-urlencoded.
id
string
No
Location ID (omit to create new)
name
string
Yes
Location name
type
string
Yes
Location type
phone
string
No
Contact phone
address
string
No
Address
country_id
string
Yes
Country ID
timezone_id
string
Yes
Timezone ID
description
string
No
Description
Flight Missions
Unsigned Missions
GET /trainings/missions/unsigned.json
Returns all flight mission attendance records for the authenticated user that are missing a debriefing signature. Only includes missions from active trainings that have require_debriefing_signature enabled.
Response
Sign Mission Debriefing
POST /trainings/missions/sign.json
Digitally sign the debriefing for a completed flight mission. Requires the user's password for verification. Only the student who flew the mission can sign it. Signing is only possible while the training is active and within its start/end dates.
user_training_flight_id
string
Yes
UserTrainingFlight record ID
pass
string
Yes
User's account password
Response
Returns false if the record was already signed.
Manager Training Operations
List Trainings
GET /manager/trainings.json
List all trainings with student counts (admin view).
Create Training
POST /manager/trainings/trainings/create.json
Create a new training course.
name
string
Yes
Training name
type
string
Yes
Training type
theory
boolean
No
Has theory component
flights
boolean
No
Has flight component
competencies
boolean
No
Uses competency-based evaluation
template_id
string
No
Base on existing template
Training Templates
GET /manager/trainings/trainings/templates.json
List available training templates.
Teaching Report
POST /manager/trainings/trainings/teaching_report.json
Generate a teaching activity report.
training
string
Yes
Training ID
from
string
Yes
Start date
to
string
Yes
End date
Last updated