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

**URL:** <https://community.wowza.com/t/rest-api-or-java-call-to-disable-enable-stream-targets/39906>\
**Category:** Wowza Developer Dojo\
**Created:** [July 28, 2015, 2:56pm UTC](https://community.wowza.com/t/rest-api-or-java-call-to-disable-enable-stream-targets/39906 "2015-07-28T14:56:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)\
**Post date:** [July 30, 2015, 5:19am UTC](https://community.wowza.com/t/rest-api-or-java-call-to-disable-enable-stream-targets/39906/2 "2015-07-30T05:19:18Z")

</div>

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:

```auto
PUT /v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/pushpublish/mapentries/{entryName}/actions/{action}

```

A cURL example might look like:

```auto
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](https://www.wowza.com/docs/how-to-use-curl-to-query-wowza-rest-api#getpp) and iterate through them as required and disable the given target.

```auto
GET /v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/pushpublish/mapentries

```

Thanks,

Matt

---

_[View the full topic](https://community.wowza.com/t/rest-api-or-java-call-to-disable-enable-stream-targets/39906)._
