Results 1 to 4 of 4

Thread: REST API start up stream example

  1. #1
    Join Date
    Jun 2015
    Posts
    7

    Default REST API start up stream example

    I did the following request use REST API, but it returns this error: The server encountered an unexpected condition which prevented it from fulfilling the request.

    I am quite not so sure what to write in two restURI. Helps please.
    {
    "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/startupstreams",
    "serverName": "",
    "saveFieldList": [
    ""
    ],
    "version": "",
    "Streams": [
    {
    "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/startupstreams",
    "mediaCasterType": "rtp",
    "instance": "",
    "serverName": "",
    "saveFieldList": [
    ""
    ],
    "version": "",
    "streamName": "main2.stream",
    "applicationName": "544299-1"
    }
    ]
    }

  2. #2
    Join Date
    Jun 2015
    Posts
    7

    Default

    It should like this, but it still have the same error.

    Request URL: "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/startupstreams"

    And body: {
    "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/startupstreams",
    "version": "1445839700752",
    "Streams": [
    {
    "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/startupstreams/applications/544299-1/instances/_definst_/streams/main2.stream",
    "mediaCasterType": "liverepeater",
    "instance": "_definst_",
    "streamName": "main2.stream",
    "applicationName": "544299-1"
    }
    ]
    }

  3. #3
    Join Date
    Jun 2015
    Posts
    7

    Default

    It's java.lang.ArrayIndexOutOfBoundsException.

    finaly I can add a start up stream one item at a time, it's enough for me.

    but I still wonder I did add array right.

  4. #4
    Join Date
    May 2013
    Posts
    680

    Default

    Hello

    You might try the following example:

    curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://[wowza-server]:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/startupstreams -d'{
       "appName": "[app-name]", 
       "mediaCasterType": "rtp",
       "instance": "_definst_",
       "serverName": "_defaultServer_",
       "streamName": "[stream-file-name]",
       "version": "1446125518000"
     }'
    This returned successful for me:

    {"success":true,"message":"Saved","data":null}
    Ensure you replace the following:
    [wowza-server] - with your wowza url (ex. localhost)
    [app-name] - with your app name (ex. 544299-1)
    [stream-file-name] - with your stream file name (ex. main2.stream)

    Thanks,
    Matt

Similar Threads

  1. REST Api smil example ?
    By numsnums2 in forum Wowza Streaming Engine REST API
    Replies: 6
    Last Post: 04-12-2016, 08:54 AM
  2. REST API or Java call to Disable/Enable Stream Targets
    By mtownsend in forum Wowza Streaming Engine REST API
    Replies: 2
    Last Post: 07-30-2015, 11:05 AM
  3. Try to use REST API to start and stop recording from a live stream
    By pothibo in forum Wowza Streaming Engine REST API
    Replies: 3
    Last Post: 07-13-2015, 08:05 AM
  4. Start/stop MediaCasterStream via rest api?
    By maaark in forum General Forum
    Replies: 1
    Last Post: 05-26-2015, 06:02 AM
  5. API rest start/stop/restart application live tream
    By jormarcha in forum Wowza Streaming Engine REST API
    Replies: 1
    Last Post: 03-13-2015, 01:20 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
  •