[comment]: # ({2a69f566-2a69f566})
# screen.get

[comment]: # ({/2a69f566-2a69f566})

[comment]: # ({015f28d0-015f28d0})
### Description

`integer/array screen.get(object parameters)`

The method allows to retrieve screens according to the given parameters.

[comment]: # ({/015f28d0-015f28d0})

[comment]: # ({574eae35-e16852c6})
### Parameters

`(object)` Parameters defining the desired output.

The method supports the following parameters.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|--|--|------|
|screenids|string/array|Return only screens with the given IDs.|
|userids|string/array|Return only screens that belong to the given user IDs.|
|screenitemids|string/array|Return only screens that contain the given screen items.|
|selectScreenItems|query|Return a [screenitems](/manual/api/reference/screenitem/object#screen_item) property with the elements that are used in the screen.|
|selectUsers|query|Return a [users](/manual/api/reference/screen/object#screen_user) property with users that the screen is shared with.|
|selectUserGroups|query|Return a [userGroups](/manual/api/reference/screen/object#screen_user_group) property with user groups that the screen is shared with.|
|sortfield|string/array|Sort the result by the given properties.<br><br>Possible values are: `screenid` and `name`.|
|countOutput|boolean|These parameters being common for all `get` methods are described in detail in the [reference commentary](/manual/api/reference_commentary#common_get_method_parameters) page.|
|editable|boolean|^|
|excludeSearch|boolean|^|
|filter|object|^|
|limit|integer|^|
|output|query|^|
|preservekeys|boolean|^|
|search|object|^|
|searchByAny|boolean|^|
|searchWildcardsEnabled|boolean|^|
|sortorder|string/array|^|
|startSearch|boolean|^|

[comment]: # ({/574eae35-e16852c6})

[comment]: # ({7223bab1-7223bab1})
### Return values

`(integer/array)` Returns either:

-   an array of objects;
-   the count of retrieved objects, if the `countOutput` parameter has
    been used.

[comment]: # ({/7223bab1-7223bab1})

[comment]: # ({b41637d2-b41637d2})
### Examples

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({e68a8713-e68a8713})
#### Retrieving a screen by ID

Retrieve all data about screen "26" and its screen items.

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "screen.get",
    "params": {
        "output": "extend",
        "selectScreenItems": "extend",
        "selectUsers": "extend",
        "selectUserGroups": "extend",
        "screenids": "26"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

``` {.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"
                }
            ],
            "users": [
                {
                    "sysmapuserid": "1",
                    "userid": "2",
                    "permission": "2"
                }
            ],
            "userGroups": [
                {
                    "screenusrgrpid": "1",
                    "usrgrpid": "7",
                    "permission": "3"
                }
            ],
            "screenid": "26",
            "name": "CPU Graphs",
            "hsize": "3",
            "vsize": "2",
            "userid": "1",
            "private": "1"
        }
    ],
    "id": 1
}
```

[comment]: # ({/e68a8713-e68a8713})

[comment]: # ({796d9b7a-796d9b7a})
### See also

-   [Screen item](/manual/api/reference/screenitem/object#screen_item)
-   [Screen user](object#screen_user)
-   [Screen user group](object#screen_user_group)

[comment]: # ({/796d9b7a-796d9b7a})

[comment]: # ({46649b7f-46649b7f})
### Source

CScreen::get() in *ui/include/classes/api/services/CScreen.php*.

[comment]: # ({/46649b7f-46649b7f})
