All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
bulkGetUsers | GET /rest/api/3/user/bulk | Bulk get users |
bulkGetUsersMigration | GET /rest/api/3/user/bulk/migration | Get account IDs for users |
createUser | POST /rest/api/3/user | Create user |
getAllUsers | GET /rest/api/3/users/search | Get all users |
getAllUsersDefault | GET /rest/api/3/users | Get all users default |
getUser | GET /rest/api/3/user | Get user |
getUserDefaultColumns | GET /rest/api/3/user/columns | Get user default columns |
getUserEmail | GET /rest/api/3/user/email | Get user email |
getUserEmailBulk | GET /rest/api/3/user/email/bulk | Get user email bulk |
getUserGroups | GET /rest/api/3/user/groups | Get user groups |
removeUser | DELETE /rest/api/3/user | Delete user |
resetUserColumns | DELETE /rest/api/3/user/columns | Reset user default columns |
setUserColumns | PUT /rest/api/3/user/columns | Set user default columns |
PageBeanUser bulkGetUsers(accountId, startAt, maxResults, username, key)
Bulk get users
Returns a paginated list of the users specified by one or more account IDs. 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.UsersApi;
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");
UsersApi apiInstance = new UsersApi();
List<String> accountId = Arrays.asList("accountId_example"); // List<String> | The account ID of a user. To specify multiple users, pass multiple `accountId` parameters. For example, `accountId=5b10a2844c20165700ede21g&accountId=5b10ac8d82e05b22cc7d4ef5`.
Long startAt = 0L; // Long | The index of the first item to return in a page of results (page offset).
Integer maxResults = 10; // Integer | The maximum number of items to return per page.
List<String> username = Arrays.asList("username_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> key = Arrays.asList("key_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.
try {
PageBeanUser result = apiInstance.bulkGetUsers(accountId, startAt, maxResults, username, key);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#bulkGetUsers");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountId | List<String> | The account ID of a user. To specify multiple users, pass multiple `accountId` parameters. For example, `accountId=5b10a2844c20165700ede21g&accountId=5b10ac8d82e05b22cc7d4ef5`. | |
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 10] |
username | List<String> | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
key | List<String> | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
- Content-Type: Not defined
- Accept: application/json
List<UserMigrationBean> bulkGetUsersMigration(startAt, maxResults, username, key)
Get account IDs for users
Returns the account IDs for the users specified in the `key` or `username` parameters. Note that multiple `key` or `username` parameters can be specified. 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.UsersApi;
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");
UsersApi apiInstance = new UsersApi();
Long startAt = 0L; // Long | The index of the first item to return in a page of results (page offset).
Integer maxResults = 10; // Integer | The maximum number of items to return per page.
List<String> username = Arrays.asList("username_example"); // List<String> | Username of a user. To specify multiple users, pass multiple copies of this parameter. For example, `username=fred&username=barney`. Required if `key` isn't provided. Cannot be provided if `key` is present.
List<String> key = Arrays.asList("key_example"); // List<String> | Key of a user. To specify multiple users, pass multiple copies of this parameter. For example, `key=fred&key=barney`. Required if `username` isn't provided. Cannot be provided if `username` is present.
try {
List<UserMigrationBean> result = apiInstance.bulkGetUsersMigration(startAt, maxResults, username, key);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#bulkGetUsersMigration");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
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 10] |
username | List<String> | Username of a user. To specify multiple users, pass multiple copies of this parameter. For example, `username=fred&username=barney`. Required if `key` isn't provided. Cannot be provided if `key` is present. | [optional] |
key | List<String> | Key of a user. To specify multiple users, pass multiple copies of this parameter. For example, `key=fred&key=barney`. Required if `username` isn't provided. Cannot be provided if `username` is present. | [optional] |
- Content-Type: Not defined
- Accept: application/json
User createUser(body)
Create user
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. If the user exists and has access to Jira, the operation returns a 201 status. If the user exists but does not have access to Jira, the operation returns a 400 status. Permissions required: Administer Jira global permission.
// 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.UsersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UsersApi apiInstance = new UsersApi();
Map<String, Object> body = new Map(); // Map<String, Object> | Details about the user to be created.
try {
User result = apiInstance.createUser(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#createUser");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Map<String, Object> | Details about the user to be created. |
- Content-Type: application/json
- Accept: application/json
List<User> getAllUsers(startAt, maxResults)
Get all users
Returns a list of all (active and inactive) users. Permissions required: Browse users and groups global permission.
// 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.UsersApi;
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");
UsersApi apiInstance = new UsersApi();
Integer startAt = 0; // Integer | The index of the first item to return.
Integer maxResults = 50; // Integer | The maximum number of items to return.
try {
List<User> result = apiInstance.getAllUsers(startAt, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getAllUsers");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
startAt | Integer | The index of the first item to return. | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return. | [optional] [default to 50] |
- Content-Type: Not defined
- Accept: application/json
List<User> getAllUsersDefault(startAt, maxResults)
Get all users default
Returns a list of all (active and inactive) users. Permissions required: Browse users and groups global permission.
// 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.UsersApi;
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");
UsersApi apiInstance = new UsersApi();
Integer startAt = 0; // Integer | The index of the first item to return.
Integer maxResults = 50; // Integer | The maximum number of items to return.
try {
List<User> result = apiInstance.getAllUsersDefault(startAt, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getAllUsersDefault");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
startAt | Integer | The index of the first item to return. | [optional] [default to 0] |
maxResults | Integer | The maximum number of items to return. | [optional] [default to 50] |
- Content-Type: Not defined
- Accept: application/json
User getUser(accountId, username, key, expand)
Get user
Returns a user. Permissions required: Browse users and groups global permission.
// 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.UsersApi;
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");
UsersApi apiInstance = new UsersApi();
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Required.
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 key = "key_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 expand = "expand_example"; // String | Use [expand](#expansion) to include additional information about users in the response. This parameter accepts a comma-separated list. Expand options include: * `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.
try {
User result = apiInstance.getUser(accountId, username, key, expand);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getUser");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. Required. | [optional] |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
key | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
expand | String | Use expand to include additional information about users in the response. This parameter accepts a comma-separated list. Expand options include: * `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. | [optional] |
- Content-Type: Not defined
- Accept: application/json
List<ColumnItem> getUserDefaultColumns(accountId, username)
Get user default columns
Returns the default issue table columns for the user. If `accountId` is not passed in the request, the calling user's details are returned. Permissions required: * Administer Jira global permission, to get the column details for any user. * Permission to access Jira, to get the calling user's column details.
// 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.UsersApi;
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");
UsersApi apiInstance = new UsersApi();
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
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.
try {
List<ColumnItem> result = apiInstance.getUserDefaultColumns(accountId, username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getUserDefaultColumns");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. | [optional] |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
- Content-Type: Not defined
- Accept: application/json
UnrestrictedUserEmail getUserEmail(accountId)
Get user email
Returns a user's email address. This API is only available to apps approved by Atlassian, according to these guidelines.
// 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.UsersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UsersApi apiInstance = new UsersApi();
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, `5b10ac8d82e05b22cc7d4ef5`.
try {
UnrestrictedUserEmail result = apiInstance.getUserEmail(accountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getUserEmail");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, `5b10ac8d82e05b22cc7d4ef5`. |
- Content-Type: Not defined
- Accept: application/json
UnrestrictedUserEmail getUserEmailBulk(accountId)
Get user email bulk
Returns a user's email address. This API is only available to apps approved by Atlassian, according to these guidelines.
// 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.UsersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UsersApi apiInstance = new UsersApi();
List<String> accountId = Arrays.asList("accountId_example"); // List<String> | The account IDs of the users for which emails are required. An `accountId` is an identifier that uniquely identifies the user across all Atlassian products. For example, `5b10ac8d82e05b22cc7d4ef5`. Note, this should be treated as an opaque identifier (that is, do not assume any structure in the value).
try {
UnrestrictedUserEmail result = apiInstance.getUserEmailBulk(accountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getUserEmailBulk");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountId | List<String> | The account IDs of the users for which emails are required. An `accountId` is an identifier that uniquely identifies the user across all Atlassian products. For example, `5b10ac8d82e05b22cc7d4ef5`. Note, this should be treated as an opaque identifier (that is, do not assume any structure in the value). |
- Content-Type: Not defined
- Accept: application/json
List<GroupName> getUserGroups(accountId, username, key)
Get user groups
Returns the groups to which a user belongs. Permissions required: Browse users and groups global permission.
// 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.UsersApi;
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");
UsersApi apiInstance = new UsersApi();
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
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 key = "key_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.
try {
List<GroupName> result = apiInstance.getUserGroups(accountId, username, key);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getUserGroups");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. | |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
key | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
- Content-Type: Not defined
- Accept: application/json
removeUser(accountId, username, key)
Delete user
Deletes a user. Permissions required: Site administration (that is, membership of the site-admin group).
// 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.UsersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UsersApi apiInstance = new UsersApi();
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
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 key = "key_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.
try {
apiInstance.removeUser(accountId, username, key);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#removeUser");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. | |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
key | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
resetUserColumns(accountId, username)
Reset user default columns
Resets the default issue table columns for the user to the system default. If `accountId` is not passed, the calling user's default columns are reset. Permissions required: * Administer Jira global permission, to set the columns on any user. * Permission to access Jira, to set the calling user's columns.
// 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.UsersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UsersApi apiInstance = new UsersApi();
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
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.
try {
apiInstance.resetUserColumns(accountId, username);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#resetUserColumns");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. | [optional] |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Object setUserColumns(body, accountId)
Set user default columns
Sets the default issue table columns for the user. If an account ID 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/3/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` Permissions required: * Administer Jira global permission, to set the columns on any user. * Permission to access Jira, to set the calling user's columns.
// 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.UsersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
UsersApi apiInstance = new UsersApi();
List<String> body = Arrays.asList("body_example"); // List<String> | The ID of a column to set. To set multiple columns, send multiple `columns` parameters.
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
try {
Object result = apiInstance.setUserColumns(body, accountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#setUserColumns");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | List<String> | The ID of a column to set. To set multiple columns, send multiple `columns` parameters. | [optional] |
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. | [optional] |
Object
- Content-Type: /, multipart/form-data
- Accept: application/json