# rest api curl enable/disable stream target works in local not in live

**URL:** <https://community.wowza.com/t/rest-api-curl-enable-disable-stream-target-works-in-local-not-in-live/49765>\
**Category:** Wowza Developer Dojo\
**Created:** [September 28, 2017, 4:29pm UTC](https://community.wowza.com/t/rest-api-curl-enable-disable-stream-target-works-in-local-not-in-live/49765 "2017-09-28T16:29:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajasegar\_Elumalai1](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@Rajasegar\_Elumalai1](https://community.wowza.com/u/Rajasegar_Elumalai1)\
**Post date:** [September 28, 2017, 4:29pm UTC](https://community.wowza.com/t/rest-api-curl-enable-disable-stream-target-works-in-local-not-in-live/49765/1 "2017-09-28T16:29:49Z")

</div>

Hi ,

I am using wowza stream engine 4.7.0 . i am able to enable/disable stream target in local but not in live. I am using shared hosting.

$url=“[http://103.49.235.15:8087/v2/servers/](http://103.49.235.15:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/rajdemo/pushpublish/mapentries/rajstreamdemo/actions/enable”;

$json = " ";

$ch = curl\_init($url);

curl\_setopt($ch, CURLOPT\_POST, true);

curl\_setopt($ch, CURLOPT\_POSTFIELDS, $json);

curl\_setopt($ch, CURLOPT\_HEADER ,0);

curl\_setopt($ch, CURLOPT\_RETURNTRANSFER ,1);

curl\_setopt($ch, CURLOPT\_CUSTOMREQUEST, “PUT”);

curl\_setopt($ch, CURLOPT\_USERPWD, “cherri:cherri123”);

curl\_setopt($ch, CURLOPT\_HTTPAUTH, CURLAUTH\_DIGEST);

curl\_setopt($ch, CURLOPT\_HTTPHEADER, array( ‘Accept:application/json; charset=utf-8’, ‘Content-type:application/json; charset=utf-8’, 'Content-Length: '.strlen($json)));

$contents = curl\_exec($ch);

curl\_close($ch);

$obj = json\_decode($contents);

echo “

```
”;

print\_r($obj);

exit();
```

---

<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:** [September 30, 2017, 1:54am UTC](https://community.wowza.com/t/rest-api-curl-enable-disable-stream-target-works-in-local-not-in-live/49765/2 "2017-09-30T01:54:35Z")

</div>

It sounds like your command works fine against one server instance, but not another? What response are you getting when you run your command? I would recommend sending this in as a [support request](https://www.wowza.com/support/open-ticket) so that we can review the server’s conf/ and logs/. I’d also recommend redacting sensitive info from your post above, such as username, password, and IP addresses.

Michelle
