2022 Zabbix中国峰会
2022 Zabbix中国峰会

settings.update

更新设置

Description

描述

object settings.update(object settings)

This method allows to update existing common settings. 此方法允许更新已存在的常用设置。 ::: noteclassic This method is only available to Super admin user type. Permissions to call the method can be revoked in user role settings. See User roles for more information. ::: ::: 请注意 此方法只有_Super admin(超级管理员)_用户可用。可以在用户角色设置中撤销调用该方法的权限。更多信息请查看 用户角色。 :::

Parameters

参数

(object) Settings properties to be updated. (对象) 设置待更新的属性。

Return values

返回值

(array) Returns an array with the names of updated parameters. (数组) 返回被更新参数名字的数组。

Examples

示例

Request: 请求:

{
           "jsonrpc": "2.0",
           "method": "settings.update",
           "params": {
               "login_attempts": "1",
               "login_block": "1m"
           },
           "id": 1
       }

Response: 响应:

{
           "jsonrpc": "2.0",
           "result": [
               "login_attempts",
               "login_block"
           ],
           "id": 1
       }

Source

来源

CSettings::update() in ui/include/classes/api/services/CSettings.php.