# stop recording streams by instance with rest api

**URL:** <https://community.wowza.com/t/stop-recording-streams-by-instance-with-rest-api/50347>\
**Category:** Wowza Streaming Engine\
**Tags:** recording\
**Created:** [December 11, 2017, 5:08am UTC](https://community.wowza.com/t/stop-recording-streams-by-instance-with-rest-api/50347 "2017-12-11T05:08:49Z")\
**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 11, 2017, 5:08am UTC](https://community.wowza.com/t/stop-recording-streams-by-instance-with-rest-api/50347/1 "2017-12-11T05:08:49Z")

</div>

hello

is it possible to stop all recordings in a specific app instance using rest api

the basic command to stop recording a stream by name is:

$response = $sf-\>stop(“myStream”);

what would be the equivalent to stop all recordings ?

thanks

---

<div class="post-metadata">

**Author:** ![Stuart\_Gunn](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@Stuart\_Gunn](https://community.wowza.com/u/Stuart_Gunn)\
**Post date:** [December 11, 2017, 5:16am UTC](https://community.wowza.com/t/stop-recording-streams-by-instance-with-rest-api/50347/2 "2017-12-11T05:16:03Z")

</div>

Not aware of a way to stop all the streams at once, but on our system we just stop any started streams by working through them. Each recorded stream has a slightly different ending point (by milliseconds) but not a big deal for us.

If your recording is critical you should really be automatically monitoring any streams to check their recording state anyway so hopefully it won’t be a big deal to then start/stop the right ones.

Failing that, I don’t think there are any negative implications in ‘stopping’ a stopped stream again, so you could just blanket stop them all.

---

<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 11, 2017, 5:16am UTC](https://community.wowza.com/t/stop-recording-streams-by-instance-with-rest-api/50347/3 "2017-12-11T05:16:26Z")

</div>

got this response when using the standard call with the stream name:

JSON REQUEST to [http://xxx.com:8087/v2/servers/](http://xxx.com:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders/1-Gab^5a2e1255cb8df^ok^fr-c004/actions/stopRecording with verb PUT: {“restURI”:“[http://xxx.com:8087/v2/servers/](http://xxx.com:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders/1-Gab^5a2e1255cb8df^ok^fr-c004/actions/stopRecording”} RETURN: {“message”:“Your IP address (xx.xx.xx.xx) has been blocked”,“success”:false,“wowzaServer”:“4.7.0.02”,“code”:“403”}

any clue ?

---

<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 11, 2017, 5:21am UTC](https://community.wowza.com/t/stop-recording-streams-by-instance-with-rest-api/50347/4 "2017-12-11T05:21:37Z")

</div>

ok after whitelisting its working now i have a new error:

the rest call doesnt point to the correct app/instanceName

how to change this ?

thx !

---

<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 12, 2017, 7:44am UTC](https://community.wowza.com/t/stop-recording-streams-by-instance-with-rest-api/50347/5 "2017-12-12T07:44:42Z")

</div>

still no luck…while my rest call is ponting to the right app/instance/streamName, the answer is a 404 error

request:

```auto
JSON REQUEST to http://xxx.com:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/wcs/instances/1/streamrecorders/1-Gabdroid^5a2f3bdc5b156^ok^fr-ebe4/actions/stopRecording with verb PUT: {"restURI":"http:\/\/xxx.com:8087\/v2\/servers\/_defaultServer_\/vhosts\/_defaultVHost_\/applications\/wcs\/instances\/1\/streamrecorders\/1-Gabdroid^5a2f3bdc5b156^ok^fr-ebe4\/actions\/stopRecording"} 

```

result:

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

```
