Web API: Usersettings: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
The '''Usersettings''' saves user specific settings to server. The PUT version is used to store individual setting and the POST version to store multiple settings.
The '''usersettings''' operation saves user specific settings to server. The PUT version is used to store an individual setting and the POST version to store multiple settings.


HTTP request header '''Authorization''' with value '''Bearer <access token>''' needs to be in place to identify the session.  
HTTP request header '''Authorization''' with value '''Bearer <access token>''' needs to be in place to identify the session.  


== PUT /api/usersettings/{key}/{value} ==
== Stores single setting ==
Stores individual setting to the server.


Stores single user setting to the server.
<pre>
<pre>
Url: PUT /api/usersettings/{key}/{value}
Url: PUT qprpa/api/usersettings/{key}/{value}
</pre>
</pre>


Line 14: Line 14:
Returns HTTP code 204 (No content).
Returns HTTP code 204 (No content).


== POST /api/usersettings/ ==
== Store multiple settings ==
Stores multiple settings to the server.


Stores multiple user settings to the server at the same time. Possible existing settings in the server that are not mentioned in the request, are not removed.
<pre>
<pre>
Url: POST /api/usersettings/
Url: POST qprpa//api/usersettings/
</pre>
</pre>


The request body contains an object that has properties for all the stored settings.
The request body contains an object that has fields for all the settings to be stored.


Returns HTTP code 204 (No content).
Returns HTTP code 204 (No content).


[[Category: QPR ProcessAnalyzer]]
[[Category: QPR ProcessAnalyzer]]

Latest revision as of 23:35, 17 February 2022

The usersettings operation saves user specific settings to server. The PUT version is used to store an individual setting and the POST version to store multiple settings.

HTTP request header Authorization with value Bearer <access token> needs to be in place to identify the session.

Stores single setting

Stores single user setting to the server.

Url: PUT qprpa/api/usersettings/{key}/{value}

The key is the setting name and value is the setting value.

Returns HTTP code 204 (No content).

Store multiple settings

Stores multiple user settings to the server at the same time. Possible existing settings in the server that are not mentioned in the request, are not removed.

Url: POST qprpa//api/usersettings/

The request body contains an object that has fields for all the settings to be stored.

Returns HTTP code 204 (No content).