---
title: "Devices first seen within the active-device window."
method: GET
path: "/apps/{appId}/metrics/new-devices"
tags: ["metrics"]
---

# Devices first seen within the active-device window.

`GET /apps/{appId}/metrics/new-devices`

## Request

- Base URL: `https://api.shorebird.dev/api/v1`
- URL: `https://api.shorebird.dev/api/v1/apps/{appId}/metrics/new-devices`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns the count of the app's devices whose first recorded activity
falls within the last `window_days` days — a device-growth signal —
together with the count
for the equal-length window immediately preceding it, which powers a
period-over-period delta. Counts are exact (non-HLL). `previous` is
null when the preceding window would begin before the metrics data
floor, where a comparison against partially-recorded history would
show a misleading delta.

## Response `200`

The new-device counts for the app.

- GetNewDevicesResponse: The response body for GET /apps/{appId}/metrics/new-devices.
  - `current` integer, required: Devices first seen in the window `[as_of − window_days, as_of)`. An exact (non-HLL) count.
  - `previous` integer, nullable, required: Devices first seen in the equal-length window immediately preceding the current one, or null when that window would begin before the metrics data floor (comparing against partially-recorded history would show a misleading delta).
  - `window_days` integer, required: The window length in days. Hardcoded server-side in v1; echoed so clients label the metric from the response rather than assuming a length.
  - `as_of` string, date-time, required: Server's UTC timestamp at the moment the response was constructed. Not a freshness indicator for the underlying data, which is refreshed by an hourly scheduled query and may lag by up to ~1 hour.

## Other responses

- `default`: Standard error response. Emitted for any non-2xx status where a body can be decoded into an [ErrorResponse].

## Changes

- **2026-11-05** `941da8871d10`: 1 info
  - added the optional property `documentation_url` to the response with the `default` status

[Operation history](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/changes/apps/:appId/metrics/new-devices/get.md)

---

[API](https://skmtc.dev/shorebird/apis/shorebird-codepush-api.md) - [All operations](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/revisions/941da8871d10?raw)
