Generate the training duration report via API

Introduction

By default, the Training duration report shows the expected amount of time that learners spend on training (as specified in the training settings) in the current catalog.

LMS admins and Microsoft 365 global admins can choose to track the actual amount of time learners took to complete e-learning courses, based on how long they spent consuming content displayed in the Learn365 player. Time spent in content that is launched and accessed outside of the Learn365 player isn't tracked.

You can generate the report in the Learn365 Admin Center or via API.

In this article, we describe the steps you should follow to generate the two variants of the Training duration report via API.

 

Generate the training duration report - expected duration

NOTES  

Keep in mind the specifics of the Training duration - expected duration report:

  • The report shows the time that learners spent on completed training only.
  • The report shows only the training completed between the startDate and endDate query parameters.
  • The report includes users and completed training regardless of their current activity status (active or inactive).
  • The report shows only training that has the duration parameter set up. To see if a course has this parameter, send the GET odata/v2/Courses request following the steps from this article, find the relevant course in the response, and check if it has the Duration parameter set up.
    To see if a training plan has this parameter, go to the Learn365 Admin Center > Training Management > select a training plan > Manage Training Plan Settings and, in the Basic details section, check if the Duration (standard formats) or the Duration parameters are set up.

 

Before generating the report, you’ll need the ID of the course catalog to which the needed training belongs. You can find this via the API by following the steps in this article.

To generate the Training duration (expected duration) report via API:

1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.

2. In the Reports section, select the GET /reports/trainingDuration/learnersTrainingDuration endpoint and select Try it out in the top right-hand corner.

3. Enter the following required query parameters:

  • courseCatalogId: ID of a course catalog.
  • startDate: date and time from which training is taken into account, for example, 2024-01-15T15:00:00.00Z. The report contains only training completed after the start date.
  • endDate: date and time until which training is taken into account, for example, 2024-07-15T15:00:00.00Z. The report contains only training completed before the end date.

 

NOTE

For both endDate and startDate, you can enter the date in the d-m-yyyy or d/m/yyyy formats without entering the time, for example, 1-15-2024 or 1/15/2024.

 

4. Select Execute to run the request.

 

Training duration report API request expected duration

 

5. Go to the Response block to check the results:

  • 200 code with a list of learners and training data in its body means the successful response.
  • 200 code with an empty body means there is no data to display. In this case, you can change the request parameters, for example, expand the date range.
  • In case of an error, the response body contains the error object with the code and message keys explaining the issue.

Data in a successful response is split by learners and contains:

  • LearnerName: full name of a learner.
  • Email: a learner’s email address.
  • Department: a department to which a learner belongs.
  • CourseInfo array with a list of every course or training plan that a learner completed during the specified time period. Every course or training plan has the following details:
    • CourseCatalogName: the name of the catalog.
    • CourseName: the name of the training that a learner completed.
    • CourseCategory: a category to which training belongs.
    • CourseDuration: the duration of the course or training plan (in minutes) in the way it was specified in the Duration field of the course or training plan configuration panel. The report shows the duration that was valid when the learner enrolled in the training.
    • CompletionDate: date and time when a learner completed their training.

 

Training duration report API response

 

Generate the training duration report - actual duration

NOTES  

Keep in mind the specifics of the Training duration - actual duration report:

  • This can be used only if the User real time tracking option is enabled in the Learn365 Admin Center > Global settings > LMS Configuration > Preview features.
  • The report shows the time that learners spent on completed training only.

 

Before generating the report, you’ll need the enrollment ID for the specific training you want to track. You can find this via the API by following the steps in this article.

To generate the Training duration (actual duration) via API:

1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.

2. In the Reports section, select the GET /reports/trainingDuration/learnerActualTrainingDuration endpoint and select Try it out in the top right-hand corner.

3. In the enrollmentId query parameter, enter the enrollment ID for the training you want to track.

4. Select Execute to run the request.

 

Training duration report API request actual duration

 

5. Go to the Response block to check the results.

  • 200 code with a list of learning sessions and training duration data in its body means the successful response.
  • 404 code means there is no data to display for the enrollment ID specified in the request.
  • In case of an error, the response body contains the error object with the code and message keys explaining the issue.

Data in a successful response:

  • UserName: username of the learner.
  • CourseId: the ID of the course.
  • CourseName: the title of the course.
  • CourseStatus: Completed.
  • RealDurationMinutes: the actual amount of time the learner spent in the learning session.
  • StartDateTime: the date and time the learner started the learning session.
  • EndDateTime: the date and time the learner left the Learn365 player or completed the course.

 

Training duration report API request expected duration

 

Was this article helpful?
1 out of 1 found this helpful

Comments

Article is closed for comments.