I tried this query today :
http://127.0.0.1:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/youtube/smilfiles/youtube/actions/connect?connectAppName=youtube&appInstance=definst&mediaCasterType=rtp
my application name is youtube and my smil file is youtube.smil
the output of curl is {“success”:false,“message”:null,“data”:null}
I don’t know what I’ve done wrong ?
In addition I’ll say that I’ve tested a curl request for application restarting wich works.
Please help
I tried it from my own PC with the documentation html interface, and it works !
I don’t understand why it doesn’t with curl on my server .
my curl command is :
curl -X PUT -H ‘Accept:application/json; charset=utf-8’ http://5.196.77.94:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/youtube/smilfiles/youtube/actions/connect?connectAppName=youtube&appInstance=definst&mediaCasterType=rtp
I’ve got the exact same issue with connecting streams. works on my computer with chrome but not on my server with curl .
Here’s my error log :
ERROR server comment 2018-04-13 21:16:43 - - - - - 3.632 - - - - - - - - REST API: Connect SMIL file: null
I found the answer
In your curl command you have to quote the request like this :
curl -X PUT --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-Type:application/json; charset=utf-8’ ‘http://5.196.77.94:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/youtube/smilfiles/youtube/actions/connect/connectAppName=youtube&appInstance=definst&mediaCasterType=rtp’
Unless your server don’t receives all after the & sign .
Hope that helps.
Yann: