LMS365 allows to enroll users in a specific session of a course of the Enroll user into a single course session or Enroll user into multiple course sessions enrollment types via LMS365 Admin Center functionality or by using LMS365 API endpoints.
There are two approaches to enroll a user in a session of a course of these enrollment types, first is dedicated to a simple enrollment in a course without selecting session(s), and the second allows to set various additional parameters during the enrollment, including enrolling in a particular session for courses of the Enroll user into a single course session enrollment type or enrolling in multiple selected sessions for courses of the Enroll user into multiple course sessions enrollment type.
This article describes the second approach with APIs to use and steps to perform. The process consists of two main actions - enrolling in a course and then associating the enrollment with specific course sessions by enrolling in them.
In this article
Enroll in an Instructor-Led Training course
To enroll a user in a specific session of an Instructor-Led Training of the Enroll user into a single course session or in several sessions in a course of the Enroll user into multiple course sessions enrollment types, do the following:
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 Enrollments section, expand it, find the POST method /odata/v2/Enrollments endpoint with the Creates an Enrollment. description and click Try it out.
3. After you click Try it out, in the Edit Value field you need to fill in the required parameters and configure others if needed or delete them:
- "CourseId": "guid", where guid should be replaced with the ID of the relevant course.
- "UserId": "guid", where guid should be replaced with the ID of the user you want to enroll in a course session.
- "UserLoginName": "string", where string should be replaced with the login name of the user you want to enroll in a course session.
- "RegistrationStatus": "integer" where integer should be replaced with 0.
For example, the request may look like this:
{ "CourseId": "7bb988b8-140a-4ee5-9141-5863868e719f", "UserId": "903e8297-0c1f-4d4d-85ee-12aa2530a0b7", "UserLoginName": "i:0#.f|membership|AdeleV@lms365preview.onmicrosoft.com", "RegistrationStatus": "0" }
4. When ready, select the blue Execute button to run the request.
5. Go to the Responses block to check the results:
- Number 2xx (for example, 200) under Code shows that the request worked correctly.
- At this step the user will be enrolled in the course, but not in any of its sessions. In the Response body field you will see the enrollment ID after "value", please copy it for further steps to finish enrolling a user in specific course session(s).
You can download this data in a JSON file format via the Download button.
Enroll in sessions of an Instructor-Led Training course
After a user is enrolled in a course, you can associate user's enrollment with exact sessions of this course. Depending on the enrollment type, it can be a single one or multiple sessions. To do this:
1. Go to the Enrollments section, find the GET /odata/v2/Enrollments({Id})/AssociateWithCourseSession with the Associates enrollment with course session description, expand it and click Try it out.
2. After you click Try it out, you need to fill in the required parameters:
- key:Id where you need to insert the enrollment ID from the response from the step 4 above.
TIP
If the user has already been enrolled in the relevant course, but not in the selected course session(s), you can find the user's enrollment ID for this step via the command GET /odata/v2/Enrollments with the Returns the list of current user's active Enrollments description. For the $filter query option parameter enter CourseId eq Id, where Id should be replaced with the ID of the relevant course. Select Execute to run the request.
Go to the Response body to see the results of the request. The value next to the "Id" parameter is the the enrollment ID which you can copy to for the further enrolling of the user in the required course session.
- Delete the courseSessionId parameter as it is deprecated with the August release 2022.
- For "courseSessionIds": "guid" replace guid with the ID of the course session(s) you want to enroll a user in.
To enroll in a single session for courses of the Enroll user into a single course session enrollment type, use the selected session's ID. For example:
{ "courseSessionIds": [ "d9080ef9-848a-453b-af7e-2aeb7944ac99" ] }
To enroll into multiple sessions for courses of the Enroll user into multiple course sessions enrollment type, you need to mention the ID of each session. For example:
{ "courseSessionIds": [ "d9080ef9-848a-453b-af7e-2aeb7944ac99", "f749c75b-335a-4869-a729-b859fbd04d6a" ] }
3. When ready, select the blue Execute button.
4. Go to the Responses block to check the results:
- Number 2xx (for example, 204) under Code shows that the request worked correctly.
- At this step the user will be successfully enrolled in the selected course session. To ensure this, go to the LMS365 Admin Center > select the relevant course > Manage People > check the Name and Sessions columns to see if the required user is enrolled in the relevant course session.
- You can download this data in a JSON file format via the Download button.
Comments
Article is closed for comments.