# \MyselfApi All URIs are relative to *https://your-domain.atlassian.net* Method | HTTP request | Description ------------- | ------------- | ------------- [**delete_locale**](MyselfApi.md#delete_locale) | **DELETE** /rest/api/3/mypreferences/locale | Delete locale [**get_current_user**](MyselfApi.md#get_current_user) | **GET** /rest/api/3/myself | Get current user [**get_locale**](MyselfApi.md#get_locale) | **GET** /rest/api/3/mypreferences/locale | Get locale [**get_preference**](MyselfApi.md#get_preference) | **GET** /rest/api/3/mypreferences | Get preference [**remove_preference**](MyselfApi.md#remove_preference) | **DELETE** /rest/api/3/mypreferences | Delete preference [**set_locale**](MyselfApi.md#set_locale) | **PUT** /rest/api/3/mypreferences/locale | Set locale [**set_preference**](MyselfApi.md#set_preference) | **PUT** /rest/api/3/mypreferences | Set preference ## delete_locale > serde_json::Value delete_locale() Delete locale Deprecated, use [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API instead. Deletes the locale of the user, which restores the default setting. **[Permissions](#permissions) required:** Permission to access Jira. ### Parameters This endpoint does not need any parameter. ### Return type [**serde_json::Value**](serde_json::Value.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_current_user > models::User get_current_user(expand) Get current user Returns details for the current user. **[Permissions](#permissions) required:** Permission to access Jira. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **expand** | Option<**String**> | Use [expand](#expansion) to include additional information about user in the response. This parameter accepts a comma-separated list. Expand options include: * `groups` Returns all groups, including nested groups, the user belongs to. * `applicationRoles` Returns the application roles the user is assigned to. | | ### Return type [**models::User**](User.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_locale > models::Locale get_locale() Get locale Returns the locale for the user. If the user has no language preference set (which is the default setting) or this resource is accessed anonymous, the browser locale detected by Jira is returned. Jira detects the browser locale using the *Accept-Language* header in the request. However, if this doesn't match a locale available Jira, the site default locale is returned. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. ### Parameters This endpoint does not need any parameter. ### Return type [**models::Locale**](Locale.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_preference > String get_preference(key) Get preference Returns the value of a preference of the current user. Note that these keys are deprecated: * *jira.user.locale* The locale of the user. By default this is not set and the user takes the locale of the instance. * *jira.user.timezone* The time zone of the user. By default this is not set and the user takes the timezone of the instance. These system preferences keys will be deprecated by 15/07/2024. You can still retrieve these keys, but it will not have any impact on Notification behaviour. * *user.notifications.watcher* Whether the user gets notified when they are watcher. * *user.notifications.assignee* Whether the user gets notified when they are assignee. * *user.notifications.reporter* Whether the user gets notified when they are reporter. * *user.notifications.mentions* Whether the user gets notified when they are mentions. Use [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API to manage timezone and locale instead. **[Permissions](#permissions) required:** Permission to access Jira. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **key** | **String** | The key of the preference. | [required] | ### Return type **String** ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## remove_preference > remove_preference(key) Delete preference Deletes a preference of the user, which restores the default value of system defined settings. Note that these keys are deprecated: * *jira.user.locale* The locale of the user. By default, not set. The user takes the instance locale. * *jira.user.timezone* The time zone of the user. By default, not set. The user takes the instance timezone. Use [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API to manage timezone and locale instead. **[Permissions](#permissions) required:** Permission to access Jira. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **key** | **String** | The key of the preference. | [required] | ### Return type (empty response body) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## set_locale > serde_json::Value set_locale(locale) Set locale Deprecated, use [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API instead. Sets the locale of the user. The locale must be one supported by the instance of Jira. **[Permissions](#permissions) required:** Permission to access Jira. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **locale** | [**Locale**](Locale.md) | The locale defined in a LocaleBean. | [required] | ### Return type [**serde_json::Value**](serde_json::Value.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## set_preference > serde_json::Value set_preference(key, body) Set preference Creates a preference for the user or updates a preference's value by sending a plain text string. For example, `false`. An arbitrary preference can be created with the value containing up to 255 characters. In addition, the following keys define system preferences that can be set or created: * *user.notifications.mimetype* The mime type used in notifications sent to the user. Defaults to `html`. * *user.default.share.private* Whether new [ filters](https://confluence.atlassian.com/x/eQiiLQ) are set to private. Defaults to `true`. * *user.keyboard.shortcuts.disabled* Whether keyboard shortcuts are disabled. Defaults to `false`. * *user.autowatch.disabled* Whether the user automatically watches issues they create or add a comment to. By default, not set: the user takes the instance autowatch setting. * *user.notifiy.own.changes* Whether the user gets notified of their own changes. Note that these keys are deprecated: * *jira.user.locale* The locale of the user. By default, not set. The user takes the instance locale. * *jira.user.timezone* The time zone of the user. By default, not set. The user takes the instance timezone. These system preferences keys will be deprecated by 15/07/2024. You can still use these keys to create arbitrary preferences, but it will not have any impact on Notification behaviour. * *user.notifications.watcher* Whether the user gets notified when they are watcher. * *user.notifications.assignee* Whether the user gets notified when they are assignee. * *user.notifications.reporter* Whether the user gets notified when they are reporter. * *user.notifications.mentions* Whether the user gets notified when they are mentions. Use [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API to manage timezone and locale instead. **[Permissions](#permissions) required:** Permission to access Jira. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **key** | **String** | The key of the preference. The maximum length is 255 characters. | [required] | **body** | **String** | The value of the preference as a plain text string. The maximum length is 255 characters. | [required] | ### Return type [**serde_json::Value**](serde_json::Value.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)