# How can I get list of connected streams with statistics for an application

**URL:** <https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719>\
**Category:** Wowza Streaming Engine\
**Created:** [August 14, 2020, 1:58pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719 "2020-08-14T13:58:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shefali\_Mantri](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Shefali\_Mantri](https://community.wowza.com/u/Shefali_Mantri)\
**Post date:** [August 14, 2020, 1:58pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719/1 "2020-08-14T13:58:26Z")

</div>

How can we get all incoming streams with their statistics (like codec, bitrate, total connections, etc) in single API request

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [August 17, 2020, 5:49pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719/2 "2020-08-17T17:49:48Z")

</div>

Ok great, well your options are to reach out to our [Professional Services](https://www.wowza.com/professional-services) team here at Wowza or you can post in our [Hire a Consultant](https://www.wowza.com/community/spaces/26/find-a-consultant.html) forum space where we have 3rd party wowza experts willing to help for fees they will discuss with you privately.

---

<div class="post-metadata">

**Author:** ![Alok\_Kumar2](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Alok\_Kumar2](https://community.wowza.com/u/Alok_Kumar2)\
**Post date:** [August 17, 2020, 3:15pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719/3 "2020-08-17T15:15:22Z")

</div>

We want consolidated information for all the stream files.

1. whether stream file is connected or no.

2. what are the current outbound connection for each stream

3. current bit rate (both in and out) for each stream

we have not found any Rest API which gives this information so far. Could you help

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [August 14, 2020, 6:44pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719/4 "2020-08-14T18:44:26Z")

</div>

Please use the search bar above for forums and you will see multiple posts on this question already.

You can try typing in “stream statistics API”.

---

<div class="post-metadata">

**Author:** ![Shefali\_Mantri](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Shefali\_Mantri](https://community.wowza.com/u/Shefali_Mantri)\
**Post date:** [August 17, 2020, 3:15pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719/5 "2020-08-17T15:15:14Z")

</div>

Thanks for your response. We already searched but not found exactly as per requirement.

Currently, For each stream, we need to trigger a request to get statics.

The requirement is:- In single API requests for particular applications get all streams with their respective statics. So no multiple API requests for each stream.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [August 17, 2020, 3:57pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719/6 "2020-08-17T15:57:25Z")

</div>

Thank you for explaining in more detail what you are looking for. I can help explain your options.

The information you are looking to capture isn’t all available through a single API endpoint and if using the REST api, some of it isn’t available at all.

What you would need to do is create something using the Java api to capture the information in one place and then use a HTTPProvider as an access point to be able to retrieve the information on demand.

This would require some custom java development work on your part so if this is something that you would want to do then please let me know and I can point you in the right direction.

The following javadocs show the api methods you would need to implement.

From [IMediaStream](https://www.wowza.com/resources/serverapi/com/wowza/wms/stream/IMediaStream.html),

```auto
getPublishBitrateVideo
getPublishBitrateAudio
getPublishFramerateVideo
getPublishKeyFrameIntervalsVideo

```

Use the above to get current dynamic values for the stream.

From [IMediaStreamActionNotify3](https://www.wowza.com/resources/serverapi/com/wowza/wms/stream/IMediaStreamActionNotify3.html)

```auto
onCodecInfoAudio
onCodecInfoVideo

```

The codecInfo object for each of these events will contain the static information about the stream. (codec information, profile & level, frame sizes, sample rate & channel count, etc).

---

<div class="post-metadata">

**Author:** ![Alok\_Kumar2](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Alok\_Kumar2](https://community.wowza.com/u/Alok_Kumar2)\
**Post date:** [August 17, 2020, 4:12pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719/7 "2020-08-17T16:12:11Z")

</div>

Yes, we would like to develop this HTTPProvider as we want dynamic information in a single request. so this seems the only possible way right now.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [September 7, 2020, 6:54pm UTC](https://community.wowza.com/t/how-can-i-get-list-of-connected-streams-with-statistics-for-an-application/55719/8 "2020-09-07T18:54:27Z")

</div>

We have an article on statistics:

[https://www.wowza.com/docs/statistics-query-examples](https://www.wowza.com/docs/statistics-query-examples)

From the article:

> ## Get current statistics for an incoming stream
> 
> * * *
> 
> View current statistics for an incoming stream ( **myStream** in this example):
> 
> ```auto
> curl -X GET --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/incomingstreams/myStream/monitoring/current
> 
> ```
> 
> The command should return a response that looks something like this (if the application is running, you should see real values, not zeros):
> 
> ```auto
> {
> "serverName": "_defaultServer_",
> "uptime": 0,
> "bytesIn": 0,
> "bytesOut": 0,
> "bytesInRate": 0,
> "bytesOutRate": 0,
> "totalConnections": 0,
> "connectionCount": {
> "RTMP": 0,
> "MPEGDASH": 0,
> "CUPERTINO": 0,
> "SANJOSE": 0,
> "SMOOTH": 0,
> "RTP": 0
> },
> "applicationInstance": "_definst_",
> "name": "myStream"
> }
> 
> ```
