Enroll users in a course via API

LMS365 allows the enrolling of users in a course via the LMS365 Admin Center functionality as well as using LMS365 API. This article describes what LMS365 API endpoint to use to enroll users in courses.

 

To enroll a user in an LMS365 course:

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

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 course 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.

  • courseSessionIdis required when you want to enroll a user in one or more course sessions of an Instructor-Led Training course of the Enroll user into a single course session or Enroll user into multiple course sessions enrollment types, respectively.

NOTE   

  • You must use only the courseSessionIds parameter. Please delete the courseSessionId parameter from the request body. 

 

When enrolling in a course with the Enroll user into a single course session enrollment type, replace "guid" with the ID of the single relevant session.

When enrolling in a course with the Enroll user into multiple course sessions enrollment type, enter the ID of each of the sessions you want to enroll a user in. Session IDs should be separated with a comma. 

 

Here is an example of a request to enroll a user in two sessions of a course of the Enroll user into multiple course sessions enrollment type:

 

 

TIP   

There is one more approach to enroll a user in an Instructor-Led Training course of the Enroll user into a single course session or Enroll user into multiple course sessions enrollment types that allows to set various additional parameters during the enrollment process.

 

NOTE   

  • If the courseSessionIds parameter is left empty when enrolling a user in an Instructor-Led Training course with the Enroll user into a single course session or Enroll user into multiple course sessions enrollment types, the user will be enrolled in the course itself and receive an email notification asking to select one or more course sessions to finish the enrollment (depending on the enrollment type).

  • The courseSessionIds parameter should be omitted when enrolling a user in a course with the Enroll user in all course sessions enrollment type, otherwise the request will fail. Still, you can use this parameter to enroll a user in session(s) of a course with the Enroll user in all course sessions enrollment type by specifying the ID of particular session(s) of this course. The courseSessionId parameter should be deleted.

 

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 results of the request. For example, in the RegistrationDate line, you can find the date and time of the user's enrollment.

Group_21__17_.png

 

The user/group will be enrolled in the course and the enrolled users will receive a corresponding notification. You can check the user being enrolled via LMS365 Admin Center > select the relevant course > Manage People > check the list of enrolled users.

 

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

Comments

Article is closed for comments.