1Update User Preferences
Overview
This API updates User preferences using the details provided.
Method: PUT
Request URL: {kyvos-url}/rest/v2/users/preferences
Authorization
API Key: sessionid
This method authenticates requests using a session ID which acts like an API key.
BasicAuth: HTTP Authorization Scheme
This method authenticates requests using a username and password sent in the HTTP Authorization header.
Headers
Header Name | Type | Description | Possible Values |
|---|---|---|---|
Content-Type (Required) | String | Specifies the media type of the request body. |
|
sessionid | String | The session ID is the token received from the login API. Note: Session ID is required for token-based authentication. | – |
Request Body
Parameter Name | Type | Description | Possible Values |
|---|---|---|---|
userName | String | Name of the user whose preferences need to be updated. Note: At least one of the following parameters must be provided: userId, userName, or groupName. | – |
userId | String | ID of the user whose preferences need to be updated. | – |
preferences (Required) | String | JSON string containing details of User preferences. Note: An example JSON is provided under the Resources section below. | – |
groupName | String | Group name to update the preferences of all users belonging to that group. | – |
updateType | String | Applicable only when updating user preferences by groupName. The default value is COMPLETE. | – |
Responses
200 Success
{
"code": 0,
"message": "Successfully updated user preferences: Admin"
}Status Code | Description |
|---|---|
401 | Authorization information is missing or invalid. |
404 | Connection, database, schema, or table not found. |
412 | Precondition failed. Required parameter missing. |
500 | Internal Server Error |
Resources
Below is an example of JSON structure which can be used as a reference for the preferences parameter in the request body.
{
"preferences":{
"navigation":"temporary",
"sortEntityListBy":"",
"scaleInterface":true,
"landingPage":{
"workbookName":"",
"itemType":"",
"usecase":"",
"workBookId":"",
"name":"",
"id":"",
"folderName":"",
"type":"",
"catObj":""
},
"theme":"softGray",
"workbookTabPosition":"top",
"languageKey":"en_US"
},
"homePageConfig":{
"widgets":[
{
"visible":true,
"sortOrder":"DESC",
"viewType":"LIST",
"sortBy":"TIME",
"id":"home_wgt_recent"
},
{
"visible":true,
"visitedStepsId":[
],
"id":"home_wgt_documentation"
}
]
},
"userDetails":{
}
}JSON Fields Description:
Field | Type | Description | Possible Values | Example |
|---|---|---|---|---|
| Object | UI-level preferences for the user. | — | See nested fields below |
| String | Navigation panel behavior. |
|
|
| String | Default sort field for entity lists. | Any valid sort field name or |
|
| Boolean | Whether to scale the interface for smaller screens. |
|
|
| String | UI color theme. |
|
|
| String | Position of workbook tabs in the UI. |
|
|
| String | Locale/language setting for the UI. | Any valid locale key |
|
| Object | Landing page configuration shown after login. | — | See nested fields below |
| String | Name of the landing page entity. | Any string or |
|
| String | ID of the landing page entity. | Any string or |
|
| String | Type of the landing page entity. | Any valid entity type or |
|
| String | Item type for the landing page. | Any string or |
|
| String | Workbook name to open as landing page. | Any workbook name or |
|
| String | Workbook ID to open as landing page. | Any workbook ID or |
|
| String | Folder containing the landing page entity. | Any folder name or |
|
| String | Use case context for the landing page. | Any string or |
|
| String | Category object for the landing page. | Any string or |
|
| Object | Home page widget layout configuration. | — | See nested fields below |
| Array | Ordered list of widget configurations displayed on the home page. | Array of widget objects | See widget fields below |
| String | Unique identifier of the widget. |
|
|
| Boolean | Whether the widget is visible on the home page. |
|
|
| String | Sort direction for widget content. Applicable to list-type widgets. |
|
|
| String | Display format of the widget. |
|
|
| String | Field to sort widget content by. |
|
|
| Array | Tracks visited documentation steps. Used by the documentation widget. | Array of step ID strings |
|
| Object | Additional user detail configuration. Passed as-is to the backend. | Any object or |
|