Services can be listed in a category. Categories can be presented like a tree. Root categories are defined with empty {parent_id}.
Attributes
| Name | Type | Description |
|---|---|---|
| id | Integer | Automatically set |
| created_at | Datetime | Automatically set |
| updated_at | Datetime | Automatically set |
| title | String | Required |
| parent_id | Integer | |
| custom_data | Array | Not required. |
| priority_value | Integer | Not required. Priority value for ordering. |
Listing
GET /categories will return all categories.
Response
[
{
"category": {
"created_at": "2012-09-20T15:34:16+02:00",
"custom_data": null,
"id": 1,
"parent_id": null,
"title": "My first little category",
"updated_at": "2012-09-20T15:34:16+02:00"
}
}
]
Get category
GET /categories/{category_id} will get a category with id {category_id}.
Add new category
POST /categories will create a new category. To add connected services specify array of {service_id} in parameter {service_id_list}.
Update category
PUT /categories/{category_id} will update existing category with id {category_id}. To add connected services specify array of {service_id} in parameter {service_id_list}.
Delete category
DELETE /categories/{category_id} will delete existing category with id {category_id}.
List services
GET /categories/{category_id}/services will return all services for category with id {category_id}.
For any additional usage of a service please use the main service endpoint.