UserPreferences
Linked Properties
Link | Description | Type | Constraints | Supported operations |
---|---|---|---|---|
self | This UserPreferences | UserPreferences | not null | READ |
user | The user that this preference belongs to | User | not null | READ |
Local Properties
Property | Description | Type | Constraints | Supported operations |
---|---|---|---|---|
hideMail | Hide mail address from other users | Boolean | READ / WRITE | |
timeZone | Current selected time zone | String | READ / WRITE | |
commentSortDescending | Sort comments in descending order | Boolean | READ / WRITE | |
warnOnLeavingUnsaved | Issue warning when leaving a page with unsaved text | Boolean | READ / WRITE | |
accessibilityMode | Enable accessibility mode | Boolean | READ / WRITE |
UserPreferences
Show my preferences
- Response
200
Toggle details Headers
Content-Type: application/hal+json
Body
{ "_type" : "UserPreferences", "_links" : { "self" : { "href" : "/api/v3/my_preferences", }, "user": { "href": "/api/v3/users/1", "title": "John Sheppard" } }, "hideMail" : false, "timeZone" : "Europe/Berlin", "commentSortDescending" : true, "warnOnLeavingUnsaved" : true, "accessibilityMode" : false }
- Response
401
Toggle details Returned if no user is currently authenticated
Headers
Content-Type: application/hal+json
Body
{ "_type": "Error", "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated", "message": "You need to be authenticated to access this resource." }
Update UserPreferences
When calling this endpoint the client provides a single object, containing the properties that it wants to change, in the body.
- RequestToggle details
Headers
Content-Type: application/json
Body
{ "accessibilityMode": true, "timeZone": "Europe/Paris" }
- Response
200
Toggle details Headers
Content-Type: application/hal+json
Body
{ "_type" : "UserPreferences", "_links" : { "self" : { "href" : "/api/v3/my_preferences", }, "user": { "href": "/api/v3/users/1", "title": "John Sheppard" } }, "hideMail" : false, "timeZone" : "Europe/Berlin", "commentSortDescending" : true, "warnOnLeavingUnsaved" : true, "accessibilityMode" : false }
- Response
400
Toggle details Occurs when the client did not send a valid JSON object in the request body.
Headers
Content-Type: application/hal+json
Body
{ "_type": "Error", "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody", "message": "The request body was not a single JSON object." }
- Response
401
Toggle details Returned if no user is currently authenticated
Headers
Content-Type: application/hal+json
Body
{ "_type": "Error", "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated", "message": "You need to be authenticated to access this resource." }
- Response
422
Toggle details Returned if the update contains invalid properties. Reasons are:
-
Specifying an invalid type
-
Using an unknown time zone
Headers
Content-Type: application/hal+json
Body
{ "_type": "Error", "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation", "message": "Time zone is not set to one of the allowed values." }
-
Help and feedback
If you did not find what you were looking for
If you need help from the community or want to support others
If you are eligible for professional support and have more questions
REQUEST SUPPORT
If you find an easily fixable error or need for improvement in the documentation for the stable release
If you would like to suggest bigger updates or improvements to this documentation
If you want to contribute to translate this documentation to another language
If there's something you don't like or understand about this feature
If you want to propose a new feature that OpenProject does not offer yet
To further help OpenProject to shape and test new features
To view OpenProject premium features and pricing
If you want to try all premium features in the OpenProject Cloud Edition 14 days for free
If you want to try all premium features in your on premise Community installation 14 days for free