screenitem.create

描述

object screenitem.create(object/array screenItems)

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

参数

(object/array) Screen items to create.

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

返回值

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

示例

创建一个聚合图形项目

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

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "screenitem.create",
  4. "params": {
  5. "screenid": 16,
  6. "resourcetype": 0,
  7. "resourceid": 612,
  8. "x": 0,
  9. "y": 0
  10. },
  11. "auth": "038e1d7b1735c6a5436ee9eae095879e",
  12. "id": 1
  13. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "screenitemids": [
  5. "65"
  6. ]
  7. },
  8. "id": 1
  9. }

参考

来源

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