Infomaniak Streaming Video icon

Infomaniak Streaming Video

Interact with Infomaniak Streaming Video API

Actions92

Stats > Globals > Viewers → Unique Viewers

AI-generated

Summary

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

Links

Discussion