---
title: "Best time to release — lowest-activity UTC window."
method: GET
path: "/apps/{appId}/metrics/active-hours"
tags: ["metrics"]
---

# Best time to release — lowest-activity UTC window.

`GET /apps/{appId}/metrics/active-hours`

## Request

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

Returns the app's average active-device count per UTC hour-of-day over
a server-side lookback window, plus the recommended lowest-activity
consecutive window (the best time to push a patch with minimal user
disruption) and the busiest hour for contrast. Recommendation fields
are null when there is insufficient history (fewer than 7 days).

## Response `200`

The active-hours profile and release-time recommendation.

- GetActiveHoursResponse: The response body for GET /apps/{appId}/metrics/active-hours. Powers the "best time to release" recommendation: the consecutive low-activity UTC window when the app's users are least active.
  - `hourly` ActiveHourEntry[], required: One entry per UTC hour: 24 entries, hour_utc 0–23, zero-filled, ordered by hour_utc ascending.
    - `hour_utc` integer, required: Hour of day in UTC, 0–23.
    - `average_active_devices` number, double, required: Mean distinct active devices seen during this UTC hour, averaged over the lookback window with implicit zeros included.
  - `recommended_window_start_utc` integer, nullable, required: Start hour (UTC, 0–23) of the lowest-activity consecutive window — the recommended time to release. The window wraps past midnight. Null when there is insufficient data (fewer than 7 days).
  - `recommended_window_length_hours` integer, required: Length of the recommended window in hours. Fixed at 2 in v1.
  - `busiest_hour_utc` integer, nullable, required: UTC hour (0–23) with the highest average active devices, for contrast in the recommendation copy. Null when insufficient data.
  - `lookback_days` integer, required: Number of days of history the profile is computed over.
  - `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].

---

[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)
