Write user settings
write_user_settingsWrite the personal settings of users — portlets on the home page, favourite items, or the settings of a view table (DataGrid) — the same way the Portlets, Favourites and Customize dialogs do. The settings object has the shape get_user_settings returns. Items that the user has no rights to are removed right after the write, exactly as the user interface removes them, and are reported as dropped. Read the current settings with get_user_settings first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kind": "<kind>",
"users": "<users>",
"settings": "<settings>"
},
"name": "write_user_settings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | portlets, favorites or datagrid. | |
| mode | No | portlets and favorites only: replace (default) replaces the whole list, add appends the items, remove removes them. Not allowed for datagrid. | |
| users | Yes | Array of the target users and user groups in the rights format, e.g. ["U12", "G3"]. A group stands for all its members. | |
| portlet | No | datagrid only: 'true' writes the settings of the DataGrid shown as a portlet. Only for viewpagecontrol. | |
| settings | Yes | JSON object with the settings. portlets: {"columns": [[{"viewPageControlId": 12, "name": "…"}], [], []], "refreshInterval": 0, "showImage": true} — three columns of the home page; name defaults to the name of the control; without columns only refreshInterval and showImage are written. favorites: {"items": [{"viewPageId": 5, "name": "…"}, {"separator": true}], "showOnHomePage": true}. datagrid: any of recordsPerPage, sortColumnId, sortDirection (ASC, DESC), sortColumn2Id, sortDirection2, showFilters, showDetails, showToolTip, showGrid, showFooter, showUpperToolbar, tableColumns, detailColumns (toolTipColumns for a portlet) — properties left out keep their current value. | |
| control_id | No | datagrid only: id of the DataGrid control, as returned by get_model. | |
| control_type | No | datagrid only: viewpagecontrol or formcontrol. |