Results 1 to 10 of 10

Thread: How to set stream target custom properties using REST APIs?

  1. #1

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

    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.
    Last edited by stefano.caporale.masvis; 05-10-2016 at 02:42 AM.

  2. #2

    Default

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

  3. #3

    Default

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

    Regards,

    Salvadore

  4. #4

    Default

    Hi,

    As per the documentation you can add a stream target like so

    PHP Code:
    curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource -d'
    {
       
    "restURI""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"
    }
    You can then set certain values with a call such as

    PHP Code:
    curl -X PUT --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource -d'
    {
    "restURI""http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource",
      
    "host""paulhost",
      
    "destinationServer""dest"
    }
    The full model schema for stream targets is

    PHP Code:
    {
      
    "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"""


    Paul

  5. #5

    Default

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


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

  6. #6

    Default

    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

  7. #7

    Default

    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.

  8. #8

    Default

    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 Code:
    curl -X PUT --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/pushpublish/mapentries/ppsource -d'
    {
        
    "restURI""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"
    }

    Paul

  9. #9

    Default

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

  10. #10

    Default

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


    Paul

Similar Threads

  1. Replies: 1
    Last Post: 11-18-2015, 05:35 AM
  2. How to access documentation for Wowza Streaming Engine REST APIs ???
    By ketan86 in forum Live Streaming and Encoders
    Replies: 1
    Last Post: 06-30-2015, 07:01 AM
  3. How to access documentation for Wowza Streaming Engine REST APIs ???
    By ketan86 in forum Wowza Streaming Engine REST API
    Replies: 1
    Last Post: 06-30-2015, 07:01 AM
  4. Custom stream target
    By shueardm in forum Wowza Streaming Cloud
    Replies: 2
    Last Post: 03-15-2015, 09:45 PM
  5. Using Apache CXF & Spring framework in Wowza to expose REST APIs
    By arindamg in forum Wowza Streaming Engine functionality
    Replies: 1
    Last Post: 04-05-2013, 03:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •