Zabbix Documentation 2.0

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


manual:appendix:api:screen:get

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
manual:appendix:api:screen:get [2016/09/28 07:26]
manual:appendix:api:screen:get [2019/01/28 14:49] (current)
sasha <code js> => <code java>
Line 1: Line 1:
 +===== screen.get =====
  
 +==== Description ====
 +
 +''​integer/​array screen.get(object **parameters**)''​
 +
 +The method allows to retrieve screens according to the given parameters.
 +
 +==== Parameters ====
 +
 +''​(object)''​ Parameters defining the desired output.
 +
 +The method supports the following parameters.
 +
 +^ Parameter ^ Type ^ Description ^
 +| screenids | string/​array | Return only screens with the given IDs. |
 +| screenitemids | string/​array | Return only screen that contain the given screen items. |
 +^ |||
 +| selectScreenItems | query | Return the screen items that are used in the screen. \\ \\ Does not support ''​shorten''​ or arrays of properties. |
 +^ |||
 +| sortfield | string/​array | Sort the result by the given properties. \\ \\ Possible values are: ''​screenid''​ and ''​name''​. ​ |
 +| countOutput |flag|These parameters being common for all ''​get''​ methods are described in detail on the [[manual:​appendix:​api:​generic#​common_get_method_parameters|Generic Zabbix API information]] page.  |
 +| editable |boolean|:::​|
 +| excludeSearch |flag|:::|
 +| filter | object |:::|
 +| limit |integer|:::​|
 +| nodeids |string/​array|:::​|
 +| output |query|:::|
 +| preservekeys |flag|:::|
 +| search | object |:::|
 +| searchByAny |boolean|:::​|
 +| searchWildcardsEnabled |boolean|:::​|
 +| sortorder | string/​array | ::: |
 +| startSearch |flag|:::|
 +==== Return values ====
 +
 +''​(integer/​array)''​ Returns either:
 +  * an array of objects;
 +  * the count of retrieved objects, if the ''​countOutput''​ parameter has been used.
 +
 +==== Examples ====
 +
 +=== Retrieving a screen by ID ===
 +
 +Retrieve all data about screen "​26"​ and its screen items.
 +
 +Request:
 +<code java>
 +{
 +    "​jsonrpc":​ "​2.0",​
 +    "​method":​ "​screen.get",​
 +    "​params":​ {
 +        "​output":​ "​extend",​
 +        "​selectScreenItems":​ "​extend",​
 +        "​screenids":​ "​26"​
 +    },
 +    "​auth":​ "​038e1d7b1735c6a5436ee9eae095879e",​
 +    "​id":​ 1
 +}
 +</​code>​
 +
 +Response:
 +<code java>
 +{
 +    "​jsonrpc":​ "​2.0",​
 +    "​result":​ [    ​
 +        {
 +            "​screenitems":​ [
 +                {
 +                    "​screenitemid":​ "​67",​
 +                    "​screenid":​ "​26",​
 +                    "​resourcetype":​ "​0",​
 +                    "​resourceid":​ "​612",​
 +                    "​width":​ "​320",​
 +                    "​height":​ "​200",​
 +                    "​x":​ "​0",​
 +                    "​y":​ "​0",​
 +                    "​colspan":​ "​0",​
 +                    "​rowspan":​ "​0",​
 +                    "​elements":​ "​25",​
 +                    "​valign":​ "​0",​
 +                    "​halign":​ "​0",​
 +                    "​style":​ "​0",​
 +                    "​url":​ "",​
 +                    "​dynamic":​ "​0",​
 +                    "​sort_triggers":​ "​0"​
 +                }
 +            ],
 +            "​screenid":​ "​26",​
 +            "​name":​ "CPU Graphs",​
 +            "​hsize":​ "​3",​
 +            "​vsize":​ "​2",​
 +            "​templateid":​ "​0"​
 +        }
 +    ],
 +    "​id":​ 1
 +}
 +</​code>​
 +
 +==== See also ====
 +
 +  * [[manual:​appendix:​api:​screenitem:​definitions#​screen_item|Screen item]]
 +
 +==== Source ====
 +
 +CScreen::​get() in //​frontends/​php/​api/​classes/​CScreen.php//​.