public class UserApi extends Object
| Constructor and Description |
|---|
UserApi(org.everit.http.restclient.RestClient restClient) |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Single<User> |
createUser(UserWriteBean requestBody,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Create user
Creates a user.
|
io.reactivex.Single<List<User>> |
findAssignableUsers(Optional<String> query,
Optional<String> sessionId,
Optional<String> username,
Optional<String> accountId,
Optional<String> project,
Optional<String> issueKey,
Optional<Integer> startAt,
Optional<Integer> maxResults,
Optional<Integer> actionDescriptorId,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Find users assignable to issues
Returns a list of users that can be assigned to an issue.
|
io.reactivex.Single<List<User>> |
findBulkAssignableUsers(Optional<String> query,
Optional<String> username,
Optional<String> accountId,
Optional<String> projectKeys,
Optional<Integer> startAt,
Optional<Integer> maxResults,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Find users assignable to projects
Returns a list of users who can be assigned issues in one or more projects.
|
io.reactivex.Single<List<User>> |
findUsers(Optional<String> query,
Optional<String> username,
Optional<String> accountId,
Optional<Integer> startAt,
Optional<Integer> maxResults,
Optional<String> property,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Find users
Returns a list of users that match the provided search string and property.
|
io.reactivex.Single<FoundUsers> |
findUsersForPicker(Optional<String> query,
Optional<Integer> maxResults,
Optional<Boolean> showAvatar,
Optional<List<String>> exclude,
Optional<List<String>> excludeAccountIds,
Optional<String> avatarSize,
Optional<Boolean> excludeConnectUsers,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Find users for picker
Returns a list of users whose attributes match the query term.
|
io.reactivex.Single<List<User>> |
findUsersWithAllPermissions(Optional<String> query,
Optional<String> username,
Optional<String> accountId,
Optional<String> permissions,
Optional<String> issueKey,
Optional<String> projectKey,
Optional<Integer> startAt,
Optional<Integer> maxResults,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Find users with permissions
Returns a list of users who fulfill these criteria: their user attributes match a search string.
|
io.reactivex.Single<List<User>> |
findUsersWithBrowsePermission(Optional<String> query,
Optional<String> username,
Optional<String> accountId,
Optional<String> issueKey,
Optional<String> projectKey,
Optional<Integer> startAt,
Optional<Integer> maxResults,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Find users with browse permission
Returns a list of users who fulfill these criteria: their user attributes match a search string.
|
io.reactivex.Single<User> |
getUser(Optional<String> accountId,
Optional<String> username,
Optional<String> key,
Optional<String> expand,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get user
Returns a user.
|
io.reactivex.Single<List<ColumnItem>> |
getUserDefaultColumns(Optional<String> accountId,
Optional<String> username,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get user default columns
Returns the default issue table columns for the user.
|
io.reactivex.Single<List<GroupName>> |
getUserGroups(Optional<String> accountId,
Optional<String> username,
Optional<String> key,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get user groups
Returns the groups to which a user belongs.
|
io.reactivex.Completable |
removeUser(Optional<String> accountId,
Optional<String> username,
Optional<String> key,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Delete user
Deletes a user.
|
io.reactivex.Completable |
resetUserColumns(Optional<String> accountId,
Optional<String> username,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Reset user default columns
Resets the default issue table columns for the user to the system default.
|
io.reactivex.Single<Object> |
setUserColumns(Optional<String> accountId,
Optional<List<String>> requestBody,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Set user default columns
Sets the default issue table columns for the user.
|
public io.reactivex.Single<User> createUser(UserWriteBean requestBody, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Creates a user. This resource is retained for legacy compatibility. As soon as a more suitable alternative is available this resource will be deprecated.
The option is provided to set or generate a password for the user. When using the option to generate a password, by omitting password from the request, include "notification": "true" to ensure the user is sent an email advising them that their account is created. This email includes a link for the user to set their password. If the notification isn't sent for a generated password, the user will need to be sent a reset password request from Jira.
Permissions required: Administer Jira global permission.
requestBody - (required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<User>> findAssignableUsers(Optional<String> query, Optional<String> sessionId, Optional<String> username, Optional<String> accountId, Optional<String> project, Optional<String> issueKey, Optional<Integer> startAt, Optional<Integer> maxResults, Optional<Integer> actionDescriptorId, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a list of users that can be assigned to an issue. Use this operation to find the list of users who can be assigned to:
projectKeyOrId.issueKey.issueKey and the transition id in actionDescriptorId. You can obtain the IDs of an issue's valid transitions using the transitions option in the expand parameter of Get issue.In all these cases, you can pass an accountId to determine if a user can be assigned to an issue. The user is returned in the response if they can be assigned to the issue or issue transition.
Permissions required: Permission to access Jira.
query - A query string that is matched against user attributes, such as displayName, and emailAddress, to find relevant users. The string can match the prefix of the attribute's value. For example, query=john matches a user with a displayName of John Smith and a user with an emailAddress of johnson@example.com. Required, unless username or accountId is specified.
sessionId - The sessionId of this request. SessionId is the same until the assignee is set.
(optional)username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)accountId - A query string that is matched against user accountId. The string must match the accountId exactly. Required, unless query is specified.
project - The project ID or project key (case sensitive). Required, unless issueKey is specified.
issueKey - The key of the issue. Required, unless project is specified.
startAt - The index of the first item to return in a page of results (page offset).
(optional, default to 0)maxResults - The maximum number of items to return per page. The maximum is 1000.
actionDescriptorId - The ID of the transition.
(optional)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<User>> findBulkAssignableUsers(Optional<String> query, Optional<String> username, Optional<String> accountId, Optional<String> projectKeys, Optional<Integer> startAt, Optional<Integer> maxResults, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a list of users who can be assigned issues in one or more projects. The list may be restricted to users whose attributes match a string.
This operation can be accessed anonymously.
Permissions required: None.
query - A query string that is matched against user attributes, such as displayName and emailAddress, to find relevant users. The string can match the prefix of the attribute's value. For example, query=john matches a user with a displayName of John Smith and a user with an emailAddress of johnson@example.com. Required, unless accountId is specified.
username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)accountId - A query string that is matched against user accountId. The string must match the accountId exactly. Required, unless query is specified.
projectKeys - A comma-separated list of project keys (case sensitive).
(optional)startAt - The index of the first item to return in a page of results (page offset).
(optional, default to 0)maxResults - The maximum number of items to return per page. The maximum is 1000.
restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<User>> findUsers(Optional<String> query, Optional<String> username, Optional<String> accountId, Optional<Integer> startAt, Optional<Integer> maxResults, Optional<String> property, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a list of users that match the provided search string and property.
This operation can be accessed anonymously.
Permissions required: Browse users and groups global permission. Anonymous calls or calls by users without the required permission return empty search results.
Note: This API is designed to return a small number of users with a flexible search query. As such, the sum of startAt and maxResults must be less than 1000. If the sum is greater, only results up to the 1000th result will be returned. If you wish to get a larger number of users, please use the get-all-users API (/rest/api/3/users/search) instead.
query - A query string that is matched against user attributes ( displayName, and emailAddress) to find relevant users. The string can match the prefix of the attribute's value. For example, query=john matches a user with a displayName of John Smith and a user with an emailAddress of johnson@example.com. Required, unless accountId or property is specified.
username - (optional)accountId - A query string that is matched against a user accountId. The string must match the accountId exactly. Required, unless query or property is specified.
startAt - The index of the first item to return in a page of results (page offset).
(optional, default to 0)maxResults - The maximum number of items to return per page. The maximum is 1000.
property - A query string used to search properties. Property keys are specified by path, so property keys containing dot (.) or equals (=) characters cannot be used. The query string cannot be specified using a JSON object. Example: To search for the value of nested from {"something":{"nested":1,"other":2}} use thepropertykey.something.nested=1. Required, unless accountId or query are specified.
restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<FoundUsers> findUsersForPicker(Optional<String> query, Optional<Integer> maxResults, Optional<Boolean> showAvatar, Optional<List<String>> exclude, Optional<List<String>> excludeAccountIds, Optional<String> avatarSize, Optional<Boolean> excludeConnectUsers, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a list of users whose attributes match the query term. The returned object includes the html field where the matched query term is highlighted with the HTML strong tag. A list of account IDs can be provided to exclude users from the results.
This operation can be accessed anonymously.
Permissions required: Browse users and groups global permission. Anonymous calls and calls by users without the required permission return search results for an exact name match only.
query - A query string that is matched against user attributes, such as displayName, and emailAddress, to find relevant users. The string can match the prefix of the attribute's value. For example, query=john matches a user with a displayName of John Smith and a user with an emailAddress of johnson@example.com.
maxResults - The maximum number of items to return. The maximum is 1000. The total number of matched users is returned in total.
showAvatar - Include the URI to the user's avatar.
(optional, default to false)exclude - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional, default to new ArrayList<>())excludeAccountIds - A comma-separated list of account IDs to exclude from the search results. This parameter may be specified multiple times. For example, excludeAccountIds=99:27935d01-92a7-4687-8272-a9b8d3b2ae2e,bd429c95-e27b-4423-a0bd-421cf3d69129&excludeAccountIds=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Cannot be provided with exclude.
avatarSize - (optional)excludeConnectUsers - (optional, default to false)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<User>> findUsersWithAllPermissions(Optional<String> query, Optional<String> username, Optional<String> accountId, Optional<String> permissions, Optional<String> issueKey, Optional<String> projectKey, Optional<Integer> startAt, Optional<Integer> maxResults, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a list of users who fulfill these criteria:
If no search string is provided, a list of all users with the permissions is returned.
This operation can be accessed anonymously.
Permissions required:
query - A query string that is matched against user attributes, such as displayName and emailAddress, to find relevant users. The string can match the prefix of the attribute's value. For example, query=john matches a user with a displayName of John Smith and a user with an emailAddress of johnson@example.com. Required, unless accountId is specified.
username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)accountId - A query string that is matched against user accountId. The string must match the accountId exactly. Required, unless query is specified.
permissions - A comma-separated list of permissions. The valid permissions are:
issueKey - The issue key for the issue.
(optional)projectKey - The project key for the project (case sensitive).
(optional)startAt - The index of the first item to return in a page of results (page offset).
(optional, default to 0)maxResults - The maximum number of items to return per page. The maximum is 1000.
restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<User>> findUsersWithBrowsePermission(Optional<String> query, Optional<String> username, Optional<String> accountId, Optional<String> issueKey, Optional<String> projectKey, Optional<Integer> startAt, Optional<Integer> maxResults, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a list of users who fulfill these criteria:
Use this resource to find users who can browse:
issueKey.projectKey.This operation can be accessed anonymously.
Permissions required: Browse users and groups global permission. Anonymous calls and calls by users without the required permission return empty search results.
query - A query string that is matched against user attributes, such as displayName and emailAddress, to find relevant users. The string can match the prefix of the attribute's value. For example, query=john matches a user with a displayName of John Smith and a user with an emailAddress of johnson@example.com. Required, unless accountId is specified.
username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)accountId - A query string that is matched against user accountId. The string must match the accountId exactly. Required, unless query is specified.
issueKey - The issue key for the issue. Required, unless projectKey is specified.
projectKey - The project key for the project (case sensitive). Required, unless issueKey is specified.
startAt - The index of the first item to return in a page of results (page offset).
(optional, default to 0)maxResults - The maximum number of items to return per page. The maximum is 1000.
restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<User> getUser(Optional<String> accountId, Optional<String> username, Optional<String> key, Optional<String> expand, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a user.
Permissions required: Permission to access Jira.
accountId - The accountId of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required.
(optional)username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)key - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)expand - Use expand to include additional information about users in the response. This parameter accepts multiple values separated by a comma:
groups includes all groups and nested groups to which the user belongs.applicationRoles includes details of all the applications to which the user has access.restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<ColumnItem>> getUserDefaultColumns(Optional<String> accountId, Optional<String> username, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns the default issue table columns for the user. If an accountId is not passed in the request, the calling user's details are returned.
Permissions required:
accountId - The accountId of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
(optional)username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<GroupName>> getUserGroups(Optional<String> accountId, Optional<String> username, Optional<String> key, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns the groups to which a user belongs.
Permissions required: Browse users and groups global permission.
accountId - The accountId of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required.
(optional)username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)key - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Completable removeUser(Optional<String> accountId, Optional<String> username, Optional<String> key, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Deletes a user.
Permissions required: Site administration (that is, membership of the site-admin group).
accountId - The accountId of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required.
(optional)username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)key - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Completable resetUserColumns(Optional<String> accountId, Optional<String> username, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Resets the default issue table columns for the user to the system default. If an accountId is not passed, the calling user's default columns are reset.
Permissions required:
accountId - The accountId of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
(optional)username - This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.
(optional)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<Object> setUserColumns(Optional<String> accountId, Optional<List<String>> requestBody, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Sets the default issue table columns for the user. If an accountId is not passed, the calling user's default columns are set. If no column details are sent, then all default columns are removed.
The parameters for this resource are expressed as HTML form data. For example, in curl:
curl -X PUT -d columns=summary -d columns=description https://your-domain.atlassian.net/rest/api/2/user/columns?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192'
Permissions required:
accountId - The accountId of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
(optional)requestBody - The ID of a column to set. To set multiple columns, send multiple columns parameters.
restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
Copyright © 2011–2021 Everit Kft.. All rights reserved.