[comment]: # ({2ccfd922-2ccfd922})
# event.acknowledge

[comment]: # ({/2ccfd922-2ccfd922})

[comment]: # ({6bcb499e-eed7fdda})
### Description

`object event.acknowledge(object/array parameters)`

This method allows to update events. Following update actions can be
performed:

-   Close event. If event is already resolved, this action will be
    skipped.
-   Acknowledge event. If event is already acknowledged, this action
    will be skipped.
-   Unacknowledge event. If event is not acknowledged, this action will be skipped.
-   Add message.
-   Change event severity. If event already has same severity, this
    action will be skipped.

::: noteimportant
Only trigger events can be updated.<br>
Only problem events can be updated.<br>
Read/Write rights for trigger are required to close the event or to
change event's severity.<br>
To close an event, manual close should be allowed in the
trigger.
:::

::: noteclassic
This method is available to users of any type. Permissions
to call the method can be revoked in user role settings. See [User
roles](/manual/web_interface/frontend_sections/administration/user_roles)
for more information.
:::

[comment]: # ({/6bcb499e-eed7fdda})

[comment]: # ({01c3ba61-32560b88})
### Parameters

`(object/array)` Parameters containing the IDs of the events and update
operations that should be performed.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|--|--|------|
|**eventids**<br>(required)|string/object|IDs of the events to acknowledge.|
|**action**<br>(required)|integer|Event update action(s).<br><br>Possible bitmap values are:<br>1 - close problem;<br>2 - acknowledge event;<br>4 - add message;<br>8 - change severity;<br>16 - unacknowledge event.<br><br>This is a bitmask field; any sum of possible bitmap values is acceptable (for example, 6 for acknowledge event and add message).|
|message|string|Text of the message.<br>**Required**, if action contains 'add message' flag.|
|severity|integer|New severity for events.<br>**Required**, if action contains 'change severity' flag.<br><br>Possible values:<br>0 - not classified;<br>1 - information;<br>2 - warning;<br>3 - average;<br>4 - high;<br>5 - disaster.|

[comment]: # ({/01c3ba61-32560b88})

[comment]: # ({94f3ab84-94f3ab84})
### Return values

`(object)` Returns an object containing the IDs of the updated events
under the `eventids` property.

[comment]: # ({/94f3ab84-94f3ab84})

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

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

[comment]: # ({2a20eeea-9e923e4c})
#### Acknowledging an event

Acknowledge a single event and leave a message.

Request:

```json
{
    "jsonrpc": "2.0",
    "method": "event.acknowledge",
    "params": {
        "eventids": "20427",
        "action": 6,
        "message": "Problem resolved."
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "eventids": [
            "20427"
        ]
    },
    "id": 1
}
```

[comment]: # ({/2a20eeea-9e923e4c})

[comment]: # ({7d16988e-94e25d7e})
#### Changing event's severity

Change severity for multiple events and leave a message.

Request:

```json
{
    "jsonrpc": "2.0",
    "method": "event.acknowledge",
    "params": {
        "eventids": ["20427", "20428"],
        "action": 12,
        "message": "Maintenance required to fix it.",
        "severity": 4
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "eventids": [
            "20427",
            "20428"
        ]
    },
    "id": 1
}
```

[comment]: # ({/7d16988e-94e25d7e})

[comment]: # ({aadd99f7-aadd99f7})
### Source

CEvent::acknowledge() in *ui/include/classes/api/services/CEvent.php*.

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