[jitsi-dev] [jitsi/jitsi-videobridge] the rest api guide doesn't work (#319)


#1

Hi, total newb here.

I just wanted to explore the project and I started by getting jitsi videobridge 812 for OS X.
I started it using the --api=rest flag and I was able to curl /colibri/conferences and get an empty array "[]" back so it appears to be working.

So I started following the guide and doing:

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d '[]' "http://localhost:8080/colibri/conferences/"

and i got a 406 Not Acceptable.

I also tried posting the other example in the docs:

{ 
    "contents" : 
    [ 
        {
             "name" : "audio", 
             "channels" : [ { "expire" : 60 } ] 
        }, 
        { 
            "name" : "video", 
            "channels" : [ { "expire" : 60 } ] 
        } 
    ] 
}

but I got the same results.

Could someone point me in the right direction or confirm this is a bug?

···

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/319


#2

I think someone just posted a pull request to fix a typo in that
guide...the initial post should be an empty json object ("{}") instead of
an empty json array ("[]"). Give that a try and see if it fixes your
problem.

···

On Sun, Oct 2, 2016 at 4:02 AM, PLACE <notifications@github.com> wrote:

Hi, total newb here.

I just wanted to explore the project and I started by getting jitsi
videobridge 812 for OS X.
I started it using the --api=rest flag and I was able to curl
/colibri/conferences and get an empty array "[]" back so it appears to be
working.

So I started following the guide and doing:

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d '[]' "http://localhost:8080/colibri/conferences/"

and i got a 406 Not Acceptable.

I also tried posting the other example in the docs:

{
    "contents" :
    [
        {
             "name" : "audio",
             "channels" : [ { "expire" : 60 } ]
        },
        {
            "name" : "video",
            "channels" : [ { "expire" : 60 } ]
        }
    ]
}

but I got the same results.

Could someone point me in the right direction or confirm this is a bug?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/jitsi/jitsi-videobridge/issues/319>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AER2Y7-KF6N6tJPsQ7efvoNZRwMNBkjWks5qv482gaJpZM4KL_Hh>
.

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

Yeah posing "{}" was one of the things I tried. Any other thoughts?

···

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/319#issuecomment-250994177


#4

hmm. never mind. that curl seems to work for me too. I was using Postman so perhaps there some some weird interaction going on.
All good, sorry for you time and thanks for the quick help!

···

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/319#issuecomment-251039548


#5

Closed #319.

···

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/319#event-809883279


#6

I just tried the same command as you on my bridge:

curl -X POST -H "Accept: application/json" -H "Content-Type:
application/json" -d "{}" <bridge url>

and I got a proper response back (a newly allocated conference id).
Looking at the bridge, that error seems to come from the bridge thinking it
hasn't received json application type (if this
<https://github.com/jitsi/jitsi-videobridge/blob/4310a452e067440385119bae78b74938b1330e1f/src/main/java/org/jitsi/videobridge/rest/HandlerImpl.java#L656>
if
statement fails, it'll return 406 for a post). You could add some logs and
double check what content type the bridge is seeing. Wireshark might be
able to shed some light there, too.

···

On Sun, Oct 2, 2016 at 1:37 PM, PLACE <notifications@github.com> wrote:

Yeah posing "{}" was one of the things I tried. Any other thoughts?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/jitsi/jitsi-videobridge/issues/319#issuecomment-250994177>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AER2Y0uswyeOtnQTs-2zH199yK3ToUVHks5qwBYBgaJpZM4KL_Hh>
.

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev