Wowza Community

REST API endpoint to disconnect incoming stream is not working

I am trying to disconnect an incoming stream through the following endpoint:

PUT /v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/instances/{instanceName}/incomingstreams/{streamName}/actions/disconnectStream

But it fails all the time with the following response:

{
  "code": "404",
  "success": false,
  "message": "The server has not found anything matching the request URI",
  "wowzaServer": "4.4.1"
}

All the path params that I am using is correct: “/v2/servers/defaultServer/vhosts/defaultVHost/applications/live/instances/definst/incomingstreams/35355-1468504027689/actions/disconnectStream”

The streaming server version is “Wowza Streaming Engine Pro 4 for Amazon EC2 4.4.1 build17882”.

Is there any configuration on the server that needs to be enabled to make it work?

I guess I posted to the wrong forum. Moving this to “Wowza Streaming Engine REST API” forum.

Hello, it may be that you need to configure CORS header properties.

Please take a look at this guide for the steps:

Configure CORS header properties

Best,

Salvadore

Hi,

Is the stream being published to Wowza (.e.g. from RTMP or RTSP) or is it being pulled by Wowza via a stream file? If you are ingesting as a stream file then this API call will work. If it is a live stream published into Wowza (not via a stream file) then that endpoint will not work.

Regards,

Paul

Thanks for the answer, but the CORS was already configured properly.

Maybe this issue is only happening on Wowza Server 4.4.1?

Hi,

any luck to solve the problem?

I’m getting the same response on Wowza 4.5.0.01

{"message":"The server has not found anything matching the request URI","success":false,"code":"404","wowzaServer":"4.5.0.01"}

CORS is configured as below

                         <Properties>
                                <Property>
                                        <Name>restUserHTTPHeaders</Name>
                                        <Value>Access-Control-Allow-Origin:*|Access-Control-Allow-Methods:OPTIONS,GET,PUT,DELETE,POST</Value>
                                </Property>
                        </Properties>

Thanks

I am having the same exact issue using wowza 4.7

My stream is an RTMP stream broadcasting from .swf.

Please check your stream Name is that correct, mostly it happens when you pass the wrong streamName, I am using the same command and its working for me.

I am streaming using push approach(Through RTMP). How can i disconnect or reset the live stream.

I am using wowza 4.7.3

Hello,

I am facing the same issue and I am using streaming engine version 4.7.6.

We are broadcasting live from the mobile device and I want to stop it using rest API.

Request:
curl -X PUT --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-Type:application/json; charset=utf-8’ http://abc.com:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/live/instances/definst/incomingstreams/6l5gcca3mu2ziatyak6reahluhmxx6t0/actions/disconnectStream

Response:

{“success”:false,“message”:“The server has not found anything matching the request URI”,“wowzaServer”:“4.7.6”,“code”:“404”}

I am fetching stream name using API

http://abc.com:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances

Please help and let me give any other solution to stop live broadcast (stream)

Thanks,

Ujjaval