2.7.2 Specifying Settings for a User
This REST API request specifies or overwrites the custom settings for the user executing the API request. This REST API request cannot be used to specify settings for users other than the user executing the request.
Execution permission
Admin, Modify, User Management
API version
v1
Request format
POST http[s]://host:port/Analytics/version/objects/UserCustomSettings
Request body
The structure of the request body and the object attributes are as follows:{
"guiDisplayParams":[{
"screenKey":"...",
"screenSettingValue":"..."
},
:
]
}
UserCustomSetting (Type: UserCustomSetting)
|
Attribute |
Type |
Description |
|---|---|---|
|
guiDisplayParams |
GuiDisplayParam[] |
List of GUI display parameters set by the user |
guiDisplayParams (Type: GuiDisplayParam)
|
Attribute |
Type |
Description |
|---|---|---|
|
screenKey |
string |
screen key |
|
screenSettingValue |
string |
setting value for the screen display |
Response body
The structure of the response body and the object attributes are as follows:{
"instanceID":"...",
"userName":"...",
"guiDisplayParams":[{
"screenKey":"...",
"screenSettingValue":"..."
},
:
]
}
UserCustomSetting (Type: UserCustomSetting)
|
Attribute |
Type |
Description |
|---|---|---|
|
instanceID |
long |
ID of User Custom Setting |
|
userName |
string |
User name |
|
guiDisplayParams |
GuiDisplayParam[] |
List of GUI display parameters set by the user |
guiDisplayParams (Type: GuiDisplayParam)
|
Attribute |
Type |
Description |
|---|---|---|
|
screenKey |
string |
screen key |
|
screenSettingValue |
string |
setting value for the screen display |
Status codes
|
Status code |
Reason phrase |
Description |
|---|---|---|
|
201 |
Created |
Success. |
|
400 |
Bad Request |
A format of request body is invalid. |
|
401 |
Unauthorized |
No login privilege. |
|
403 |
Forbidden |
No update privilege. |
|
412 |
Precondition Failed |
The server is not available. |
|
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header]
POST http://localhost:22015/Analytics/v1/objects/UserCustomSettings/ HTTP/1.1
Host: localhost:22015
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: ja,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/json; charset=utf-8
Authorization: HSSO a8325764f8fbf4b384a997f811c9e40cc81f3b6_Vlo8Y30Idg1+cQNsGHkUbQxzBA0=_V0810
X-Requested-With: XMLHttpRequest
Referer: http://localhost:22015/Analytics/main.htm
Content-Length: 12697
Cookie: JSESSIONID=00ACFB0B9CF2A67FD2724B793D244887
Connection: keep-alive
[Request Body]
{
"guiDisplayParams":[
{
"screenKey":"dashboard.settings",
"screenSettingValue":"{\"defs\":[{\"id\":\"AllResourcesStatusApplication\",\"data\"..."
},{
"screenKey":"dashboard.settings.autoRefresh",
"screenSettingValue":"2"
}
]
}
[Response Header]
HTTP/1.1 201 Created
Date: Tue, 31 Jul 2018 00:58:51 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO a8325764f8fbf4b384a997f811c9e40cc81f3b6_Vlo8Y30Idg1+cQNsGHkUbQxzBA0=_V0810
Location: http://localhost:22015/Analytics/v1/objects/UserCustomSettings//0
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: application/json
Content-Length: 12847
[Response Body]
{
"instanceID" : 0,
"userName" : "System",
"guiDisplayParams" : [ {
"screenKey" : "dashboard.settings.autoRefresh",
"screenSettingValue" : "2"
}, {
"screenKey" : "dashboard.settings",
"screenSettingValue" : "{\"defs\":[{\"id\":\"AllResourcesStatusApplication\",\"data\"...}"
} ]
}