All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
deleteUserProperty | DELETE /rest/api/3/user/properties/{propertyKey} | Delete user property |
getUserProperty | GET /rest/api/3/user/properties/{propertyKey} | Get user property |
getUserPropertyKeys | GET /rest/api/3/user/properties | Get user property keys |
setUserProperty | PUT /rest/api/3/user/properties/{propertyKey} | Set user property |
deleteUserProperty(propertyKey, accountId, userKey, username)
Delete user property
Deletes a property from a user. Note: This operation does not access the user properties created and maintained in Jira. Permissions required: * Administer Jira global permission, to delete a property from any user. * Access to Jira, to delete a property from the calling user's record.
// 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.UserPropertiesApi;
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");
UserPropertiesApi apiInstance = new UserPropertiesApi();
String propertyKey = "propertyKey_example"; // String | The key of the user's property.
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
String userKey = "userKey_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 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.deleteUserProperty(propertyKey, accountId, userKey, username);
} catch (ApiException e) {
System.err.println("Exception when calling UserPropertiesApi#deleteUserProperty");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
propertyKey | String | The key of the user's property. | |
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. | [optional] |
userKey | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [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
EntityProperty getUserProperty(propertyKey, accountId, userKey, username)
Get user property
Returns the value of a user's property. If no property key is provided Get user property keys is called. Note: This operation does not access the user properties created and maintained in Jira. Permissions required: * Administer Jira global permission, to get a property from any user. * Access to Jira, to get a property from the calling user's record.
// 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.UserPropertiesApi;
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");
UserPropertiesApi apiInstance = new UserPropertiesApi();
String propertyKey = "propertyKey_example"; // String | The key of the user's property.
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
String userKey = "userKey_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 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 {
EntityProperty result = apiInstance.getUserProperty(propertyKey, accountId, userKey, username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserPropertiesApi#getUserProperty");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
propertyKey | String | The key of the user's property. | |
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. | [optional] |
userKey | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [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
PropertyKeys getUserPropertyKeys(accountId, userKey, username)
Get user property keys
Returns the keys of all properties for a user. Note: This operation does not access the user properties created and maintained in Jira. Permissions required: * Administer Jira global permission, to access the property keys on any user. * Access to Jira, to access the calling user's property keys.
// 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.UserPropertiesApi;
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");
UserPropertiesApi apiInstance = new UserPropertiesApi();
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
String userKey = "userKey_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 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 {
PropertyKeys result = apiInstance.getUserPropertyKeys(accountId, userKey, username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserPropertiesApi#getUserPropertyKeys");
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] |
userKey | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [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
Object setUserProperty(body, propertyKey, accountId, userKey, username)
Set user property
Sets the value of a user's property. Use this resource to store custom data against a user. Note: This operation does not access the user properties created and maintained in Jira. Permissions required: * Administer Jira global permission, to set a property on any user. * Access to Jira, to set a property on the calling user's record.
// 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.UserPropertiesApi;
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");
UserPropertiesApi apiInstance = new UserPropertiesApi();
Object body = null; // Object |
String propertyKey = "propertyKey_example"; // String | The key of the user's property. The maximum length is 255 characters.
String accountId = "accountId_example"; // String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
String userKey = "userKey_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 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 {
Object result = apiInstance.setUserProperty(body, propertyKey, accountId, userKey, username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserPropertiesApi#setUserProperty");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Object | ||
propertyKey | String | The key of the user's property. The maximum length is 255 characters. | |
accountId | String | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. | [optional] |
userKey | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
username | String | This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details. | [optional] |
Object
- Content-Type: application/json
- Accept: application/json