# Per Instance connection stats on the REST API

**URL:** https://community.wowza.com/t/per-instance-connection-stats-on-the-rest-api/123
**Category:** Wowza Streaming Engine
**Tags:** server-administration
**Created:** [May 7, 2016, 7:37am UTC](https://community.wowza.com/t/per-instance-connection-stats-on-the-rest-api/123 "2016-05-07T07:37:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)
#### Post date: [May 7, 2016, 7:37am UTC](https://community.wowza.com/t/per-instance-connection-stats-on-the-rest-api/123/1 "2016-05-07T07:37:01Z")

</div>

Hi there I made a question before in regards to not being able to see per instance connection stats.

I tried to test out the REST api to see if it can filter for instance connections and its just application wide like the admin

ie

curl -X GET --header ‘Accept:application/json; charset=utf-8’ [http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testlive/monitoring/current](http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testlive/monitoring/current)

I found this HTTP provider, but its a pretty big XML body and it can’t filter for just the instance.

[http://localhost:8086/connectioncounts](http://localhost:8086/connectioncounts)

Can the REST api have a filter path added to it or can it be customised to do so ?

Do I need to make a custom http provider up instead ?

---

<div class="post-metadata">

### Author: ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)
#### Post date: [May 17, 2016, 2:06pm UTC](https://community.wowza.com/t/per-instance-connection-stats-on-the-rest-api/123/2 "2016-05-17T14:06:56Z")

</div>

Hi,

I think the connectioncounts HTTP Provider should work. You can add the ?flat query parameter to flatten out the XML, e.g.

```auto
http://[wowza-ip]:8086/connectioncounts?flat
<WowzaStreamingEngine>
<Stream vhostName="_defaultVHost_" applicationName="live" appInstanceName="myinst" streamName="camera1.stream" sessionsFlash="0" sessionsCupertino="1" sessionsSanJose="0" sessionsSmooth="0" sessionsRTSP="0" sessionsMPEGDash="0" sessionsTotal="1"/>
<Stream vhostName="_defaultVHost_" applicationName="live" appInstanceName="_definst_" streamName="camera2.stream" sessionsFlash="0" sessionsCupertino="0" sessionsSanJose="0" sessionsSmooth="0" sessionsRTSP="0" sessionsMPEGDash="0" sessionsTotal="0"/>
</WowzaStreamingEngine>

```

The source code is [available here](https://www.wowza.com/docs/how-to-get-connection-counts-for-server-applications-application-instances-and-streams-with-an-http-provider) for you to modify if needed.

Paul
