Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

"GET /rest/api/2/mypreferences?key=reportUserDateAndTimeFormat HTTP/1.0" 404

Waldemar Wetzel April 25, 2019

"GET /rest/api/2/mypreferences?key=reportUserDateAndTimeFormat HTTP/1.0" 404

 

What is that and how can i resolve it?

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2019

Hi Waldemar,

Currently jira only allows changing a global date / time format by administrator for all users on the instance, so there is not an individualized user preference for this setting, are you instead looking for the users timezone settings?

The key value is pulling form the filed for the Constant Value of the PreferanceKeys java field values that can be found under the developer docs here:

Locate the "PreferanceKeys" in the left hand navigation pane to see the list of the constant final string values available for the endpoint, and I believe the value you are looking for would be the USER_TIMEZONE Constant Field which has a api value of "jira.user.timezone" so try a GET on:

 <BASE_URL>/rest/api/2/mypreferences?key=jira.user.timezone

But please do note the mypreferences values per the defined keys will only return a 200OK response if a value has been expressly set previously, that is a value different from default, if set to the default in user preferences you will receive a 404. 

EXE if your timezone is set to default and the default is set to America Chicago gmt-6:

Screen Shot 2019-04-26 at 11.11.15 AM.png

the Field value is NULL per the system backend to inherit system default and the result will be a 404 not found as no value exists for the endpoint:

{
"errorMessages": [
"key not found: 'jira.user.timezone'"
],
"errors": {}
}

However if you set the user preference value manually to the same America/Chicago:

Screen Shot 2019-04-26 at 11.10.18 AM.png

The API will return:

America/Chicago

Regards,
Earl

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events