# update a stream target using REST API in WOWZA Streaming Engine

**URL:** <https://community.wowza.com/t/update-a-stream-target-using-rest-api-in-wowza-streaming-engine/49260>\
**Category:** Wowza Developer Dojo\
**Created:** [July 24, 2017, 8:24am UTC](https://community.wowza.com/t/update-a-stream-target-using-rest-api-in-wowza-streaming-engine/49260 "2017-07-24T08:24:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![senthilkumar\_Rajagop](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@senthilkumar\_Rajagop](https://community.wowza.com/u/senthilkumar_Rajagop)\
**Post date:** [July 24, 2017, 8:24am UTC](https://community.wowza.com/t/update-a-stream-target-using-rest-api-in-wowza-streaming-engine/49260/1 "2017-07-24T08:24:11Z")

</div>

Hi ,

I am trying to update some of the fields in Stream target using PUT rest API.

I am getting the response as { “success”: true, “message”: “Saved”, “data”: null }

But when i browse through EngineManger , the change is not getting reflected.

Is PUT supported for Streamtargets RESTapi?

---

<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:** [July 25, 2017, 5:25am UTC](https://community.wowza.com/t/update-a-stream-target-using-rest-api-in-wowza-streaming-engine/49260/2 "2017-07-25T05:25:46Z")

</div>

The PUT method for the /pushpublish/ endpoint is supported in order to [update an existing stream target](https://www.wowza.com/docs/stream-targets-query-examples-push-publishing). Can you post the exact command you are getting (with the JSON data you are passing), as well as a screenshot of the Manager UI? Note that you may need to refresh the Manager UI in order to view the changes.

---

<div class="post-metadata">

**Author:** ![senthilkumar\_Rajagop](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@senthilkumar\_Rajagop](https://community.wowza.com/u/senthilkumar_Rajagop)\
**Post date:** [July 25, 2017, 5:54am UTC](https://community.wowza.com/t/update-a-stream-target-using-rest-api-in-wowza-streaming-engine/49260/3 "2017-07-25T05:54:43Z")

</div>

Hi Michelle,

Find the attached zip file containing screenshots of PUT request details

[streamtargets.zip](https://www.wowza.com/community/storage/attachments/345-streamtargets.zip)

Also below are the Request and response details:

[http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries](http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries)

JSON : {“mapEntries”: [{ “entryName”: “Test”, “sourceStreamName”: “YYY” }]}

RESPONSE:

{ “success”: true, “message”: “Saved”, “data”: null }

---

<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:** [August 2, 2017, 5:48am UTC](https://community.wowza.com/t/update-a-stream-target-using-rest-api-in-wowza-streaming-engine/49260/4 "2017-08-02T05:48:19Z")

</div>

Hi,

It looks like you are only passing the source stream name and the entry name. When updating a stream target, you would need to pass all the parameters required for the profile you’re using. The format should be the same as when initially creating the stream target, except you’re using a PUT and not a POST method.

Michelle

---

<div class="post-metadata">

**Author:** ![senthilkumar\_Rajagop](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@senthilkumar\_Rajagop](https://community.wowza.com/u/senthilkumar_Rajagop)\
**Post date:** [August 21, 2017, 6:26am UTC](https://community.wowza.com/t/update-a-stream-target-using-rest-api-in-wowza-streaming-engine/49260/5 "2017-08-21T06:26:27Z")

</div>

Here is my entry in PushPublishMap.txt

# This file has been upgraded for use by the Wowza Streaming Engine REST API. Please avoid hand-editing.

SourceStreamName={“entryName”:“Test”, “profile”:“rtmp”, “password”:“Password”, “application”:“DestinationApplicationName”, “destinationName”:“rtmp”, “host”:“DestinationHost”, “appInstance”:“DestinationApplicationInstance”, “userName”:“UserName”, “streamName”:“DestinationStreamName”}

Now I am sending the below **PUT** method to update the streamName from “ **DestinationStreamName** ” to “ **Modified** ”  
[http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries](http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries)  
{  
“serverName”: “_defaultServer_”,  
“sourceStreamName”: “SourceStreamName”,  
“entryName”: “Test”,  
“profile”: “rtmp”,  
“destinationName”:“rtmp”,  
“host”: “DestinationHost”,  
“application”: “DestinationApplicationName”,  
“userName”: “UserName”,  
“password”: “Password”,  
“streamName”: “Modified”,  
“appInstance”: “DestinationApplicationInstance”  
}  
iam gettting the response as:  
{  
“success”: true,  
“message”: “Saved”,  
“data”: null  
}  
**But if i go to the engine manager and check the value is unchanged. There is no change in PushPublishMap.txt also**
