# 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](object#template_screen), the method accepts the following
parameters. 除[standard template screen
properties](object#template_screen)之外，该方法接受以下参数.

|Parameter参数   T|pe类型   Des|ription说明|
|-------------------|--------------|-------------|
|screenitems|array|Screen items to replace existing screen items聚合图形项替换现有的聚合图形项.<br><br>Screen items are updated by coordinates, so each screen item must have the `x` and `y` properties defined聚合图形项通过坐标轴更新，因此每个聚合图形项必须定义`x`和`y`属性.|

### 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请求:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "templatescreen.update",
    "params": {
        "screenid": "3",
        "name": "Performance graphs"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response响应:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": {
        "screenids": [
            "3"
        ]
    },
    "id": 1
}
```

### Source来源

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