Skip to main content
The API provides two ways to retrieve time spent records:
  1. The time a user spent on a specific attempt
  2. The **cumulative **time spent across all attempts associated with a specific learning item (e.g., activity, module, or training), or across the entire platform.
The API always returns the time spent value in seconds. Formatting the output should be handled on the client platform.

๐Ÿงช Attempt-Level Time Spent

Time spent for a specific attempt is available in the AttemptMetrics object, accessible via the Attempt -> metrics field. This applies to all learning items (e.g. trainings, modules activities). See the example below:
As shown in the example above, the attempt field is available for both training and navigation items. Within it, youโ€™ll find the time spent (in seconds) for each attempt.

๐Ÿ“Š Cumulative Time Spent

Cumulative time spent can be retrieved using the getCumulativeTimeSpent query. This query accepts several optional arguments that can be combined to filter the results.

Query Arguments

๐Ÿงพ Usage Examples

By specifying the appropriate arguments, you can retrieve cumulative time spent data for a variety of use cases:
  • โฑ๏ธ Cumulative time spent on a specific learning item (activity or module), optionally filtered by date range
  • ๐Ÿ“˜ Cumulative time spent within a learning path, optionally filtered by date range
  • ๐ŸŒ Cumulative time spent by a user across the entire platform, optionally filtered by date range