This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

screen.update

Description

object screen.update(object/array screens)

This method allows to update existing screens.

Parameters

(object/array) Screen properties to be updated.

The screenid property must be defined for each screen, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.

Additionally to the standard screen properties, the method accepts the following parameters.

Parameter Type Description
screenitems array Screen items to replace existing screen items.

Screen items are updated by coordinates, so each screen item must have the x and y properties defined.
users array Screen user shares to replace the existing elements.
userGroups array Screen user group shares to replace the existing elements.

Return values

(object) Returns an object containing the IDs of the updated screens under the screenids property.

Examples

Renaming a screen

Rename a screen to "CPU Graphs".

Request:

{
           "jsonrpc": "2.0",
           "method": "screen.update",
           "params": {
               "screenid": "26",
               "name": "CPU Graphs"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "screenids": [
                   "26"
               ]
           },
           "id": 1
       }
Copy
✔ Copied

Change screen owner

Available only for admins and super admins.

Request:

{
           "jsonrpc": "2.0",
           "method": "screen.update",
           "params": {
               "screenid": "83",
               "userid": "1"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 2
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "screenids": [
                   "83"
               ]
           },
           "id": 2
       }
Copy
✔ Copied

See also

Source

CScreen::update() in frontends/php/include/classes/api/services/CScreen.php.

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.