# REST request for connecting smil file doesn't work for me with curl, why?

**URL:** <https://community.wowza.com/t/rest-request-for-connecting-smil-file-doesnt-work-for-me-with-curl-why/51136>\
**Category:** Wowza Streaming Engine\
**Tags:** server-administration\
**Created:** [April 13, 2018, 5:50pm UTC](https://community.wowza.com/t/rest-request-for-connecting-smil-file-doesnt-work-for-me-with-curl-why/51136 "2018-04-13T17:50:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TROTEL\_Yann](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@TROTEL\_Yann](https://community.wowza.com/u/TROTEL_Yann)\
**Post date:** [April 13, 2018, 5:50pm UTC](https://community.wowza.com/t/rest-request-for-connecting-smil-file-doesnt-work-for-me-with-curl-why/51136/1 "2018-04-13T17:50:06Z")

</div>

I tried this query today :

[http://127.0.0.1:8087/v2/servers/](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

---

<div class="post-metadata">

**Author:** ![TROTEL\_Yann](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@TROTEL\_Yann](https://community.wowza.com/u/TROTEL_Yann)\
**Post date:** [April 13, 2018, 6:14pm UTC](https://community.wowza.com/t/rest-request-for-connecting-smil-file-doesnt-work-for-me-with-curl-why/51136/2 "2018-04-13T18:14:13Z")

</div>

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/](http://5.196.77.94:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/youtube/smilfiles/youtube/actions/connect?connectAppName=youtube&appInstance=_definst_&mediaCasterType=rtp

---

<div class="post-metadata">

**Author:** ![TROTEL\_Yann](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@TROTEL\_Yann](https://community.wowza.com/u/TROTEL_Yann)\
**Post date:** [April 13, 2018, 6:36pm UTC](https://community.wowza.com/t/rest-request-for-connecting-smil-file-doesnt-work-for-me-with-curl-why/51136/3 "2018-04-13T18:36:39Z")

</div>

I’ve got the exact same issue with connecting streams. works on my computer with chrome but not on my server with curl .

---

<div class="post-metadata">

**Author:** ![TROTEL\_Yann](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@TROTEL\_Yann](https://community.wowza.com/u/TROTEL_Yann)\
**Post date:** [April 13, 2018, 7:20pm UTC](https://community.wowza.com/t/rest-request-for-connecting-smil-file-doesnt-work-for-me-with-curl-why/51136/4 "2018-04-13T19:20:19Z")

</div>

Here’s my error log :

ERROR server comment 2018-04-13 21:16:43 - - - - - 3.632 - - - - - - - - REST API: Connect SMIL file: null

---

<div class="post-metadata">

**Author:** ![TROTEL\_Yann](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@TROTEL\_Yann](https://community.wowza.com/u/TROTEL_Yann)\
**Post date:** [April 13, 2018, 7:36pm UTC](https://community.wowza.com/t/rest-request-for-connecting-smil-file-doesnt-work-for-me-with-curl-why/51136/5 "2018-04-13T19:36:45Z")

</div>

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/](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:
