Actions92
- Channel Actions
- Channel > Config Actions
- Event Actions
- Integrations Actions
- Live Actions
- Misc > Countries Actions
- Misc > Stream Actions
- Option Actions
- Option > Record Actions
- Option > Record > Instant Actions
- Option > Record > Storage Actions
- Option > Timeshift Actions
- Option > Watermarking Actions
- Option > Simulcast Actions
- Players Actions
- Players > Ads Actions
- Players > Embeds Actions
- Players > Pictures Actions
- Prices Actions
- Restrictions Actions
- Stats > Channel > Connection History Actions
- Stats > Channel > Consumption Actions
- Stats > Channel > Export Stats Actions
- Stats > Channel > Geolocation Actions
- Stats > Channel > Technologies Actions
- Stats > Channel > Viewers Actions
- Stats > Channel > Viewing Actions
- Stats > Globals > Consumption Actions
- Stats > Globals > Geolocation Actions
- Stats > Globals > Viewers Actions
- Stats > Globals > Viewing Actions
- Thumbnail Actions
- Order Actions
Stats > Globals > Viewers → Unique Viewers
AI-generatedSummary
Fetches the count of unique viewers for the specified Infomaniak streaming video account within a date range.
Inputs
- authentication (required) — Authentication method: either OAuth2 or API Key – choose the appropriate option and configure the credentials accordingly.
- query_from (required) — Start date for the viewer count (inclusive) in format YYYY-MM-DD.
- query_to (required) — End date for the viewer count (inclusive) in format YYYY-MM-DD.
- query_per (required) — Granularity of the viewership data: day, hour, minute, month, quarter, week, or year.
- query_account_id (required) — Identifier of the Infomaniak account whose streaming video stats are queried.
- returnFullResponse — If true, the full API response is returned; otherwise only the aggregated count is provided.
Output shape
A single numeric value representing the count of unique viewers for the selected period.
When returnFullResponse is true, the operation returns a JSON object containing the count under the 'unique_viewers' key and additional metadata; otherwise the response body is just the number.
Examples
Example 1: Count unique viewers between 2024-01-01 and 2024-01-31 using OAuth2, per-day granularity.
authentication: oauth2, query_from: 2024-01-01, query_to: 2024-01-31, query_per: day, query_account_id: 12345, returnFullResponse: false
Example 2: Retrieve full response for unique viewers in the last week using API Key.
authentication: apiKey, query_from: now-7d, query_to: now, query_per: week, query_account_id: 67890, returnFullResponse: true