Zabbix Documentation 3.4

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

zh:manual:api:reference:screenitem:create

screenitem.create

描述

object screenitem.create(object/array screenItems)

创建聚合图形项目的方法.

参数

(object/array) Screen items to create.

聚合图形项目允许的方法 standard screen item properties.

返回值

(对象)在创建聚合图形项目screenitemids下面返回一个对象的ID. 返回对象ID的顺序与聚合图形项目的顺序相匹配.

示例

创建一个聚合图形项目

在聚合图形的左上角创建一个显示图形的聚合图形项目.

Request:

{
    "jsonrpc": "2.0",
    "method": "screenitem.create",
    "params": {
        "screenid": 16,
        "resourcetype": 0,
        "resourceid": 612,
        "x": 0,
        "y": 0
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}

Response:

{
    "jsonrpc": "2.0",
    "result": {
        "screenitemids": [
            "65"
        ]
    },
    "id": 1
}

参考

来源

CScreenItem::create() in frontends/php/include/classes/api/services/CScreenItem.php.