V1::CoursesController

Courses

index

Get a list of courses

URL

GET /courses or /school_products/:school_product_id/courses or /enrollments/:enrollment_id/courses

Objeto resposta

Array<Course>

The created courses

create

Create new course

URL

POST /courses

Parâmetros obrigatórios

Nome Tipo Descrição
course Hash

The course to create

course String

course[name] Name of the course

Parâmetros opcionais

Nome Tipo Descrição
course String

course[description] Description of the course

course String

course[image_url] URL of the course image

course Integer

course[duration] Duration of the course

course String

course[code]

course Boolean

course[ready]

course Array<Integer>

course[course_modules_ids]

Objeto resposta

Course

The created course or a list of errors

show

Get a courses information

URL

GET /courses/:id or /school_products/:school_product_id/courses/:id or /enrollments/:enrollment_id/courses/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

of the course

Objeto resposta

Course

The requested course

update

Update an existing course and redirect to 'show' action

URL

PUT/PATCH /courses/:id

Parâmetros obrigatórios

Nome Tipo Descrição
course Hash

The course to create

course String

course[name] Name of the course

Parâmetros opcionais

Nome Tipo Descrição
course String

course[description] Description of the course

course String

course[image_url] URL of the course image

course Integer

course[duration] Duration of the course

course String

course[code]

course Boolean

course[ready]

course Array<Integer>

course[course_modules_ids]

Objeto resposta

Course

The created course or a list of errors

destroy

Destroy course

URL

DELETE /courses/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Id of a course

duplicate

Duplicate course

URL

POST /courses/:id/duplicate

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Id of a course