Skip to content

mypreferences

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 required: None.

GET /rest/api/3/mypreferences/locale

Example:

bash
jr mypreferences get-locale

get-preference

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 from the user management REST API to manage timezone and locale instead.

Permissions required: Permission to access Jira.

GET /rest/api/3/mypreferences

FlagTypeRequiredDescription
--keystringNoThe key of the preference.

Example:

bash
jr mypreferences get-preference

remove-preference

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 from the user management REST API to manage timezone and locale instead.

Permissions required: Permission to access Jira.

DELETE /rest/api/3/mypreferences

FlagTypeRequiredDescription
--keystringNoThe key of the preference.

Example:

bash
jr mypreferences remove-preference

set-locale

Set locale

Deprecated, use Update a user profile 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 required: Permission to access Jira.

PUT /rest/api/3/mypreferences/locale

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)

Example:

bash
jr mypreferences set-locale

set-preference

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 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 from the user management REST API to manage timezone and locale instead.

Permissions required: Permission to access Jira.

PUT /rest/api/3/mypreferences

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--keystringNoThe key of the preference. The maximum length is 255 characters.

Example:

bash
jr mypreferences set-preference