V1::DisciplinesController
Disciplines
index
Get a list of disciplines
URL
GET /v1/disciplines or /school_products/:school_product_id/disciplines or /enrollments/:enrollment_id/disciplinesObjeto resposta
| Array<Discipline> | The created disciplines |
create
Create new discipline
URL
POST /v1/disciplinesParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| discipline | Hash | The discipline to create |
| discipline | String | name Name of the discipline |
| discipline | String | description Description of the discipline |
Objeto resposta
| Discipline | The created discipline or a list of errors |
show
Get a disciplines information
URL
GET /v1/disciplines/:id or /school_products/:school_product_id/disciplines/:id or /enrollments/:enrollment_id/disciplines/:idParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| id | Integer | of the discipline |
Objeto resposta
| Discipline | The requested discipline |
update
Update an existing discipline and redirect to 'show' action
URL
PUT/PATCH /v1/disciplines/:idParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| discipline | Hash | The discipline to create |
| discipline | String | name Name of the discipline |
| discipline | String | description Description of the discipline |
Objeto resposta
| Discipline | The created discipline or a list of errors |
destroy
Destroy discipline
URL
DELETE /v1/disciplines/:idParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| id | Integer | Id of a discipline |