All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
findAssignableUsers | GET /rest/api/3/user/assignable/search | Find users assignable to issues |
findBulkAssignableUsers | GET /rest/api/3/user/assignable/multiProjectSearch | Find users assignable to projects |
findUserKeysByQuery | GET /rest/api/3/user/search/query/key | Find user keys by query |
findUsers | GET /rest/api/3/user/search | Find users |
findUsersByQuery | GET /rest/api/3/user/search/query | Find users by query |
findUsersForPicker | GET /rest/api/3/user/picker | Find users for picker |
findUsersWithAllPermissions | GET /rest/api/3/user/permission/search | Find users with permissions |
findUsersWithBrowsePermission | GET /rest/api/3/user/viewissue/search | Find users with browse permission |
List<User> findAssignableUsers(query, sessionId, username, accountId, project, issueKey, startAt, maxResults, actionDescriptorId, recommend)
Find users assignable to issues
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: * a new issue, by providing the `projectKeyOrId`. * an updated issue, by providing the `issueKey`. * to an issue during a transition (workflow action), by providing the `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 account ID 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. This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that can be assigned the issue. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who can be assigned the issue, use Get all users and filter the records in your code. Permissions required: Permission to access Jira.
// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.UserSearchApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UserSearchApi apiInstance = new UserSearchApi();
String query = "query_example"; // String | 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 *[email protected]*. Required, unless `username` or `accountId` is specified.
String sessionId = "sessionId_example"; // String | The sessionId of this request. SessionId is the same until the assignee is set.
String username = "username_example"; // String | This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
String accountId = "accountId_example"; // String | A query string that is matched exactly against user `accountId`. Required, unless `query` is specified.
String project = "project_example"; // String | The project ID or project key (case sensitive). Required, unless `issueKey` is specified.
String issueKey = "issueKey_example"; // String | The key of the issue. Required, unless `project` is specified.
Integer startAt = 0; // Integer | The index of the first item to return in a page of results (page offset).
Integer maxResults = 50; // Integer | The maximum number of items to return. This operation may return less than the maximum number of items even if more are available. The operation fetches users up to the maximum and then, from the fetched users, returns only the users that can be assigned to the issue.
Integer actionDescriptorId = 56; // Integer | The ID of the transition.
Boolean recommend = false; // Boolean |
try {
List<User> result = apiInstance.findAssignableUsers(query, sessionId, username, accountId, project, issueKey, startAt, maxResults, actionDescriptorId, recommend);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserSearchApi#findAssignableUsers");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
query | String | 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 [email protected]. Required, unless `username` or `accountId` is specified. | [optional] |
sessionId | String | The sessionId of this request. SessionId is the same until the assignee is set. | [optional] |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
accountId | String | A query string that is matched exactly against user `accountId`. Required, unless `query` is specified. | [optional] |
project | String | The project ID or project key (case sensitive). Required, unless `issueKey` is specified. | [optional] |
issueKey | String | The key of the issue. Required, unless `project` is specified. | [optional] |
startAt | Integer | The index of the first item to return in a page of results (page offset). | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return. This operation may return less than the maximum number of items even if more are available. The operation fetches users up to the maximum and then, from the fetched users, returns only the users that can be assigned to the issue. | [optional] [default to 50] |
actionDescriptorId | Integer | The ID of the transition. | [optional] |
recommend | Boolean | [optional] [default to false] |
- Content-Type: Not defined
- Accept: application/json
List<User> findBulkAssignableUsers(projectKeys, query, username, accountId, startAt, maxResults)
Find users assignable to projects
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 takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that can be assigned issues in the projects. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who can be assigned issues in the projects, use Get all users and filter the records in your code. This operation can be accessed anonymously. Permissions required: None.
// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.UserSearchApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UserSearchApi apiInstance = new UserSearchApi();
String projectKeys = "projectKeys_example"; // String | A list of project keys (case sensitive). This parameter accepts a comma-separated list.
String query = "query_example"; // String | 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 *[email protected]*. Required, unless `accountId` is specified.
String username = "username_example"; // String | This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
String accountId = "accountId_example"; // String | A query string that is matched exactly against user `accountId`. Required, unless `query` is specified.
Integer startAt = 0; // Integer | The index of the first item to return in a page of results (page offset).
Integer maxResults = 50; // Integer | The maximum number of items to return per page.
try {
List<User> result = apiInstance.findBulkAssignableUsers(projectKeys, query, username, accountId, startAt, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserSearchApi#findBulkAssignableUsers");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKeys | String | A list of project keys (case sensitive). This parameter accepts a comma-separated list. | |
query | String | 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 [email protected]. Required, unless `accountId` is specified. | [optional] |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
accountId | String | A query string that is matched exactly against user `accountId`. Required, unless `query` is specified. | [optional] |
startAt | Integer | The index of the first item to return in a page of results (page offset). | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return per page. | [optional] [default to 50] |
- Content-Type: Not defined
- Accept: application/json
PageBeanUserKey findUserKeysByQuery(query, startAt, maxResults)
Find user keys by query
Finds users with a structured query and returns a paginated list of user keys. This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the structured query. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who match the structured query, use Get all users and filter the records in your code. Permissions required: Browse users and groups global permission. The query statements are: * `is assignee of PROJ` Returns the users that are assignees of at least one issue in project PROJ. * `is assignee of (PROJ-1, PROJ-2)` Returns users that are assignees on the issues PROJ-1 or PROJ-2. * `is reporter of (PROJ-1, PROJ-2)` Returns users that are reporters on the issues PROJ-1 or PROJ-2. * `is watcher of (PROJ-1, PROJ-2)` Returns users that are watchers on the issues PROJ-1 or PROJ-2. * `is voter of (PROJ-1, PROJ-2)` Returns users that are voters on the issues PROJ-1 or PROJ-2. * `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues PROJ-1 or PROJ-2. * `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues PROJ-1 or PROJ-2. * `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. The list of issues can be extended as needed, as in (PROJ-1, PROJ-2, ... PROJ-n). Statements can be combined using the `AND` and `OR` operators to form more complex queries. For example: `is assignee of PROJ AND [propertyKey].entity.property.path is "property value"`
// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.UserSearchApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UserSearchApi apiInstance = new UserSearchApi();
String query = "query_example"; // String | The search query.
Long startAt = 0L; // Long | The index of the first item to return in a page of results (page offset).
Integer maxResults = 100; // Integer | The maximum number of items to return per page.
try {
PageBeanUserKey result = apiInstance.findUserKeysByQuery(query, startAt, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserSearchApi#findUserKeysByQuery");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
query | String | The search query. | |
startAt | Long | The index of the first item to return in a page of results (page offset). | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return per page. | [optional] [default to 100] |
- Content-Type: Not defined
- Accept: application/json
List<User> findUsers(query, username, accountId, startAt, maxResults, property)
Find users
Returns a list of users that match the search string and property. This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the search string and property. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who match the search string and property, use Get all users and filter the records in your code. 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.
// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.UserSearchApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UserSearchApi apiInstance = new UserSearchApi();
String query = "query_example"; // String | 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 *[email protected]*. Required, unless `accountId` or `property` is specified.
String username = "username_example"; // String |
String accountId = "accountId_example"; // String | A query string that is matched exactly against a user `accountId`. Required, unless `query` or `property` is specified.
Integer startAt = 0; // Integer | The index of the first item to return in a page of results (page offset).
Integer maxResults = 50; // Integer | The maximum number of items to return per page.
String property = "property_example"; // String | 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` is specified.
try {
List<User> result = apiInstance.findUsers(query, username, accountId, startAt, maxResults, property);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserSearchApi#findUsers");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
query | String | 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 [email protected]. Required, unless `accountId` or `property` is specified. | [optional] |
username | String | [optional] | |
accountId | String | A query string that is matched exactly against a user `accountId`. Required, unless `query` or `property` is specified. | [optional] |
startAt | Integer | The index of the first item to return in a page of results (page offset). | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return per page. | [optional] [default to 50] |
property | String | 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` is specified. | [optional] |
- Content-Type: Not defined
- Accept: application/json
PageBeanUser findUsersByQuery(query, startAt, maxResults)
Find users by query
Finds users with a structured query and returns a paginated list of user details. This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the structured query. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who match the structured query, use Get all users and filter the records in your code. Permissions required: Browse users and groups global permission. The query statements are: * `is assignee of PROJ` Returns the users that are assignees of at least one issue in project PROJ. * `is assignee of (PROJ-1, PROJ-2)` Returns users that are assignees on the issues PROJ-1 or PROJ-2. * `is reporter of (PROJ-1, PROJ-2)` Returns users that are reporters on the issues PROJ-1 or PROJ-2. * `is watcher of (PROJ-1, PROJ-2)` Returns users that are watchers on the issues PROJ-1 or PROJ-2. * `is voter of (PROJ-1, PROJ-2)` Returns users that are voters on the issues PROJ-1 or PROJ-2. * `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues PROJ-1 or PROJ-2. * `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues PROJ-1 or PROJ-2. * `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. The list of issues can be extended as needed, as in (PROJ-1, PROJ-2, ... PROJ-n). Statements can be combined using the `AND` and `OR` operators to form more complex queries. For example: `is assignee of PROJ AND [propertyKey].entity.property.path is "property value"`
// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.UserSearchApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UserSearchApi apiInstance = new UserSearchApi();
String query = "query_example"; // String | The search query.
Long startAt = 0L; // Long | The index of the first item to return in a page of results (page offset).
Integer maxResults = 100; // Integer | The maximum number of items to return per page.
try {
PageBeanUser result = apiInstance.findUsersByQuery(query, startAt, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserSearchApi#findUsersByQuery");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
query | String | The search query. | |
startAt | Long | The index of the first item to return in a page of results (page offset). | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return per page. | [optional] [default to 100] |
- Content-Type: Not defined
- Accept: application/json
FoundUsers findUsersForPicker(query, maxResults, showAvatar, exclude, excludeAccountIds, avatarSize, excludeConnectUsers)
Find users for picker
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 takes the users in the range defined by `maxResults`, up to the thousandth user, and then returns only the users from that range that match the query term. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who match the query term, use Get all users and filter the records in your code. 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.
// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.UserSearchApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UserSearchApi apiInstance = new UserSearchApi();
String query = "query_example"; // String | 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 *[email protected]*.
Integer maxResults = 50; // Integer | The maximum number of items to return. The total number of matched users is returned in `total`.
Boolean showAvatar = false; // Boolean | Include the URI to the user's avatar.
List<String> exclude = Arrays.asList("exclude_example"); // List<String> | This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
List<String> excludeAccountIds = Arrays.asList("excludeAccountIds_example"); // List<String> | A list of account IDs to exclude from the search results. This parameter accepts a comma-separated list. Multiple account IDs can also be provided using an ampersand-separated list. For example, `excludeAccountIds=5b10a2844c20165700ede21g,5b10a0effa615349cb016cd8&excludeAccountIds=5b10ac8d82e05b22cc7d4ef5`. Cannot be provided with `exclude`.
String avatarSize = "avatarSize_example"; // String |
Boolean excludeConnectUsers = false; // Boolean |
try {
FoundUsers result = apiInstance.findUsersForPicker(query, maxResults, showAvatar, exclude, excludeAccountIds, avatarSize, excludeConnectUsers);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserSearchApi#findUsersForPicker");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
query | String | 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 [email protected]. | |
maxResults | Integer | The maximum number of items to return. The total number of matched users is returned in `total`. | [optional] [default to 50] |
showAvatar | Boolean | Include the URI to the user's avatar. | [optional] [default to false] |
exclude | List<String> | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
excludeAccountIds | List<String> | A list of account IDs to exclude from the search results. This parameter accepts a comma-separated list. Multiple account IDs can also be provided using an ampersand-separated list. For example, `excludeAccountIds=5b10a2844c20165700ede21g,5b10a0effa615349cb016cd8&excludeAccountIds=5b10ac8d82e05b22cc7d4ef5`. Cannot be provided with `exclude`. | [optional] |
avatarSize | String | [optional] | |
excludeConnectUsers | Boolean | [optional] [default to false] |
- Content-Type: Not defined
- Accept: application/json
List<User> findUsersWithAllPermissions(permissions, query, username, accountId, issueKey, projectKey, startAt, maxResults)
Find users with permissions
Returns a list of users who fulfill these criteria: * their user attributes match a search string. * they have a set of permissions for a project or issue. If no search string is provided, a list of all users with the permissions is returned. This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the search string and have permission for the project or issue. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who match the search string and have permission for the project or issue, use Get all users and filter the records in your code. This operation can be accessed anonymously. Permissions required: * Administer Jira global permission, to get users for any project. * Administer Projects project permission for a project, to get users for that project.
// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.UserSearchApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UserSearchApi apiInstance = new UserSearchApi();
String permissions = "permissions_example"; // String | A comma separated list of permissions. Permissions can be specified as any: * permission returned by [Get all permissions](#api-rest-api-3-permissions-get). * custom project permission added by Connect apps. * (deprecated) one of the following: * ASSIGNABLE\\_USER * ASSIGN\\_ISSUE * ATTACHMENT\\_DELETE\\_ALL * ATTACHMENT\\_DELETE\\_OWN * BROWSE * CLOSE\\_ISSUE * COMMENT\\_DELETE\\_ALL * COMMENT\\_DELETE\\_OWN * COMMENT\\_EDIT\\_ALL * COMMENT\\_EDIT\\_OWN * COMMENT\\_ISSUE * CREATE\\_ATTACHMENT * CREATE\\_ISSUE * DELETE\\_ISSUE * EDIT\\_ISSUE * LINK\\_ISSUE * MANAGE\\_WATCHER\\_LIST * MODIFY\\_REPORTER * MOVE\\_ISSUE * PROJECT\\_ADMIN * RESOLVE\\_ISSUE * SCHEDULE\\_ISSUE * SET\\_ISSUE\\_SECURITY * TRANSITION\\_ISSUE * VIEW\\_VERSION\\_CONTROL * VIEW\\_VOTERS\\_AND\\_WATCHERS * VIEW\\_WORKFLOW\\_READONLY * WORKLOG\\_DELETE\\_ALL * WORKLOG\\_DELETE\\_OWN * WORKLOG\\_EDIT\\_ALL * WORKLOG\\_EDIT\\_OWN * WORK\\_ISSUE
String query = "query_example"; // String | 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 *[email protected]*. Required, unless `accountId` is specified.
String username = "username_example"; // String | This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
String accountId = "accountId_example"; // String | A query string that is matched exactly against user `accountId`. Required, unless `query` is specified.
String issueKey = "issueKey_example"; // String | The issue key for the issue.
String projectKey = "projectKey_example"; // String | The project key for the project (case sensitive).
Integer startAt = 0; // Integer | The index of the first item to return in a page of results (page offset).
Integer maxResults = 50; // Integer | The maximum number of items to return per page.
try {
List<User> result = apiInstance.findUsersWithAllPermissions(permissions, query, username, accountId, issueKey, projectKey, startAt, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserSearchApi#findUsersWithAllPermissions");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
permissions | String | A comma separated list of permissions. Permissions can be specified as any: * permission returned by Get all permissions. * custom project permission added by Connect apps. * (deprecated) one of the following: * ASSIGNABLE\_USER * ASSIGN\_ISSUE * ATTACHMENT\_DELETE\_ALL * ATTACHMENT\_DELETE\_OWN * BROWSE * CLOSE\_ISSUE * COMMENT\_DELETE\_ALL * COMMENT\_DELETE\_OWN * COMMENT\_EDIT\_ALL * COMMENT\_EDIT\_OWN * COMMENT\_ISSUE * CREATE\_ATTACHMENT * CREATE\_ISSUE * DELETE\_ISSUE * EDIT\_ISSUE * LINK\_ISSUE * MANAGE\_WATCHER\_LIST * MODIFY\_REPORTER * MOVE\_ISSUE * PROJECT\_ADMIN * RESOLVE\_ISSUE * SCHEDULE\_ISSUE * SET\_ISSUE\_SECURITY * TRANSITION\_ISSUE * VIEW\_VERSION\_CONTROL * VIEW\_VOTERS\_AND\_WATCHERS * VIEW\_WORKFLOW\_READONLY * WORKLOG\_DELETE\_ALL * WORKLOG\_DELETE\_OWN * WORKLOG\_EDIT\_ALL * WORKLOG\_EDIT\_OWN * WORK\_ISSUE | |
query | String | 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 [email protected]. Required, unless `accountId` is specified. | [optional] |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
accountId | String | A query string that is matched exactly against user `accountId`. Required, unless `query` is specified. | [optional] |
issueKey | String | The issue key for the issue. | [optional] |
projectKey | String | The project key for the project (case sensitive). | [optional] |
startAt | Integer | The index of the first item to return in a page of results (page offset). | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return per page. | [optional] [default to 50] |
- Content-Type: Not defined
- Accept: application/json
List<User> findUsersWithBrowsePermission(query, username, accountId, issueKey, projectKey, startAt, maxResults)
Find users with browse permission
Returns a list of users who fulfill these criteria: * their user attributes match a search string. * they have permission to browse issues. Use this resource to find users who can browse: * an issue, by providing the `issueKey`. * any issue in a project, by providing the `projectKey`. This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the search string and have permission to browse issues. This means the operation usually returns fewer users than specified in `maxResults`. To get all the users who match the search string and have permission to browse issues, use Get all users and filter the records in your code. 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.
// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.UserSearchApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UserSearchApi apiInstance = new UserSearchApi();
String query = "query_example"; // String | 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 *[email protected]*. Required, unless `accountId` is specified.
String username = "username_example"; // String | This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
String accountId = "accountId_example"; // String | A query string that is matched exactly against user `accountId`. Required, unless `query` is specified.
String issueKey = "issueKey_example"; // String | The issue key for the issue. Required, unless `projectKey` is specified.
String projectKey = "projectKey_example"; // String | The project key for the project (case sensitive). Required, unless `issueKey` is specified.
Integer startAt = 0; // Integer | The index of the first item to return in a page of results (page offset).
Integer maxResults = 50; // Integer | The maximum number of items to return per page.
try {
List<User> result = apiInstance.findUsersWithBrowsePermission(query, username, accountId, issueKey, projectKey, startAt, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserSearchApi#findUsersWithBrowsePermission");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
query | String | 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 [email protected]. Required, unless `accountId` is specified. | [optional] |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
accountId | String | A query string that is matched exactly against user `accountId`. Required, unless `query` is specified. | [optional] |
issueKey | String | The issue key for the issue. Required, unless `projectKey` is specified. | [optional] |
projectKey | String | The project key for the project (case sensitive). Required, unless `issueKey` is specified. | [optional] |
startAt | Integer | The index of the first item to return in a page of results (page offset). | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return per page. | [optional] [default to 50] |
- Content-Type: Not defined
- Accept: application/json