action.update

説明

object action.update(object/array actions)

このメソッドにより、既存のアクションを更新することができます。

このメソッドは、Admin および Super admin ユーザータイプにのみ使用できます。このメソッドを呼び出す許可は、
ユーザーロール設定で取り消すことができます。詳細については、User rolesを参照してください。

パラメータ

(object/array) Action properties to be updated.

actionid プロパティは各アクションに対して定義する必要があり、その他のプロパティは任意です。渡されたプロパティのみが
更新され、他のプロパティは変更されません。

standard action propertiesに加えて、このメソッドは以下のパラメータを受け付けます。

パラメータ Type 説明
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.
update_operations array Action update operations to replace existing update operations.

戻り値

(object)actionids プロパティの下で更新されたアクションの ID を含むオブジェクトを返します。

アクションの無効化

ステータスを「1」に設定してアクションを無効にします。

リクエスト:

{
       "jsonrpc": "2.0",
       "method": "action.update",
       "params": {
       "actionid": "2",
       "status": "1"
       },
       "auth": "038e1d7b1735c6a5436ee9eae095879e",
       "id": 1
       }

レスポンス:

{
       "jsonrpc": "2.0",
       "result": {
       "actionids": [
       "2"
       ]
       },
       "id": 1
       }

参照

ソース

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