LMS365 allows deleting courses directly in the LMS365 Admin Center or with the help of the LMS365 API. The article describes what API request to use and what steps to perform to delete a course via an LMS365 API.
LMS365 courses can be deleted with LMS365 APIs via Postman only.
When authorized in Postman, you can delete a course with the relevant API request. To do this, follow the steps:
1. To delete a course, select DELETE from the drop-down of the API request types.
2. In the textbox next to DELETE, enter https://(region)-lms.365.systems/odata/v2/Courses(id), where
- region is replaced with the relevant MS365 API endpoint which correspond to user's region.
- id is replaced the exact ID of the course you want to delete. You can get the course ID in Swagger with the help of LMS365 API.
For users of the U.S. Government GCC region the request will be:
For example, the request may look like:
3. Go to the Body tab, click the raw option button set the JSON type format from the drop-down.
Under the Body, state all the groups to delete with the course:
4.Select Send and check the response status code under Response.
Postman displays the response code returned by the API depending on the actual request method used. Hover over the response code to see a short description of the code and what it means. Some API responses also contain custom messages that can help you understand response codes.
If the API request is successfully completed and the response code is 200, the course will be deleted. To check it you can go to the Training Management of the LMS365 Admin Center.