Returns the paginated course catalogue visible to the current user, each entry carrying its enrolment state, progress, section and lesson counts.
Only published courses are listed, except that course creators also see their own drafts. Secret courses appear only if the caller is enrolled. Filter with search, topic_slug and type=enrolled; sort with sort_by set to alphabetical (default), latest or oldest. Pass with_categories to receive the category list alongside the courses.
Endpoint
Method:
GETPath:
/coursesEdition: Core
Controller:
CourseController@getCoursesRoute source:
fluent-community/Modules/Course/Http/course_api.php:10Controller source:
fluent-community/Modules/Course/Http/Controllers/CourseController.phpCourses with
hide_members_countenabled report astudentsCountof zero rather than omitting it.
Live sample
The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.
GET List Courses
Returns the paginated course catalogue visible to the current user, each entry carrying its enrolment state, progress, section and lesson counts.
Controller: CourseController@getCourses
Route source: fluent-community/Modules/Course/Http/course_api.php:10
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Parameters
Query Parameters
Search read via $request->getSafe() in getCourses().
Topic Slug read via $request->getSafe() in getCourses().
Type read via $request->getSafe() in getCourses().
Sort By read via $request->getSafe() in getCourses().
"alphabetical"With Categories read via $request->get() in getCourses().
Responses
Successful response