templatescreen.update

Description说明

object templatescreen.update(object/array templateScreens)

This method allows to update existing template screens此方法允许更新现有的模板聚合图形.

Parameters参数

(object/array) Template screen properties to be updated要更新的模板聚合图形属性.

The screenid property must be defined for each template screen, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged必须为每个模板屏幕定义screenid属性,所有其他属性都是可选的。 只有通过的属性将被更新,所有其他属性将保持不变.

Additionally to the standard template screen properties, the method accepts the following parameters.除standard template screen properties之外,该方法接受以下参数.

Parameter参数 Type类型 Description说明
screenitems array Screen items to replace existing screen items聚合图形项替换现有的聚合图形项. Screen items are updated by coordinates, so each screen item must have the x and y properties defined聚合图形项通过坐标轴更新,因此每个聚合图形项必须定义xy属性.

Return values返回值

(object) Returns an object containing the IDs of the updated template screens under the screenids property.(object)返回一个包含screenids属性下更新的模板聚合图形的ID的对象

Examples范例

Rename a template screen重命名模板聚合图形

Rename the template screen to “Performance graphs”将模板聚合图形重命名为“Performance graphs”.

Request请求:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "templatescreen.update",
  4. "params": {
  5. "screenid": "3",
  6. "name": "Performance graphs"
  7. },
  8. "auth": "038e1d7b1735c6a5436ee9eae095879e",
  9. "id": 1
  10. }

Response响应:

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

Source来源

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