Infomaniak Streaming Video icon

Infomaniak Streaming Video

Interact with Infomaniak Streaming Video API

Actions92

Stats > Globals > Viewers → Viewers Per Channel Histogram

AI-generated

Summary

Fetch viewer statistics for a given time range and aggregate counts per channel according to a selected granularity.

Inputs

  • authentication (required) — Authentication method to use (OAuth2 or API Key).
  • query_from (required) — Starting date for the consumption data.
  • query_to (required) — Ending date for the consumption data.
  • query_per (required) — Granularity for aggregation (day, hour, minute, month, quarter, week, year).
  • query_account_id (required) — Account identifier.
  • returnFullResponse — If true, returns the full API response; otherwise returns a simplified histogram.

Output shape

An object with a data array where each element represents a channel's viewer count in a bin defined by query_per.

The response includes channel identifiers and aggregated viewer numbers; pagination may be present; errors follow n8n's standard error format.

Examples

Example 1: Get hourly viewer histogram for a specific account between two dates using OAuth2.

authentication: oauth2, query_from: 2024-01-01T00:00:00Z, query_to: 2024-01-07T23:59:59Z, query_per: hour, query_account_id: 12345, returnFullResponse: false

Example 2: Retrieve daily aggregated viewers for a channel over a month.

authentication: apiKey, query_from: 2024-02-01, query_to: 2024-02-28, query_per: day, query_account_id: 67890, returnFullResponse: true

Example 3: Fetch yearly viewer histogram for a quarter using API Key authentication.

authentication: apiKey, query_from: 2023-01-01, query_to: 2023-12-31, query_per: year, query_account_id: 54321, returnFullResponse: false

Links

Discussion