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)`
  `List<RoleView>`
  `getRoles(Integer page, Integer resultsPerPage)`
  Returns the paginated list of roles ordered by role name.
  `void`
  `rename(String roleName, String newName)`
  `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`

  - ### getRoles

    @GET 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)