# How to set stream target custom properties using REST APIs?

**URL:** <https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898>\
**Category:** Wowza Developer Dojo\
**Created:** [May 10, 2016, 10:11am UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898 "2016-05-10T10:11:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefano\_Caporale](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Stefano\_Caporale](https://community.wowza.com/u/Stefano_Caporale)\
**Post date:** [May 10, 2016, 10:11am UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/1 "2016-05-10T10:11:32Z")

</div>

Is there a way to set custom properties to for a stream target using REST APIs?

I noticed it is possibile on the web manager but it is not documented anywhere on the REST APIs documentation.

---

<div class="post-metadata">

**Author:** ![Stefano\_Caporale](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Stefano\_Caporale](https://community.wowza.com/u/Stefano_Caporale)\
**Post date:** [May 10, 2016, 10:42am UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/2 "2016-05-10T10:42:05Z")

</div>

Sorry, I just noticed the developer section of the forum. Please some admin could move this post there?

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [May 10, 2016, 7:10am UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/3 "2016-05-10T07:10:10Z")

</div>

No problem. Please let us know if you need a assistance in the future.

Regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [May 16, 2016, 2:55pm UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/4 "2016-05-16T14:55:38Z")

</div>

Hi,

As [per the documentation](https://www.wowza.com/docs/stream-targets-query-examples-push-publishing%28push-publishing%29) you can add a stream target like so

[php]

curl -X POST --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-type:application/json; charset=utf-8’ [http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource -d’

{

“restURI”: “[http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource”,

“serverName”:“_defaultServer_”,

“sourceStreamName”: “myStream”,

“entryName”: “ppsource”,

“profile”: “rtmp”,

“host”: “localhost”,

“application”:“live”,

“userName”:“testUser”,

“password”:“pass”,

“streamName”:“myStream”

}’

[/php]

You can then set certain values with a call such as

[php]

curl -X PUT --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-type:application/json; charset=utf-8’ [http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource -d’

{

“restURI”: “[http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource”,

“host”: “paulhost”,

“destinationServer”: “dest”

}’

[/php]

The full model schema for stream targets is

[php]

{

“shoutcast.destination”: “”,

“icecast2.public”: false,

“akamai.destinationServer”: “”,

“shoutcast.icq”: “”,

“timeToLive”: 0,

“password”: “”,

“rtpWrap”: false,

“icecast2.name”: “”,

“akamai.hostId”: “”,

“icecast2.icq”: “”,

“host”: “”,

“connectionFlashVersion”: “”,

“cupertino.renditions”: “”,

“debugPackets”: false,

“shoutcast.public”: false,

“shoutcast.aim”: “”,

“profile”: “”,

“icecast2.description”: “”,

“sessionStatus”: “”,

“shoutcast.metaname”: “”,

“icecast2.genre”: “”,

“queryString”: “”,

“akamai.eventName”: “”,

“version”: “”,

“shoutcast.name”: “”,

“sendStreamCloseCommands”: false,

“port”: 0,

“sendFCPublish”: false,

“icecast2.aim”: “”,

“http.playlistCount”: 0,

“http.playlistTimeout”: 0,

“audioPort”: “”,

“icecast2.metaname”: “”,

“sourceStreamName”: “”,

“connectionCode”: “”,

“localBindAddress”: “”,

“shoutcast.protocol”: “”,

“debugLogChildren”: false,

“serverName”: “”,

“adaptiveStreaming”: false,

“enabled”: false,

“shoutcast.irc”: “”,

“sendReleaseStream”: false,

“shoutcast.url”: “”,

“icecast2.irc”: “”,

“debugLog”: false,

“shoutcast.genre”: “”,

“akamai.streamId”: “”,

“akamai.hdNetwork”: false,

“adaptiveGroups”: “”,

“saveFieldList”: [

“”

],

“http.playlistAcrossSessions”: false,

“secureTokenSharedSecret”: “”,

“http.fakePosts”: false,

“sendSSL”: false,

“sendOriginalTimecodes”: false,

“icecast2.destination”: “”,

“userName”: “”,

“streamName”: “”,

“removeDefaultAppInstance”: false,

“videoPort”: “”,

“http.writerDebug”: false,

“icecast2.url”: “”,

“akamai.sendToBackupServer”: false,

“destinationServer”: “”,

“application”: “”,

“entryName”: “”,

“streamWaitTimeout”: 0,

“appInstance”: “”,

“originalTimecodeThreshold”: “”,

“autoStartTranscoder”: false,

“sanjose.representationId”: “”

}

[/php]

Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [May 16, 2016, 9:07pm UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/5 "2016-05-16T21:07:09Z")

</div>

Hi,

My apologies - I missed the specific requirement for custom properties. Unfortunately it’s currently not possible to add custom properties in this way via the REST API. I have raised this internally and such functionality is being looked at, though I can’t say if or when this will be made available.

Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [May 17, 2016, 12:12pm UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/6 "2016-05-17T12:12:35Z")

</div>

Hi,

Sorry for any confusion on this, but in fact you _can_ add custom properties via REST API for your stream target. It is not currently documented (as we’ve both discovered - I’ll look at getting that amended) and the method is to use extraOptions, for example:

[php]

curl -X PUT --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-type:application/json; charset=utf-8’ [http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource -d’

{

“restURI”: “[http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource”,

“serverName”:“_defaultServer_”,

“sourceStreamName”: “myStream3”,

“entryName”: “ppsource”,

“profile”: “rtmp”,

“host”: “localhost”,

“application”:“live”,

“userName”:“testUser”,

“password”:“pass”,

“extraOptions”:{ “option1”:“value1” },

“streamName”:“myStream3”

}’

[/php]

Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [May 18, 2016, 12:59pm UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/7 "2016-05-18T12:59:12Z")

</div>

No problem, and apologies for the less than efficient responses.

Paul

---

<div class="post-metadata">

**Author:** ![Stefano\_Caporale](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Stefano\_Caporale](https://community.wowza.com/u/Stefano_Caporale)\
**Post date:** [May 16, 2016, 4:27pm UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/8 "2016-05-16T16:27:22Z")

</div>

Thank you, Paul, for your answer. Anyway I was asking for custom properties like the ones you can set in the manager.

![](http://s32.postimg.org/k1iiynxud/wowza.png)

Is there a way to add them using REST APIs, too? I can’t find anyting about pushpublish custom properties on the documentation.

---

<div class="post-metadata">

**Author:** ![Stefano\_Caporale](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Stefano\_Caporale](https://community.wowza.com/u/Stefano_Caporale)\
**Post date:** [May 17, 2016, 8:09am UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/9 "2016-05-17T08:09:45Z")

</div>

Thank you, Paul. I hope this functionality will be soon available because it would be a further step in wowza customization for the developer as stated in the manager help panel.

---

<div class="post-metadata">

**Author:** ![Stefano\_Caporale](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Stefano\_Caporale](https://community.wowza.com/u/Stefano_Caporale)\
**Post date:** [May 17, 2016, 3:03pm UTC](https://community.wowza.com/t/how-to-set-stream-target-custom-properties-using-rest-apis/46898/10 "2016-05-17T15:03:52Z")

</div>

Well, that’s great! Thank you again, Paul.
