[comment]: # translation:outdated

[comment]: # ({e4b5aac4-e4b5aac4})
# action.update

[comment]: # ({/e4b5aac4-e4b5aac4})

[comment]: # ({458c01d9-458c01d9})
### Description

`object action.update(object/array actions)`

This method allows to update existing actions.

[comment]: # ({/458c01d9-458c01d9})

[comment]: # ({35503b2b-35503b2b})
### 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.

Additionally to the [standard action properties](object#action), the
method accepts the following parameters.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|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 update operations to replace existing update operations.|

[comment]: # ({/35503b2b-35503b2b})

[comment]: # ({8cbaa103-8cbaa103})
### Return values

`(object)` Returns an object containing the IDs of the updated actions
under the `actionids` property.

[comment]: # ({/8cbaa103-8cbaa103})

[comment]: # ({b41637d2-b41637d2})
### Examples

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({77b78ec5-77b78ec5})
#### Disable action

Disable action, that is, set its status to "1".

Request:

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

Response:

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

[comment]: # ({/77b78ec5-77b78ec5})

[comment]: # ({755496f7-755496f7})
### See also

-   [Action filter](object#action_filter)
-   [Action operation](object#action_operation)

[comment]: # ({/755496f7-755496f7})

[comment]: # ({19370dac-19370dac})
### Source

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

[comment]: # ({/19370dac-19370dac})
