It's possible to delete courses directly in the Learn365 Admin Center or via the Learn365 API. The article describes how to delete a course via the Learn365 API.
NOTE
Learn365 courses can be deleted with Learn365 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)-api.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 the Learn365 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-api.365.systems/odata/v2/Courses(e93940b8-a6b5-43f6-b0bd-ba6c3cc76b38)
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}
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 Learn365 Admin Center.
Comments
Article is closed for comments.