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 final 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

  Modifier and Type
  Method
  Description
  `Category`
  `addCategory(CategoryForm categoryForm)`
  Create new category
  `Category`
  `addCategory(Category category)`
  `void`
  `deleteCategory(Long ciUid)`
  Deletes a category
  `default 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 String`
  `serviceName()`
  `Category`
  `updateCategory(Long ciUid, Category category)`
  Updates the category

- ## Field Details

  - ### SERVICE_NAME

    static final String SERVICE_NAME
    See Also:
      - Constant Field Values

- ## Method Details

  - ### serviceName

    default 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 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") Long 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") Long ciUid)
    Deletes a category
    Parameters:
      `ciUid` - the identifies of the category