To make changes to a course session, you can use LMS365 functionality or run an update request via LMS365 API endpoints.
This article describes how to update a course session using API endpoints.
In this article
Get the data required to run the update request
Before you can make changes to a course session via API endpoints, you need to gather some information:
1. Get the ID of the course that the session is part of.
2. Get the ID of the session you want to update.
3. Get the details of the session you want to update.
- To get details of the session, use GET /odata/v2/Courses({id})/CourseSessions({courseSessionId}) with the Return the Course Session by Id description.
- Select Try it out in the top left-hand corner.
- Complete the Course Id and Course Session Id fields with the IDs from steps 1 and 2.
- Select Execute to run the request.
- Go to the Responses block to check the results.
Number 2xx (for example, 200) under Code shows that the request worked correctly.
In the Response body field, the results display the course session details, including its name, start and end dates, time zone, deadline settings, instructors, etc. Select Download to save the results of the API request to your computer in .JSON format, enabling you to use the data in the Response body field when running the request to update the course session.
Update the course session
NOTE
The PUT method used to update the course session details replaces all the session information, not just the details you provide. This means that all the parameters need to be specified, otherwise the parameters that aren't stated will be overwritten with no data.
To make changes to a course session:
1. Go to https://api.365.systems/ and log in. You can find more information about the authorization process here.
2. Find and expand the Courses section, find PUT /odata/v2/Courses({id})/CourseSessions({courseSessionId}) with the Update Course Session description. Select Try it out in the top left-hand corner.
3. Set the required and optional parameters in the courseSession/Edit Value, replacing the relevant session details you want to update. Parameters that aren't specified will be replaced with blank values (that is to say, the original parameters will be deleted).
Required parameters:
StartDate | string($date-time)
Course session start date and time when course session starts
|
EndDate | string($date-time)
Course session end date and time
|
TimeZone | string
Time zone used in course session's StartDate and EndDate Find the list and format of time zones here. |
4. When ready, select Execute to run the command.
5. Go to the Responses block to check the results.
- Number 2xx (for example, 200) under Code shows that the request worked correctly.
- In the Response body field, the results of the request are displayed. The course session details are updated.
6. To check that the course session has been updated correctly, go to the LMS365 Admin Center or the course home page of the relevant course.
Comments
Article is closed for comments.