# Custom HTTP Provider

**URL:** <https://community.wowza.com/t/custom-http-provider/48671>\
**Category:** Wowza Developer Dojo\
**Created:** [May 5, 2017, 6:10pm UTC](https://community.wowza.com/t/custom-http-provider/48671 "2017-05-05T18:10:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Copeland1](https://avatars.discourse-cdn.com/v4/letter/n/e480ec/32.png) [@Nick\_Copeland1](https://community.wowza.com/u/Nick_Copeland1)\
**Post date:** [May 5, 2017, 6:10pm UTC](https://community.wowza.com/t/custom-http-provider/48671/1 "2017-05-05T18:10:36Z")

</div>

Hello,

I am looking for more information on how to create a custom HTTP provider to user with the REST API. Right now I am having to call 2 different ones to get the information I need to display information about the stream. So I would like to condense it into one single call so I have all the information I need in a single JSON file. What I am looking to have in one single file is this.

Stream Status

Total Viewers

Audio Status (If the stream has audio or not)

Now I can pull the stream status and total viewers but they are in two seperate calls and would like to combine them into a single request so I do not have to make multiple requests to get different information. Can anyone provide some information on how I can achieve this and the process to build this. I am not good with Javascript but I am sure I could take the snippets from the others to combine into a single file. Just not sure what I would use for the audio status. Then what all is involved in creating this?

-Thanks

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [May 10, 2017, 5:46am UTC](https://community.wowza.com/t/custom-http-provider/48671/2 "2017-05-10T05:46:26Z")

</div>

Hi Nick,

We do have an example [HTTPProvider code](https://www.wowza.com/docs/How-to-get-connection-counts-for-server-applications-application-instances-and-streams-with-an-HTTP-Provider) that generates connection counts. This code is a snapshot of the current counts, though, and not a historic statistic, which is what it sounds like you’re looking for. You will need to customize this in order to query the stats database.

We are working on allowing users to create their own REST API endpoints as well, but I don’t have a timeline yet as to when this becomes available.

Michelle

---

<div class="post-metadata">

**Author:** ![Nick\_Copeland1](https://avatars.discourse-cdn.com/v4/letter/n/e480ec/32.png) [@Nick\_Copeland1](https://community.wowza.com/u/Nick_Copeland1)\
**Post date:** [May 16, 2017, 6:19pm UTC](https://community.wowza.com/t/custom-http-provider/48671/3 "2017-05-16T18:19:47Z")

</div>

Thanks for the response. I think you may have misunderstood what I was requesting. I can already pull total viewer counts of a stream and the stream status as I stated in my second paragraph. Problem with that is I have to make two separate calls to get the information I am needing. I.E. One for the stream status (Online/Offline) and then another call to get the viewer counts. I would like to combine this information into a single call so I don’t have to create multiple HTTP requests in my scripts to get the information I need.

In addition to combining the stream status and connection counts, I would like to add audio status I.E. if the stream has audio or not.

Is this possible to do to combine HTTP providers into a single file and also is there one for audio?

-Thanks

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [June 10, 2017, 1:44am UTC](https://community.wowza.com/t/custom-http-provider/48671/4 "2017-06-10T01:44:00Z")

</div>

In your custom HTTProvider code, you can query the application’s ConnectionInfo similar to the code previously provided. You can also call getPublishAudioCodecId() on the IMediaStream objects for the application and check if it is a non-null value to see if it has an audio track.

---

<div class="post-metadata">

**Author:** ![Nick\_Copeland](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@Nick\_Copeland](https://community.wowza.com/u/Nick_Copeland)\
**Post date:** [April 10, 2019, 5:55pm UTC](https://community.wowza.com/t/custom-http-provider/48671/5 "2019-04-10T17:55:20Z")

</div>

In a reply a couple years ago it was mentioned above…

“We are working on allowing users to create their own REST API endpoints as well, but I don’t have a timeline yet as to when this becomes available.”

Is this now available or is it still in development? This is something I think would be extremely useful.

I desperately need to the point I would pay for a custom end point that would show the following listed below for all activate streams on the server from a single URL request.

```auto
{
  "name": "name",
  "streamName": "streamname",
  "applicationName": "AppName",
  "isConnected": true,
  "totalConnections": 1,
}

```

---

<div class="post-metadata">

**Author:** ![Nick\_Copeland](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@Nick\_Copeland](https://community.wowza.com/u/Nick_Copeland)\
**Post date:** [April 19, 2019, 4:42pm UTC](https://community.wowza.com/t/custom-http-provider/48671/6 "2019-04-19T16:42:49Z")

</div>

I guess this functionality is not something that is available yet?

---

<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:** [April 19, 2019, 6:49pm UTC](https://community.wowza.com/t/custom-http-provider/48671/7 "2019-04-19T18:49:56Z")

</div>

Let me check for you @Nick Copeland.

---

<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:** [April 19, 2019, 7:08pm UTC](https://community.wowza.com/t/custom-http-provider/48671/8 "2019-04-19T19:08:43Z")

</div>

Try this endpoint @Nick Copeland:

/v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/instances/{instanceName}/incomingstreams/{streamName}/monitoring/current

---

<div class="post-metadata">

**Author:** ![Nick\_Copeland](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@Nick\_Copeland](https://community.wowza.com/u/Nick_Copeland)\
**Post date:** [April 22, 2019, 4:02pm UTC](https://community.wowza.com/t/custom-http-provider/48671/9 "2019-04-22T16:02:40Z")

</div>

Thanks, but that is what I am currently using and not what I am looking for.

I need one that shows ALL incoming and active streams for an application.

That one only shows it for a single incoming stream. I need something that shows all incoming streams into an application that shows the following variables in a single provider as follows.

```auto

```

1. {
2. “name”:“name”,
3. “streamName”:“streamname”,
4. “applicationName”:“AppName”,
5. “isConnected”:true,
6. “totalConnections”:1,
7. }

---

<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:** [April 22, 2019, 5:06pm UTC](https://community.wowza.com/t/custom-http-provider/48671/10 "2019-04-22T17:06:50Z")

</div>

Ok let me check back with the engineers to see if we have that.

---

<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:** [April 22, 2019, 6:20pm UTC](https://community.wowza.com/t/custom-http-provider/48671/11 "2019-04-22T18:20:07Z")

</div>

Unfortunately @Nick Copeland, I checked with the engineers for you and we do not have a way for you to do this right now.

You would still have to use two REST API calls:

-One call to get all the streams and then a second to pull the information for each stream - there isn’t one which does both combined.

---

<div class="post-metadata">

**Author:** ![Nick\_Copeland](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@Nick\_Copeland](https://community.wowza.com/u/Nick_Copeland)\
**Post date:** [April 22, 2019, 9:01pm UTC](https://community.wowza.com/t/custom-http-provider/48671/12 "2019-04-22T21:01:33Z")

</div>

Sadly I am aware there isn’t a single provider which makes working with this API a nightmare for dynamic realtime content and I would pay good money to have something custom written. There is NO provider that will allow you to monitor all incoming streams for a single application which IMO I feel this is a real oversight on Wowza’s part that something like this doesn’t exist or users are able to easily create themselves and the one setback that keeps me on a month to month as needed basis with Wowza instead of going all in with the Perpetual Lic since development of the API is lacking severely and there has not been any additions to or updates to it in years and several other posts on here echo that. From a web development standpoint this is one of the most poorly written and difficult API’s to work with. Please get it together Wowza, you have a great streaming solution, but the API desperately needs some attention.

---

<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:** [April 22, 2019, 9:26pm UTC](https://community.wowza.com/t/custom-http-provider/48671/13 "2019-04-22T21:26:22Z")

</div>

Thank you for this feedback and I’m passing it on to the API team. Please know I hear you and appreciate you sharing this.
