GET /courses/:courseId/content
GET /courses/:courseId/content
GET /api/courses/[courseId]/content - Get course content with modules and activities Supports preview mode: instructors can preview their own courses regardless of publish status Verify authentication with Clerk Get user's profile for permission checking Fetch course with instructor_id for permission checking Check permissions: allow access if: 1. User is admin/super_admin 2. User is the instructor (can preview their own courses, including drafts) 3. Course is published (anyone can view published courses) Fetch modules Continue with empty modules array Fetch activities for each module
Endpoint
GET /courses/:courseId/content
Authentication
This endpoint requires authentication. Include your authentication token in the request headers.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
courseId | string | Path parameter |
Error Responses
| Status Code | Error Code | Description |
|---|---|---|
| 401 | HTTP_401 | Unauthorized |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 403 | HTTP_403 | Forbidden |
| 500 | HTTP_500 | Internal Server Error |
Example Request
curl -X GET "https://api.allurelms.com/courses/courseId-value/content" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"