For any reason you may need the ID of a session or session group of a course. To get this data, you can use LMS365 API endpoint and in this article we describe the steps to follow.
To get the ID of a specific session or session group of a course, perform the following steps:
1. Go to https://api.365.systems/ and authorize with the relevant API key. You can find more about the authorization process here.
2. Find the Courses section, expand it, find the GET method /odata/v2/Courses with the Return the list of Courses description and then click Try it out in the top left corner.
3. To narrow and control the response results, enter the following values:
- CourseSessions in the $expand field.
- CourseType eq 'ClassRoom' in the $filter field.
- If you have the ID or title of the relevant session-based course, you can narrow the response even more by entering Id eq course ID or Title eq 'course title', for example CourseType eq 'ClassRoom' and Title eq 'Data Visualization'. In this case the response will include the data about this course only.
- You can use other query options parameters to control the data in the response.
When ready, select Execute to run the request.
4. Go to the Responses block to check the results:
- Number 2xx (for example, 200) under >Code shows that the request worked correctly. The results can be downloaded via the Download option in the JSON file format.
- In the Response body field, you will see the list of all courses of the tenant if no filters were set to narrow the response. You can use search Ctrl+F to look for the relevant course and its data and copy it for further usage.
- Under the CourseSessions parameter you will see data about the sessions and session groups of the course.
For standalone sessions: Session ID is shown next to the Id parameter. GroupId has null shown. The IsGroup parameter shows false.
For sessions inside session groups: Session ID is shown next to the Id parameter. GroupId shows the ID of the session group the session is included in. The IsGroup parameter shows false.
For session groups: Session group ID is shown next to the Id parameter. GroupId shows null. The IsGroup parameter shows true.
Here is an example of a response data for a session inside a session group.
Article is closed for comments.