My preferences
Authorizations
AuthorizationstringRequired
Responses
200
OK
application/hal+json
object · UserPreferencesModelOptionalExample:
{"_links":{"self":{"href":"/api/v3/my_preferences"},"user":{"href":"/api/v3/users/1","title":"John Sheppard"},"updateImmediately":{"href":"/api/v3/users/3/preferences","method":"patch"}},"_type":"UserPreferences","commentSortDescending":true,"hideMail":false,"timeZone":"Europe/Berlin","warnOnLeavingUnsaved":true,"notifications":[{"watched":false,"involved":true,"mentioned":false,"shared":true,"newsAdded":"false,","newsCommented":false,"documentAdded":false,"forumMessages":false,"wikiPageAdded":false,"wikiPageUpdated":false,"membershipAdded":false,"membershipUpdated":false,"workPackageCommented":false,"workPackageProcessed":false,"workPackagePrioritized":false,"workPackageScheduled":false,"_links":{"project":{"href":null}}}]}401
Returned if no user is currently authenticated
application/hal+json
get/api/v3/my_preferences
GET /op/api/v3/my_preferences HTTP/1.1
Host: example.u-meteor.ru
Authorization: Basic username:password
Accept: */*
{
"_links": {
"self": {
"href": "/api/v3/my_preferences"
},
"user": {
"href": "/api/v3/users/1",
"title": "John Sheppard"
},
"updateImmediately": {
"href": "/api/v3/users/3/preferences",
"method": "patch"
}
},
"_type": "UserPreferences",
"commentSortDescending": true,
"hideMail": false,
"timeZone": "Europe/Berlin",
"warnOnLeavingUnsaved": true,
"notifications": {
"watched": false,
"involved": true,
"mentioned": false,
"shared": true,
"newsAdded": "false,",
"newsCommented": false,
"documentAdded": false,
"forumMessages": false,
"wikiPageAdded": false,
"wikiPageUpdated": false,
"membershipAdded": false,
"membershipUpdated": false,
"workPackageCommented": false,
"workPackageProcessed": false,
"workPackagePrioritized": false,
"workPackageScheduled": false,
"_links": {
"project": {
"href": null
}
}
}
}При вызове этой конечной точки клиент предоставляет в теле один объект, содержащий свойства, которые он хочет изменить.
Authorizations
AuthorizationstringRequired
Body
autoHidePopupsbooleanOptional
timeZonestringOptional
Responses
200
OK
application/hal+json
object · UserPreferencesModelOptionalExample:
{"_links":{"self":{"href":"/api/v3/my_preferences"},"user":{"href":"/api/v3/users/1","title":"John Sheppard"},"updateImmediately":{"href":"/api/v3/users/3/preferences","method":"patch"}},"_type":"UserPreferences","commentSortDescending":true,"hideMail":false,"timeZone":"Europe/Berlin","warnOnLeavingUnsaved":true,"notifications":[{"watched":false,"involved":true,"mentioned":false,"shared":true,"newsAdded":"false,","newsCommented":false,"documentAdded":false,"forumMessages":false,"wikiPageAdded":false,"wikiPageUpdated":false,"membershipAdded":false,"membershipUpdated":false,"workPackageCommented":false,"workPackageProcessed":false,"workPackagePrioritized":false,"workPackageScheduled":false,"_links":{"project":{"href":null}}}]}400
Occurs when the client did not send a valid JSON object in the request body.
application/hal+json
401
Returned if no user is currently authenticated
application/hal+json
406
Occurs when the client did not send a Content-Type header
text/plain
415
Occurs when the client sends an unsupported Content-Type header.
application/hal+json
422
Returned if the update contains invalid properties. Reasons are:
-
Specifying an invalid type
-
Using an unknown time zone
application/hal+json
patch/api/v3/my_preferences
PATCH /op/api/v3/my_preferences HTTP/1.1
Host: example.u-meteor.ru
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"autoHidePopups": true,
"timeZone": "Europe/Paris"
}{
"_links": {
"self": {
"href": "/api/v3/my_preferences"
},
"user": {
"href": "/api/v3/users/1",
"title": "John Sheppard"
},
"updateImmediately": {
"href": "/api/v3/users/3/preferences",
"method": "patch"
}
},
"_type": "UserPreferences",
"commentSortDescending": true,
"hideMail": false,
"timeZone": "Europe/Berlin",
"warnOnLeavingUnsaved": true,
"notifications": {
"watched": false,
"involved": true,
"mentioned": false,
"shared": true,
"newsAdded": "false,",
"newsCommented": false,
"documentAdded": false,
"forumMessages": false,
"wikiPageAdded": false,
"wikiPageUpdated": false,
"membershipAdded": false,
"membershipUpdated": false,
"workPackageCommented": false,
"workPackageProcessed": false,
"workPackagePrioritized": false,
"workPackageScheduled": false,
"_links": {
"project": {
"href": null
}
}
}
}