Zabbix Documentation 3.4

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools

This translation is older than the original page and might be outdated. See what has changed.

Sidebar

zh:manual:api:reference:screen:get

screen.get

说明

integer/array screen.get(object parameters)

该方法允许根据给定的参数检索screen。

参数

(object) 定义所需输出的参数。 该方法支持以下参数。

属性 类型 说明
screenids string/array 只返回具有给定ID的screen。
userids string/array 仅返回属于给定用户ID的screen
screenitemids string/array 只返回包含给定screen item的屏幕。
selectUsers query 返回用户在users属性中共享screen。
selectUserGroups query

* 一组对象;

  • 如果已经使用“countOutput”参数,则检索到的对象的计数。

示例

按ID检索Screen

Retrieve all data about screen “26” and its screen items.

Request:

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

Response:

{
    "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",
            "templateid": "0",
            "userid": "1",
            "private": "1"
        }
    ],
    "id": 1
}

参见

来源

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