Deleting courses via LMS365 API

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.

NOTE   

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.

 

1201.png

 

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.

TIP

For users of the U.S. Government GCC region the request will be:

https://va-api.usgcc365.systems/odata/v2/Courses(id)

 

For example, the request may look like:

https://ne-lms.365.systems/odata/v2/Courses(e93940b8-a6b5-43f6-b0bd-ba6c3cc76b38)

 

1202.png

 

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:

{"DeleteVisitors"true,
"DeleteMembers"true,
"DeleteAdministrators":true }
1203.png

 

4.Select Send and check the response status code under Response.

 

2022-06-16_16_20_36-.png

 

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.

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

Comments

Article is closed for comments.