Class UsersResource
java.lang.Object
com.atlassian.confluence.user.extras.rest.UsersResource
@Path("/users")
@Produces({"application/json","application/xml"})
public class UsersResource
extends Object
This provides rest URLs to get Admin only user data from the system.
-
Constructor Summary
ConstructorsConstructorDescriptionUsersResource
(UsersEntityBuilder usersEntityBuilder, PermissionManager permissionManager, UserAccessor userAccessor, SpaceManager spaceManager) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
createUser
(UserCreateRequestEntity request) javax.ws.rs.core.Response
createUsers
(String usernamesStr, String emailDomain) Accepts comma-separated usernames and creates users for them, with each user's email address the username plus '@' and the domain name.javax.ws.rs.core.Response
This end point will search and return a paginated list of users based on the query provided.
-
Constructor Details
-
UsersResource
@Inject public UsersResource(UsersEntityBuilder usersEntityBuilder, PermissionManager permissionManager, UserAccessor userAccessor, SpaceManager spaceManager)
-
-
Method Details
-
getUsers
@GET public javax.ws.rs.core.Response getUsers(@DefaultValue("") @QueryParam("query") String query, @DefaultValue("") @QueryParam("spaceKey") String spaceKey, @QueryParam("start") int start, @DefaultValue("50") @QueryParam("limit") int limit) This end point will search and return a paginated list of users based on the query provided. If the current user is not authenticated or does not have the permission to execute, an 401 UNAUTHORIZED response will be returned.- Parameters:
query
- the query string. It may contain the asterisk wildcardsspaceKey
- the space key if the space admin is searching in a spacestart
- the start indexlimit
- the limit of the result- Returns:
- a list of users within the limit.
-
createUser
@POST @Path("/create") @Consumes("application/json") public javax.ws.rs.core.Response createUser(UserCreateRequestEntity request) -
createUsers
@POST @Path("/create/domain") public javax.ws.rs.core.Response createUsers(@QueryParam("usernames") String usernamesStr, @QueryParam("domain") String emailDomain) Accepts comma-separated usernames and creates users for them, with each user's email address the username plus '@' and the domain name.- Parameters:
usernamesStr
- a comma-separated list of usernames to createemailDomain
- the domain name for the email-address to create for each user- Returns:
- a map with 'created' and 'failed' usernames
-