Class ExperimentalUserResource

java.lang.Object
com.atlassian.confluence.plugins.restapi.experimental.resources.ExperimentalUserResource

@Consumes("application/json") @Produces("application/json") @Path("/user") public class ExperimentalUserResource extends Object
Non-admin user operations Experimental resource, delete this once UserResource is published.
  • Constructor Details

    • ExperimentalUserResource

      @Inject public ExperimentalUserResource(PersonService personService, GroupService groupService)
  • Method Details

    • getUser

      @ExperimentalApi @GET public Person getUser(@QueryParam("key") com.atlassian.sal.api.user.UserKey key, @QueryParam("username") String username, @QueryParam("expand") String expand)

      Get information about a user identified by either user key or username.

      Example request URI(s):

      • http://example.com/confluence/rest/api/user?username=jblogs
      • http://example.com/confluence/rest/api/user?key=402880824ff933a4014ff9345d7c0002
      Parameters:
      key - userkey of the user to request from this resource
      username - username of the user to request from this resource
      expand - properties to expand on the user
      Returns:
      the user identified by the key or username
    • getCurrent

      @GET @Path("/current") public Person getCurrent(@QueryParam("expand") String expand)
      Get information about the current logged in user.

      Example request URI(s):

      • http://example.com/confluence/rest/api/user/current
      Parameters:
      expand -
      Returns:
      the current logged in user, or anonymous if viewing is allowed by anonymous
    • getAnonymous

      @GET @Path("/anonymous") public Person getAnonymous()
      Get information about the how anonymous is represented in confluence

      Example request URI(s):

      • http://example.com/confluence/rest/api/user/anonymous
      Returns:
      anonymous
    • getGroups

      @GET @Path("/memberof") public PageResponse<Group> getGroups(@QueryParam("key") com.atlassian.sal.api.user.UserKey userKey, @QueryParam("username") String username, @QueryParam("expand") String expand, @QueryParam("start") int start, @QueryParam("limit") @DefaultValue("200") int limit, @Context javax.ws.rs.core.UriInfo uriInfo)
      Get a paginated collection of groups that the given user is a member of

      Example request URI(s):

      • http://example.com/confluence/rest/api/user/memberof?username=jblogs
      • http://example.com/confluence/rest/api/user/memberof?key=402880824ff933a4014ff9345d7c0002
      Returns:
      anonymous