Connect stream Api call is not working

Trying to connect a stream using the method provided in the following url

https://www.wowza.com/docs/stream-management-query-examples

Using

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/streamfiles/metallica/actions/connect?connectAppName=testlive&appInstance=definst&mediaCasterType=rtp”

But i am trying to use jquery to connect the stream, my application is MVC,C# using .net framework, i want to use jquery to connect to stream

But getting the below error result

HTTP/1.1 404 Not Found

Content-Type: text/xml; charset=UTF-8

Date: Wed, 17 Feb 2016 06:04:02 GMT

Accept-Ranges: bytes

Server: Restlet-Framework/2.2.2

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: OPTIONS,GET,PUT,DELETE,POST

Access-Control-Allow-Headers: Content-Type

Connection: keep-alive

Transfer-Encoding: chunked

c2

<?xml version="1.0" encoding="UTF-8" standalone="no"?>4.2.0404The server has not found anything matching the request URI

0

Hello

A couple of questions:

  • What is your stream file name? Here it assumes metallica.stream.

  • Do you have the appropriate CORS headers defined?

  • Is your app name fixed to be “testlive”?

Should all of this be preconfigured as suggested, please send a zip file of your conf/, logs/, and stream file(s) to our support team for review along with your exact cURL request and response.

Thanks!

Matt

I’ve got exactly the same problem, all other API requests works (like showing, stopping, deleting) but not the example with start a .stream file. I guess the example is not correct, a parameter-name wrong.

The URI format for connecting streams as shown in documentation works for Wowza Dev version. For common Wowza version the URI format is:

http://{serveruri}:8087/v2/servers/{server}/vhosts/{vhost}/applications/{app}/streamfiles/{stream}/actions/connect?connectAppName={app}&appInstance={appinst}&mediaCasterType={casterType}

Where:

{serveruri} = URI address of your Wowza Engine Server

{server} = defaultServer

{vhost}= defaultVHost

{app} = Application name e.g. live

{appinst} = definst

{casterType} = rtp or other media like applehls etc.