# AlarmsResource

Canonical page: https://docs.ovok.com/java-sdk/reference/alarms-resource

```java
public final class AlarmsResource
```

Reads and acknowledges device alarm notifications. Get it from [`NotificationsResource.alarms()`](/java-sdk/reference/notifications-resource#alarms).

## Methods [#methods]

### list [#list]

```java
public JsonNode list(
        Map<String, ?> query,
        RequestOptions options) throws IOException, InterruptedException
```

Lists alarm notifications (`GET /v1/slim/notifications/alarms`).

**Parameters:**

- `query`: query parameters; `null` values are skipped
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### recent [#recent]

```java
public JsonNode recent(
        Map<String, ?> query,
        RequestOptions options) throws IOException, InterruptedException
```

Lists recent alarm notifications (`GET /v1/slim/notifications/recent/alarms`).

**Parameters:**

- `query`: query parameters; `null` values are skipped
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### acknowledge [#acknowledge]

```java
public JsonNode acknowledge(
        String notificationId,
        RequestOptions options) throws IOException, InterruptedException
```

Acknowledges a notification (`PATCH /v1/slim/notifications/{notificationId}/ack`).

**Parameters:**

- `notificationId`: the notification ID
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response
