screenitem.updatebyposition

描述

对象 screenitem.updatebyposition(array screenItems)

更新聚合图形给定单元格内的聚合图形项目方法,如果该单元格内容为空,则创建一个新的聚合图形项目.

参数

(array) Screen item properties 更新.

必须定义每个聚合图形项目的x, yscreenid的属性,其他属性可选,只更新聚合图形定义的属性,没有定义的属性将不改变.

Return values

(对象) 返回更新和创建的聚合图形属性screenitemids的对象ID.

Examples

改变聚合图形项目的资源ID

改变位于聚合图形左上角聚合图形元素的资源ID.

Request:

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

Response:

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

参考

来源

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