• Resolved isuru24

    (@isuru24)


    I am wondering if there’s an rest api endpoint for fetch the syllabus data without using the sections/{id}/content api route.

    I have noticed when we fetch a course details from the /course/${id} endpoint it contains the syllabus data inside the content object. Also its getting dynamically updated when new section or lesson been added to the course.

    But I haven’t found an api route for do the same thing for fetching the course syllabus which contains the section title and lesson title. I would like to know if that’s kind of API route is already in the Lifter LMS.

    The reason I am interested in the fetching syllabus data because I would like to build a customs lesson navigator for user to navigate between different sections and lessons within the course in my headless UI application without fetching all the content within the section lessons.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nick Mariano

    (@reddotinmotion)

    Hi @isuru24,

    At the moment, the only APIs you can use are the following:

    • To retrieve all the sections in a given course with course ID {ID}, use /courses/{ID}/content
    • To retrieve all lessons in a given section with section ID {ID}, use /sections/{ID}/content

    If you are using JavaScript to build your UI, the first REST API call will be for /courses/{ID}/content. Once that returns the list of sections, the second REST API call will loop (asynchronously) over the section IDs and then fetch the lessons for each of these sections using /sections/{ID}/content.

    On the other hand, if you need a single API call that will list both sections and the lessons they contain, a feature request for a syllabus REST API (e.g., something like /courses/{ID}/syllabus) can be filed at lifterlms.com/feature-request.

    Plugin Support Nick Mariano

    (@reddotinmotion)

    Hi @isuru24,

    As we haven’t had any response in over a week, I am going to mark this thread as resolved. Please reopen or post a new thread if you require further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.