此方法允许更新现有的动作。
参数
(object/array)
要更新的动作属性。
必须为每个动作定义 actionid
属性,所有其他属性都是可选的。只有通过的属性将被更新,所有其他属性将保持不变。
除此之外 , 该方法接受以下参数。
返回值
返回一个对象,该对象在 actionids
属性下包含要更新动作的 ID。
范例
禁用动作
禁用动作,也就是说,将其状态设置为 1
。
请求:
来源
CAction::update() in frontends/php/include/classes/api/services/CAction.php.
Description
This method allows to update existing actions.
Parameters
(object/array)
Action properties to be updated.
The actionid
property must be defined for each action, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
Parameter | Type | Description |
---|---|---|
filter | object | Action filter object to replace the current filter. |
operations | array | Action operations to replace existing operations. |
recovery_operations | array | Action recovery operations to replace existing recovery operations. |
acknowledge_operations | array | Action acknowledge operations to replace existing acknowledge operations. |
Returns an object containing the IDs of the updated actions under the actionids
property.
Examples
Disable action
Disable action, that is, set its status to “1”.
Request:
Response:
See also
Source
CAction::update() in frontends/php/include/classes/api/services/CAction.php.