Category
Create category#
Creates a new category. Requires the
ROLE_SURVEY_ADMIN role.Request body:
| Attribute | Type | Description | Nullable |
|---|---|---|---|
| name | String | Category name | false |
| active | Boolean | Whether the category is active | false |
| unavailableIfBusinessDirIds | List of integers | Identifiers of business directions for which this category is unavailable | true |
| unavailableIfGroupIds | List of integers | Identifiers of user groups for which this category is unavailable | true |
| unavailableIfUserIds | List of integers | Identifiers of users for which this category is unavailable | true |
Response
Returns the created Category object
Examples
200 OK
Update category#
Updates an existing category by id. Requires the
ROLE_SURVEY_ADMIN role.Request body:
| Attribute | Type | Description | Nullable |
|---|---|---|---|
| name | String | Category name | false |
| active | Boolean | Whether the category is active | false |
| unavailableIfBusinessDirIds | List of integers | Identifiers of business directions for which this category is unavailable | true |
| unavailableIfGroupIds | List of integers | Identifiers of user groups for which this category is unavailable | true |
| unavailableIfUserIds | List of integers | Identifiers of users for which this category is unavailable | true |
Response
Returns the updated Category object
Examples
200 OK
Delete category#
Deletes a category by id. Requires the
ROLE_SURVEY_ADMIN role.Examples
200 OK
List categories#
Returns a list of Category objects matching the given filter
Request parameters:
| Request Parameter | Type | Description | Required |
|---|---|---|---|
| active | Boolean | Filter categories by active state | false |
| quick | Boolean | Filter categories that have at least one "quick" template | false |
| notEmpty | Boolean | When true, only return categories that have at least one template. Default false | false |
Response
Returns a list of Category objects
Examples
200 OK