V1::CategoriesController
Categories
index
Get a list of categories
URL
GET /v1/categoriesObjeto resposta
Array<Category> | The created categories |
create
Create new category
URL
POST /categoriesParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
category | Hash | The category to create |
category[name] | String | Name of the category |
category[school_id] | Integer | School of the category |
Parâmetros opcionais
Nome | Tipo | Descrição |
---|---|---|
category[description] | String | Status of the category |
Objeto resposta
Category | The created category or a list of errors |
show
Get a categories information
URL
GET /v1/categories/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
id | Integer | of the category |
Objeto resposta
Category | The requested category |
update
Update an existing category and redirect to 'show' action
URL
PUT/PATCH v1/categories/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
category | Hash | The category to update |
category[name] | String | Name of the category |
category[school_id] | Integer | School of the category |
Parâmetros opcionais
Nome | Tipo | Descrição |
---|---|---|
category[description] | String | Status of the category |
Objeto resposta
Category | The created category or a list of errors |
destroy
Change category status to 'Canceled'
URL
DELETE v1/categories/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
id | Integer | Id of an category |