Enrolling learners in training plans via API

LMS365 allows enrolling of users in courses and training plans via the LMS365 Admin Center functionality as well as using LMS365 API. This article describes the enrollment in training plan via the LMS365 API. 

To enroll a user in a training plan, follow the steps:

1. Navigate to https:/api.365.systems/ and authorize with the relevant API key. You can find more about the authorization process here.

NOTE   

To enroll a user in a training plan the same API endpoint is used as for enrollment in an e-Learning and Instructor-Led Training courses.

2. In the list of LMS365 Cloud API sections, find the Courses section, expand it, find the POST method /odata/v2/Courses({Id})/Enroll with the Enrolls user or group into a Course description, and select Try it out.

 

 

3. After you select Try it out, two fields will be displayed. You will need to fill in the required parameters:

  • key:Id where you need to enter the ID of the training plan you want to enroll a user or a group in, and
  • userLoginName under the Edit Value, where you need to replace the string in the "userLoginName": "string" with the login name of the user you want to enroll in a course.

 

4. When you are ready, select the Execute button to run the request.

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

  • Number 2xx (for example, 201) under Code shows that the request worked correctly.
  • In the Response body field, you will see the details of the enrollment in the request response. The user will be enrolled in the training plan and in all of the courses of this training plan which can be checked via LMS365 Admin Center > select the relevant training plan > Manage People.

 

 

NOTE   

The response will contain the following important information:

  • "Roles" - Differs depending on whether the user has a course admin role during enrolling in the training plan via API or not.

If a user has no admin role assigned in a training plan - the Learner role only will be displayed in the response for this user. If a user assigned as a training plan admin is enrolled in this training plan via API, the API response will display two roles for this user - Learner (learner) and Teacher (admin).

 

 

  • "RegistrationStatus" - Differs depending on the enrollment flow configured for the training plan. It can be Active for training plans with the Automatic Approval enrollment flow or Awaiting for training plans with the Administrator or Line Manager Approval enrollment flows. The status can be changed from Awaiting to Active via the LMS365 Admin Center functionally or with the help of LMS365  POST/odata/v2/Enrollments({Id})/Approve or POST/odata/v2/Enrollments({Id})/Reject API endpoints respectively.

 

 

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

Comments

Article is closed for comments.