Class UserResource

java.lang.Object
com.atlassian.confluence.functest.rest.admin.UserResource

@Consumes("application/json") @Produces("application/json") @Path("/admin/user") public class UserResource extends Object
User management features missing from core Confluence today.

Shamelessly copy-pasta'd from the Crowd REST Plugin SearchResource and SearchController, with simplifications to make it use the CrowdService, instead of the ApplicationService.

  • Field Details

  • Constructor Details

    • UserResource

      @Inject public UserResource(com.atlassian.crowd.embedded.api.CrowdService crowdService, PersonService personService, UserAccessor userAccessor)
  • Method Details

    • searchUsers

      @POST @Path("/search/user") public javax.ws.rs.core.Response searchUsers(SearchRestrictionEntity searchRestrictionEntity, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • searchGroups

      @POST @Path("/search/group") public javax.ws.rs.core.Response searchGroups(SearchRestrictionEntity searchRestrictionEntity, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • deleteUser

      @DELETE @Path("/{userKey}") public UserResource.LongTaskSubmission deleteUser(@PathParam("userKey") String userKey)
    • unsyncUser

      @DELETE @Path("/unsync/{username}") public void unsyncUser(@PathParam("username") String username) throws com.atlassian.crowd.exception.OperationNotPermittedException
      Throws:
      com.atlassian.crowd.exception.OperationNotPermittedException
    • countUnsyncedUsers

      @GET @Path("/unsynced/count") public javax.ws.rs.core.Response countUnsyncedUsers()