# Using REST API to monitor health of incoming streams?

**URL:** <https://community.wowza.com/t/using-rest-api-to-monitor-health-of-incoming-streams/55195>\
**Category:** Wowza Streaming Engine\
**Created:** [May 17, 2020, 11:29am UTC](https://community.wowza.com/t/using-rest-api-to-monitor-health-of-incoming-streams/55195 "2020-05-17T11:29:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Jun](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@Ben\_Jun](https://community.wowza.com/u/Ben_Jun)\
**Post date:** [May 17, 2020, 11:29am UTC](https://community.wowza.com/t/using-rest-api-to-monitor-health-of-incoming-streams/55195/1 "2020-05-17T11:29:25Z")

</div>

Which REST API call(s) should be used to assess the connection quality and resolution (720p etc) of an incoming RTMP stream?

And is there a way to use the API to determine if the video is garbled?

I am trying to monitor the health of an incoming stream and notify a mobile user when they should change their streaming parameters (downgrade to 480p, etc)

As an example, Wowza Streaming Cloud has a means to view stream health metrics:

[https://www.wowza.com/docs/how-to-view-stream-health-metrics-in-wowza-streaming-cloud#currentstream](https://www.wowza.com/docs/how-to-view-stream-health-metrics-in-wowza-streaming-cloud#currentstream)

---

<div class="post-metadata">

**Author:** ![video\_streaming](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@video\_streaming](https://community.wowza.com/u/video_streaming)\
**Post date:** [May 18, 2020, 8:17pm UTC](https://community.wowza.com/t/using-rest-api-to-monitor-health-of-incoming-streams/55195/2 "2020-05-18T20:17:18Z")

</div>

We do have a way to check the stream metrics with the REST API @Ben Jun, but it’s limited:

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

```auto
{
  "serverName": "_defaultServer_",
  "applicationInstance": "_definst_",
  "name": "myStream",
  "uptime": 369,
  "bytesIn": 34527676,
  "bytesOut": 0,
  "bytesInRate": 93529,
  "bytesOutRate": 0,
  "totalConnections": 0,
  "connectionCount": {
    "RTMP": 0,
    "MPEGDASH": 0,
    "CUPERTINO": 0,
    "SANJOSE": 0,
    "SMOOTH": 0,
    "RTP": 0
  }
}

```

The resolution is not listed in the above, unfortunately, but we have that coming in a future release of Engine.

Have you already considered Adaptive Bitrate Streaming where the player will adjust automatically to the lower bitrate if network conditions are poor?

[https://www.wowza.com/docs/how-to-do-adaptive-bitrate-streaming](https://www.wowza.com/docs/how-to-do-adaptive-bitrate-streaming)

---

<div class="post-metadata">

**Author:** ![Ben\_Jun](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@Ben\_Jun](https://community.wowza.com/u/Ben_Jun)\
**Post date:** [May 22, 2020, 5:48pm UTC](https://community.wowza.com/t/using-rest-api-to-monitor-health-of-incoming-streams/55195/3 "2020-05-22T17:48:59Z")

</div>

Thank you! Can’t wait for the image resolution to be added.

1/ I am trying to get the real-time status of incoming streams, so I do not believe that Adaptive Bitrate Streaming applies in my case. Am I missing something?

2/ Some questions regarding the information fields…

- When are the bytesIn / bytesOut values reset to 0? On application restart, after timeout, …?
- Over what time period are data rates computed? (Life of stream, last 30s, etc).
- There exist queries for historical measurements at application / server level. Does this exist at the stream level?
