Skip to main content

Get Course Info

This endpoint retrieves a specific course information; you can also emulate a specific community user using the user parameter.

info

The view param with values edit and dashboard needs creator or manager role.
The user making the request must be the creator or a manager although the user parameter will be passed to emulate a specific user.

info

If course privacy is:

  • empty string (draft mode): only creator and managers can see the course;
  • open: anyone can see and join the course;
  • private: only invited members can see the course; non-members will see the lock screen (only basic data: Course Minimal);
  • secret: only invited members can see the course.
info

This operation requires authentication if content_availability community option is false.

HTTP Request

GET /api/v2/course/{id}/

Parameters

NameInTypeRequiredDescription
idpathintegertrueA unique integer value identifying this course
viewquerystringfalseRecover the course data for a specific view
userbodyintegerfalseA unique integer value identifying the user; required creator or manager role

Enumerated Values

ParameterValueDescription
» viewuserDefault value; recover the data of a course for a generic user (sections empty and lessons in draft mode will be hidden)
» vieweditLike user but include any section and lesson; user must be a creator or manager of the course
» viewdashboardRecover useful data for the dashboard; user must be a creator or manager of the course

Example Request

const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/course/{id}/',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

view = user

StatusMeaningDescriptionSchema
200OKResponse status codeCourse User Detail

view = edit

StatusMeaningDescriptionSchema
200OKResponse status codeCourse Detail

view = dashboard

StatusMeaningDescriptionSchema
200OKResponse status codeCourse Dashboard