Learning
Get course content
Returns all published units and content for an enrolled course, with the user's progress for each content item.
ProductionStagingUAT
GEThttps://ankiren.com/api/courses/{courseId}/content
Parameters
Path Parameters
- courseIdintegerpathRequired
Responses
200 · Course content with progress
- courseobject
- idinteger
- namestring
- descriptionstring?
- imageUrlstring?
- units[CourseUnit]
- idinteger
- courseIdinteger
- externalIdstring?
- titlestring
- descriptionstring?
- sortOrderinteger
- imageUrlstring<uri>?
- status"draft" | "published" | "archived"
- createdAtstring<date-time>
- updatedAtstring<date-time>
- contents[CourseContent]
- progressobject
- completedinteger
- totalinteger
- percentageinteger
application/json
{ "course": { "id": 0, "name": "string", "description": "string", "imageUrl": "string" }, "units": [ { "id": 1, "courseId": 1, "externalId": "unit-hiragana-01", "title": "Hiragana Basics", "description": "Learn the basic hiragana characters", "sortOrder": 0, "imageUrl": "https://ankiren.com", "status": "published", "createdAt": "2026-01-01T00:00:00.000Z", "updatedAt": "2026-01-01T00:00:00.000Z", "contents": [ { "id": 1, "unitId": 1, "externalId": "content-hiragana-intro", "name": "Introduction to Hiragana", "type": 1, "lesson": "string", "sortOrder": 0, "videoUrl": "https://example.com/videos/hiragana-intro.mp4", "pdfUrl": "https://example.com/pdfs/hiragana-guide.pdf", "totalScore": 100, "status": "published", "createdAt": "2026-01-01T00:00:00.000Z", "updatedAt": "2026-01-01T00:00:00.000Z", "progress": { "id": 1, "userId": "user_abc123", "contentId": 1, "status": "completed", "score": 85, "totalQuestions": 10, "completedAt": "2026-01-01T00:00:00.000Z", "updatedAt": "2026-01-01T00:00:00.000Z" } } ] } ], "progress": { "completed": 5, "total": 10, "percentage": 50 } }
Sample Code
Đổi ngôn ngữ ở ô Language trên thanh Documentation.
cURL
curl -X GET 'https://ankiren.com/api/courses/{courseId}/content' \
-H 'Authorization: Bearer <token>' \
-H 'Accept: application/json'