# Meaning of the /connectioncounts API

**URL:** <https://community.wowza.com/t/meaning-of-the-connectioncounts-api/53065>\
**Category:** Wowza Developer Dojo\
**Created:** [March 22, 2019, 3:38pm UTC](https://community.wowza.com/t/meaning-of-the-connectioncounts-api/53065 "2019-03-22T15:38:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hada\_park](https://avatars.discourse-cdn.com/v4/letter/h/ea5d25/32.png) [@hada\_park](https://community.wowza.com/u/hada_park)\
**Post date:** [March 22, 2019, 3:38pm UTC](https://community.wowza.com/t/meaning-of-the-connectioncounts-api/53065/1 "2019-03-22T15:38:39Z")

</div>

Hi, i used “[http://ip](http://ip)::8086/connectioncounts” api

and return

```auto
{
	"WowzaStreamingEngine": {
		"ConnectionsCurrent": "1",
		"ConnectionsTotal": "22",
		"ConnectionsTotalAccepted": "22",
		"ConnectionsTotalRejected": "0",
		"MessagesInBytesRate": "0.0",
		"MessagesOutBytesRate": "0.0",
		"VHost": {
			"Name": "_defaultVHost_",
			"TimeRunning": "79163.891",
			"ConnectionsLimit": "0",
			"ConnectionsCurrent": "0",
			"ConnectionsTotal": "14",
			"ConnectionsTotalAccepted": "14",
			"ConnectionsTotalRejected": "0",
			"MessagesInBytesRate": "0.0",
			"MessagesOutBytesRate": "0.0",
			"Application": {
				"Name": "live",
				"Status": "loaded",
				"TimeRunning": "77862.981",
				"ConnectionsCurrent": "0",
				"ConnectionsTotal": "5",
				"ConnectionsTotalAccepted": "5",
				"ConnectionsTotalRejected": "0",
				"MessagesInBytesRate": "0.0",
				"MessagesOutBytesRate": "0.0",
				"ApplicationInstance": {
					"Name": "_definst_",
					"TimeRunning": "77862.979",
					"ConnectionsCurrent": "0",
					"ConnectionsTotal": "5",
					"ConnectionsTotalAccepted": "5",
					"ConnectionsTotalRejected": "0",
					"MessagesInBytesRate": "0.0",
					"MessagesOutBytesRate": "0.0",
					"Stream": {
						"Name": "11.stream",
						"SessionsFlash": "0",
						"SessionsCupertino": "0",
						"SessionsSanJose": "0",
						"SessionsSmooth": "0",
						"SessionsRTSP": "0",
						"SessionsWebRTC": "0",
						"SessionsMPEGDash": "0",
						"SessionsTotal": "0"
					}
				}
			}
		}
	}
}

```

“Application -\> ConnectionsTotal: 5”

1. Does it mean that five people are connected? until now?

2. What does “VHost -\> ConnectionsTotal :14” mean?

3. What does “WowzaStreamingEngine -\> ConnectionsTotal : 22” mean?

4. What does “WowzaStreamingEngine -\> ConnectionsCurrents :1” mean?

There is one person, but no one is currently connected.

i study API to draw a monitoring graph

help. ㅜㅜ

---

<div class="post-metadata">

**Author:** ![Emre\_Karatasoglu\_Adv](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@Emre\_Karatasoglu\_Adv](https://community.wowza.com/u/Emre_Karatasoglu_Adv)\
**Post date:** [March 26, 2019, 8:55am UTC](https://community.wowza.com/t/meaning-of-the-connectioncounts-api/53065/2 "2019-03-26T08:55:55Z")

</div>

Hi Hada, what is your wowza version ? My wowza ( 4.7.7 ) does not response like your query ? Did you change the connectioncounts http class ?

I can suggest you to work with [http://localhost:8086/connectioncounts?flat](http://localhost:8086/connectioncounts?flat)

this will give true result to you .

```auto
<WowzaStreamingEngine>
<Stream vhostName="_defaultVHost_" applicationName="live" appInstanceName="_definst_" streamName="audiotest" sessionsFlash="0" sessionsCupertino="0" sessionsSanJose="0" sessionsSmooth="0" sessionsRTSP="0" sessionsWebRTC="0" sessionsMPEGDash="1"sessionsTotal="1"/>

</WowzaStreamingEngine>

```

Info and you can monitor with this summarry info. Also you can use The Rest Api,

it’s so powerful and you can get whatever you ask. Ie

Stream based info here is sample url for curl

```auto
http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/incomingstreams/STREAMNAME/monitoring/current

```

This will return the current statistics of the given application ( live here) & stream name

```auto
stdClass Object
(
    [serverName] => _defaultServer_
    [applicationInstance] => _definst_
    [name] => audiotest
    [uptime] => 14
    [bytesIn] => 4611903
    [bytesOut] => 0
    [bytesInRate] => 334952
    [bytesOutRate] => 0
    [totalConnections] => 0
    [connectionCount] => stdClass Object
        (
            [RTMP] => 0
            [MPEGDASH] => 0
            [CUPERTINO] => 0
            [SANJOSE] => 0
            [SMOOTH] => 0
            [RTP] => 0
        )

)

```

Here is sample php code .

```auto
<?php 
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/incomingstreams/audiotest/monitoring/current");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");

$headers = array();
$headers[] = "Accept: application/json; charset=utf-8";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
$array = json_decode($result);
echo "<pre>";
print_r($array);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

?>

```

---

<div class="post-metadata">

**Author:** ![hada\_park](https://avatars.discourse-cdn.com/v4/letter/h/ea5d25/32.png) [@hada\_park](https://community.wowza.com/u/hada_park)\
**Post date:** [March 27, 2019, 2:20am UTC](https://community.wowza.com/t/meaning-of-the-connectioncounts-api/53065/3 "2019-03-27T02:20:31Z")

</div>

Thank you for your kind comments. But it is not an answer to my question. i’ve already used REST API , [http://localhost:8086/connectioncounts](http://localhost:8086/connectioncounts?flat). and I wrote four questions in the text. I wondered what the number of return values means.

My wowza version is 4.7.7

---

<div class="post-metadata">

**Author:** ![Emre\_Karatasoglu\_Adv](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@Emre\_Karatasoglu\_Adv](https://community.wowza.com/u/Emre_Karatasoglu_Adv)\
**Post date:** [March 28, 2019, 10:07am UTC](https://community.wowza.com/t/meaning-of-the-connectioncounts-api/53065/4 "2019-03-28T10:07:09Z")

</div>

interesting, my api does not return this kind of values. You see history & current same time. anyway connection current was counted with publishing stream befor ( ie : rtmp publish or stream file ) the newer version does not count this, probably you watched stream with this client before, and might this session info exist still, did you check that without any play action after restart ? you see still 1 ?
