# SleepResource

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

```java
public final class SleepResource
```

Reads sleep statistics. Get it from [`SlimResource.sleep()`](/java-sdk/reference/slim-resource#sleep).

## Methods [#methods]

### statistics [#statistics]

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

Gets sleep statistics (`GET /v1/slim/sleep/statistics`).

**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
