# List last-received observation ids by device

Canonical page: https://docs.ovok.com/slim-apis/telemetry/list-last-received-observation-ids-by-device

| Method | Path |
| --- | --- |
| `GET` | `/v1/slim/telemetry/lastIds` |

[Authentication](/authentication) · [Access policies](/access-policies)

Returns the last-received Observation ids for every device in your project, keyed by device identifier.

**Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `Device:read` and `Device:search`.
**Scope:** the caller's project and its sub-projects (from the token).

## Request [#request]

No parameters.

## Behaviour [#behaviour]

- Covers the devices that have telemetry, up to the first 1000 devices of the project, including devices without a resident. Devices are taken in resident-name order, so devices without a resident come last and are the ones left out of a larger project.
- Each value has the same shape as `GET /v1/slim/telemetry/{deviceId}/lastIds`. Fields are `null` when nothing has been received for them.
- Devices that have no ids recorded still get a key, with every field `null`.
- The route returns 503 when the server is at capacity for live reads or the device list cannot be built. Retry shortly.

## Example [#example]

```bash
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/telemetry/lastIds' \
  -H "Authorization: Bearer ${OVOK_TOKEN}"
```

## Successful response [#successful-response]

`200` — Last-received observation ids, keyed by device identifier.

```json
{
  "Demo/3001000": {
    "heartRate": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b51",
    "respiratoryRate": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b52",
    "sleepStatus": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b53",
    "presenceStatus": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b54",
    "batch": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b55"
  },
  "Demo/3001001": {
    "heartRate": null,
    "respiratoryRate": null,
    "sleepStatus": null,
    "presenceStatus": null,
    "batch": null
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `<deviceIdentifier>` | `object` | One key per device, named by the device identifier, for example `Demo/3001000`. |
| `<deviceIdentifier>.heartRate` | `string \| null` | Latest Observation id received for heart rate. `null` when nothing has been received for it yet. |
| `<deviceIdentifier>.respiratoryRate` | `string \| null` | Latest Observation id received for respiratory rate. `null` when nothing has been received for it yet. |
| `<deviceIdentifier>.sleepStatus` | `string \| null` | Latest Observation id received for sleep status. `null` when nothing has been received for it yet. |
| `<deviceIdentifier>.presenceStatus` | `string \| null` | Latest Observation id received for presence. `null` when nothing has been received for it yet. |
| `<deviceIdentifier>.batch` | `string \| null` | Id of the latest batch of readings received. `null` when nothing has been received for it yet. |

An empty project returns `{}`.

## Errors [#errors]

| Status | Meaning |
| --- | --- |
| [`401`](/errors/unauthenticated) | Bearer token is missing, invalid or expired. |
| [`403`](/errors/forbidden) | You are not a practitioner, admin or System Owner, you lack `Device:read` or `Device:search`, your session has no project, or you cannot access the project. |
| [`404`](/errors/not-found) | Your session has no project (admin sessions only). |
| [`503`](/errors/service-unavailable) | The server is at capacity for live reads (the body has `error: "live_reads_over_capacity"` ([`live_reads_over_capacity`](/errors/live-reads-over-capacity)) and `retryAfterSec`, and the `Retry-After` header is set), the device list cannot be built right now (no `Retry-After`), or the access policy cannot be read. Retry shortly. |
