# stop publishing live stream server side

**URL:** <https://community.wowza.com/t/stop-publishing-live-stream-server-side/50386>\
**Category:** Wowza Developer Dojo\
**Created:** [December 18, 2017, 8:02am UTC](https://community.wowza.com/t/stop-publishing-live-stream-server-side/50386 "2017-12-18T08:02:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Troisgros](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@Gabriel\_Troisgros](https://community.wowza.com/u/Gabriel_Troisgros)\
**Post date:** [December 18, 2017, 8:02am UTC](https://community.wowza.com/t/stop-publishing-live-stream-server-side/50386/1 "2017-12-18T08:02:04Z")

</div>

still having issues with the rest api…im trying to stop publishing server side a live stream.

if i make a call like:

```auto
http://xxx.xxx.com:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/wcs/instances/1/incomingstreams/1-Gabdroid%5E5a375fdf9439c%5Eok%5Efr-3b7f

```

its fine i get all stream informations

if i issue this command:

```auto
http://xxx.xxx.com:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/wcs/instances/1/incomingstreams/1-Gabdroid%5E5a375fdf9439c%5Eok%5Efr-3b7f/actions/disconnectStream

```

i have a 404 error…help

---

<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:** [December 26, 2017, 2:05am UTC](https://community.wowza.com/t/stop-publishing-live-stream-server-side/50386/2 "2017-12-26T02:05:19Z")

</div>

Hi,

The disconnectStream REST API method can only be used if the incomingstream object was initially connected through the MediaCaster system ([using a stream file](https://www.wowza.com/docs/stream-management-query-examples)). If you are publishing the stream by pushing it from the encoder (similar to Wirecast and GoCoder), then this is not the appropriate method to disconnect the stream.

Michelle

---

<div class="post-metadata">

**Author:** ![Pericas-Moya\_Ruben](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@Pericas-Moya\_Ruben](https://community.wowza.com/u/Pericas-Moya_Ruben)\
**Post date:** [February 21, 2018, 7:39am UTC](https://community.wowza.com/t/stop-publishing-live-stream-server-side/50386/3 "2018-02-21T07:39:58Z")

</div>

Hey there,

Having a similar case; any hints about what the “appropriate method” would be ?

Btw, where can I find a list of all actions available? They don’t seem to be listed in the doc, or I missed them…

---

<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:** [March 15, 2018, 1:59am UTC](https://community.wowza.com/t/stop-publishing-live-stream-server-side/50386/4 "2018-03-15T01:59:21Z")

</div>

If the stream is being pushed to the server (where the encoder initiated the connection), it’s best to stop it from the source encoder. You can have a module in place that rejects or shuts down the connection, but this will not prevent the encoder from re-sending the connection request repeatedly (similar to a DOS).

To shut down an on going RTMP publisher, you can call `stream.getClient().setShutdownClient(true);` for that stream object.

Michelle

---

<div class="post-metadata">

**Author:** ![Pericas-Moya\_Ruben](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@Pericas-Moya\_Ruben](https://community.wowza.com/u/Pericas-Moya_Ruben)\
**Post date:** [March 16, 2018, 6:38am UTC](https://community.wowza.com/t/stop-publishing-live-stream-server-side/50386/5 "2018-03-16T06:38:20Z")

</div>

Good to know, thank you
