Results 1 to 3 of 3

Thread: REST API or Java call to Disable/Enable Stream Targets

  1. #1

    Default REST API or Java call to Disable/Enable Stream Targets

    EngineManager has a handy button that disables all stream targets for an application, but I can't find a call to do that in either the REST API documentation nor the cURL usage page.

    In my environments I have two servers set up behind a round-robin configured such that if either server goes down the entire network load is transferred entirely to whatever server is still up. These two servers each have ShoutCast streams and scheduled content streams running as inputs and they're capable of re-streaming them to the network via multicast. Obviously, I can't have both of them multicasting at the same time but one has to always be multicasting. Currently (Wowza 3) I have a customized version of ModuleMulticastPublish with which I'm able to enable/disable all multicast if/when the server that's currently doing the multicasting goes down within about half a second. I'd like to get away from that a bit and use the built-in features of Wowza 4, but I can't see how StreamManager is doing it.

    What I need is a REST API or programmatic way to enable/disable all stream targets in an application in the same way hitting the Enable/Disable Stream Targets buttons work through EngineManager. I can't figure out what command is being issued by EngineManager to Wowza (nor why it isn't documented).

  2. #2
    Join Date
    May 2013
    Posts
    680

    Default

    Hello

    We do provide an endpoint to disable a stream target. You can see this on our documentation server described as a put request as follows:
    PUT /v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/pushpublish/mapentries/{entryName}/actions/{action}
    A cURL example might look like:
    curl --digest -u "user:pass" -X PUT --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/test/actions/disable
    You have to do this on a per entry basis. You can obtain a list of all entries and iterate through them as required and disable the given target.

    GET /v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/pushpublish/mapentries
    Thanks,
    Matt

  3. #3

    Default

    Thank you! I was looking for something with target in the name and those didn't mentally register as possibilities.

Similar Threads

  1. Enable/disable encode using REST
    By pmoliva in forum Wowza Streaming Engine REST API
    Replies: 1
    Last Post: 07-20-2015, 07:50 AM
  2. Updated to 4.2, Stream Targets link not found
    By colin_witt in forum General Forum
    Replies: 2
    Last Post: 07-08-2015, 04:53 AM
  3. REST API 4.1.2 call problem - POST methods not working in Swagger UI
    By keiserSoze in forum Wowza Streaming Engine REST API
    Replies: 1
    Last Post: 06-30-2015, 06:45 AM
  4. Enable Transcoding on stream from Client Call
    By hsamayoa in forum AddOn: Transcoder
    Replies: 7
    Last Post: 06-12-2012, 12:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •