How to get courses in a category and any subcategories with courses

Svar: Re: How to get courses in a category and any subcategories with courses

by KS Læring -
Number of replies: 1
Thank you, Mayank!

When doing https://domain/webservice/rest/server.php?wstoken=&wsfunction=core_course_get_categories&criteria[0][key]=parent&criteria[0][value]=&moodlewsrestformat=json there seems to be key called "path" with an interesting value containing the category tree.

However, I am not sure if the current API allows querying on the "path" key?
In reply to KS Læring

Re: Svar: Re: How to get courses in a category and any subcategories with courses

by Brian Merritt -
Picture of Particularly helpful Moodlers
I haven't tried to use the path key, but with parent and all categories it should be possible to get all subcategories programatically.