Package com.xebialabs.xlrelease.api.v1

## Interface CategoryApi

- All Superinterfaces:
    `ApiService`

      @Path("/api/v1/categories")
      @Consumes("application/json")
      @Produces("application/json")
      public interface CategoryApi
      extends ApiService

  Operations on categories.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `SERVICE_NAME` |

    - ### Fields inherited from interface com.xebialabs.xlrelease.api.ApiService

      `DEFAULT_RESULTS_PER_PAGE, DEFAULT_RESULTS_PER_PAGE_STRING, DEPTH, ORDER_BY, PAGE, PAGE_IS_OFFSET, RESULTS_PER_PAGE, ROLE_IDS_DATA`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Category` | `addCategory​(CategoryForm categoryForm)` | Create new category
    `Category` | `addCategory​(Category category)` |
    `void` | `deleteCategory​(java.lang.Integer ciUid)` | Deletes a category
    `default java.util.List<CategoryView>` | `searchCategories​(CategoryFilters categoryFilters, int page, int resultsPerPage)` | Gets List of categories
    `org.springframework.data.domain.Page<CategoryView>` | `searchCategoriesPage​(CategoryFilters categoryFilters, int page, int resultsPerPage)` | Searches categories by filters
    `default java.lang.String` | `serviceName()` |
    `Category` | `updateCategory​(java.lang.Integer ciUid, Category category)` | Updates the category

- - ### Field Detail

    - #### SERVICE_NAME

          static final java.lang.String SERVICE_NAME

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### serviceName

          default java.lang.String serviceName()

      Specified by:
        `serviceName` in interface `ApiService`

    - #### searchCategoriesPage

          @GET
          org.springframework.data.domain.Page<CategoryView> searchCategoriesPage​(@BeanParam
                                                                                  CategoryFilters categoryFilters,
                                                                                  @DefaultValue("0") @QueryParam("page")
                                                                                  int page,
                                                                                  @DefaultValue("100") @QueryParam("resultsPerPage")
                                                                                  int resultsPerPage)

      Searches categories by filters
      Parameters:
        `categoryFilters` - the query parameters derived from CategoryFilters property names used as a search criteria
        `page` - the page of results to return. Default value is 0.
        `resultsPerPage` - the number of results per page. Default and maximum value is 100.
      Returns:
        the list of matching categories with the amount of workflows using it

    - #### searchCategories

          default java.util.List<CategoryView> searchCategories​(CategoryFilters categoryFilters,
                                                                int page,
                                                                int resultsPerPage)

      Gets List of categories
      Parameters:
        `categoryFilters` - the search criteria
        `page` - the page of results to return. Default value is 0.
        `resultsPerPage` - the number of results per page. Default and maximum value is 100.
      Returns:
        found `List<CategoryView>` object

    - #### addCategory

          @POST
          Category addCategory​(CategoryForm categoryForm)

      Create new category
      Parameters:
        `categoryForm` - the content of the category
      Returns:
        created category

    - #### addCategory

          Category addCategory​(Category category)

    - #### updateCategory

          @PUT
          @Path("{ciUid:.*}")
          Category updateCategory​(@PathParam("ciUid")
                                  java.lang.Integer ciUid,
                                  Category category)

      Updates the category
      Parameters:
        `ciUid` - the identifier of the category
        `category` - new content of the category
      Returns:
        the updated category

    - #### deleteCategory

          @DELETE
          @Path("{ciUid:.*}")
          void deleteCategory​(@PathParam("ciUid")
                              java.lang.Integer ciUid)

      Deletes a category
      Parameters:
        `ciUid` - the identifies of the category