# REST API endpoint to disconnect incoming stream is not working

**URL:** <https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276>\
**Category:** Wowza Streaming Engine\
**Created:** [July 14, 2016, 10:04am UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276 "2016-07-14T10:04:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Reis](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@Gabriel\_Reis](https://community.wowza.com/u/Gabriel_Reis)\
**Post date:** [July 14, 2016, 10:04am UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/1 "2016-07-14T10:04:13Z")

</div>

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

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

```

But it fails all the time with the following response:

```auto
{
  "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?

---

<div class="post-metadata">

**Author:** ![Gabriel\_Reis](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@Gabriel\_Reis](https://community.wowza.com/u/Gabriel_Reis)\
**Post date:** [July 14, 2016, 3:49pm UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/2 "2016-07-14T15:49:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [July 24, 2016, 12:37pm UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/3 "2016-07-24T12:37:05Z")

</div>

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](https://www.wowza.com/docs/how-to-access-documentation-for-wowza-streaming-engine-rest-api#restUserHTTPHeaders_config)

Best,

Salvadore

---

<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:** [September 2, 2016, 2:26pm UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/4 "2016-09-02T14:26:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gabriel\_Reis](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@Gabriel\_Reis](https://community.wowza.com/u/Gabriel_Reis)\
**Post date:** [July 25, 2016, 3:23pm UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/5 "2016-07-25T15:23:16Z")

</div>

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

Maybe this issue is only happening on Wowza Server 4.4.1?

---

<div class="post-metadata">

**Author:** ![Streaming\_Engineer](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Streaming\_Engineer](https://community.wowza.com/u/Streaming_Engineer)\
**Post date:** [August 18, 2016, 7:43pm UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/6 "2016-08-18T19:43:55Z")

</div>

Hi,

any luck to solve the problem?

I’m getting the same response on Wowza 4.5.0.01

```auto
{"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

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

```

Thanks

---

<div class="post-metadata">

**Author:** ![ken\_murray](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@ken\_murray](https://community.wowza.com/u/ken_murray)\
**Post date:** [July 17, 2017, 11:35pm UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/7 "2017-07-17T23:35:50Z")

</div>

I am having the same exact issue using wowza 4.7

My stream is an RTMP stream broadcasting from .swf.

---

<div class="post-metadata">

**Author:** ![vipin\_pokhriyal](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@vipin\_pokhriyal](https://community.wowza.com/u/vipin_pokhriyal)\
**Post date:** [September 27, 2017, 8:01am UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/8 "2017-09-27T08:01:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ali\_Rizvi](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Ali\_Rizvi](https://community.wowza.com/u/Ali_Rizvi)\
**Post date:** [January 12, 2018, 5:21pm UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/9 "2018-01-12T17:21:04Z")

</div>

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

I am using wowza 4.7.3

---

<div class="post-metadata">

**Author:** ![Ujjaval\_Jani](https://avatars.discourse-cdn.com/v4/letter/u/b5a626/32.png) [@Ujjaval\_Jani](https://community.wowza.com/u/Ujjaval_Jani)\
**Post date:** [December 7, 2018, 5:45pm UTC](https://community.wowza.com/t/rest-api-endpoint-to-disconnect-incoming-stream-is-not-working/47276/10 "2018-12-07T17:45:18Z")

</div>

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/](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

```auto
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
