Wowza Community

How to get Total Unique Viewers via Rest API

In the Wowza Streaming Cloud I see a field titled “Total Unique Viewers”. I would like to retrieve this value via the Rest API. I’ve been scouring the docs, and don’t see this anywhere. All queries that I have tried result in returning “0”.

*I’m not using Fastly. So the streaming target API is not available for me.

EDIT for clarification: Sorry for the delay in a response @Shane White, but the unique viewers call through a REST API IN REAL TIME is only available through Fastly at this time and not through Akamai 1.3. They made a change that made this incompatible with stream target data retrieval through Wowza Cloud. With Akamai, the info is available about 2 hours after the transcoder stops.

Should you switch to Fastly, the call would be:

/api/v1.4/usage/stream_targets/<id>/live

You’d type in the id for your stream and below is an example…

{
  "stream_target": {
    "id": "hhphnpjb",
    "unique_viewers": 0
  }
}

Well this is disappointing, and extremely frustrating because we can see it right in the cloud but have no way to give this information to our customers.

I think there is a misunderstanding here @Shane White. You can access the unique views through the REST API using Akamai, just not in real time. Current unique viewers as defined in our docs is the total number of unique viewers in t****he last 90 seconds. One of the benefits of the Fastly platform integration with Wowza is that they do offer this data in real time and refreshes every 90 seconds.

With Akamai, we are restricted to the following:

Viewer data for streams and for Wowza CDN on Akamai HLS and HDS stream targets is available about 2 hours after a transcoder starts running. Then, it updates approximately hourly. Viewer data may take up to 48 hours to finalize.

https://www.wowza.com/docs/get-viewer-data-in-wowza-streaming-cloud