Package com.xebialabs.xlrelease.api.v1

# Interface RolesApi

All Superinterfaces:
  `ApiService`

@Path("/api/v1/roles") @Consumes("application/json") @Produces("application/json") public interface RolesApi extends ApiService
Operations related to roles.

- ## Field Summary

  ### 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
  `void`
  `create(String roleName, RoleView roleView)`
  `void`
  `create(List<RoleView> roleViews)`
  `void`
  `delete(String roleName)`
  `RoleView`
  `getRole(String roleName)`
  `default List<RoleView>`
  `getRoles(Integer page, Integer resultsPerPage)`
  Returns the paginated list of roles ordered by role name.
  `void`
  `rename(String roleName, String newName)`
  `List<RoleView>`
  `searchRoles(RolePrincipalsFilters filters, Integer page, Integer resultsPerPage)`
  Returns the paginated list of roles ordered by role name.
  `default List<RoleView>`
  `searchRoles(String roleName, String principalName, Integer page, Integer resultsPerPage)`
  Returns the paginated list of roles ordered by role name where role name and principal name match filter substring.
  `default String`
  `serviceName()`
  `void`
  `update(String roleName, RoleView roleView)`
  `void`
  `update(List<RoleView> roleViews)`

- ## Method Details

  - ### serviceName

    default String serviceName()
    Specified by:
      `serviceName` in interface `ApiService`

  - ### searchRoles

    @GET List<RoleView> searchRoles(@BeanParam RolePrincipalsFilters filters, @DefaultValue("0") @QueryParam("page") Integer page, @DefaultValue("100") @QueryParam("resultsPerPage") Integer resultsPerPage)
    Returns the paginated list of roles ordered by role name.
    Parameters:
      `filters` - filter by role name, or principal name
      `page` - the page of results to return. Default value is 0.
      `resultsPerPage` - the number of results per page. Default value is 100. Maximum value is 100.
    Returns:
      a list of roles.

  - ### searchRoles

    default List<RoleView> searchRoles(String roleName, String principalName, Integer page, Integer resultsPerPage)
    Returns the paginated list of roles ordered by role name where role name and principal name match filter substring.
    Parameters:
      `roleName` - role name filter
      `principalName` - principal name filter
      `page` - the page of results to return
      `resultsPerPage` - the number of results per page. Maximum value is 100.
    Returns:
      a list of matching roles

  - ### getRoles

    default List<RoleView> getRoles(@DefaultValue("0") @QueryParam("page") Integer page, @DefaultValue("100") @QueryParam("resultsPerPage") Integer resultsPerPage)
    Returns the paginated list of roles ordered by role name.
    Parameters:
      `page` - the page of results to return. Default value is 0.
      `resultsPerPage` - the number of results per page. Default value is 100. Maximum value is 100.
    Returns:
      a list of roles.

  - ### getRole

    @GET @Path("/{roleName:.*[^/]*}") RoleView getRole(@PathParam("roleName") String roleName)

  - ### create

    @POST @Path("/{roleName:.*[^/]*}") void create(@PathParam("roleName") String roleName, RoleView roleView)

  - ### create

    @POST void create(List<RoleView> roleViews)

  - ### update

    @PUT @Path("/{roleName:.*[^/]*}") void update(@PathParam("roleName") String roleName, RoleView roleView)

  - ### update

    @PUT void update(List<RoleView> roleViews)

  - ### delete

    @DELETE @Path("/{roleName:.*[^/]*}") void delete(@PathParam("roleName") String roleName)

  - ### rename

    @POST @Path("/{roleName:.*[^/]*}/rename") void rename(@PathParam("roleName") String roleName, @QueryParam("newName") String newName)