This is why I have created API :)))
basic how-to is here:
https://github.com/openmeetings/openmeetings-api-plugin/wiki

code to create room:
https://github.com/openmeetings/openmeetings-api-plugin/blob/master/src/main/scripts/OmGateway.php#L116

On Sat, Aug 27, 2016 at 10:04 PM, Andre Wruszczak <[email protected]> wrote:

> Thank you very much – it definitely helped!
>
> Looking at the plugin, I managed to successfully call getRoomHash in order
> to log in to rooms.
>
> But right now I am creating rooms, whenever I want to login to one (with
> add – which causes several rooms with the same name).
> Instead I would prefer using the getExternal method in the RoomWebService
> – but I am not sure how to send the RoomDTO as a query parameter – I tried
> several ways and none worked so far. (I would get an internal server error
> like seen in the attachment (500 an error occurred while parsing the query
> filter ….))
>
>
>
> Would you mind sending me an example call to the getExternal Rest Endpoint?
> As far as I know there is no general way of accepting DTOs as a query
> parameter, especially when there are 2 ( for example this is definitely not
> the right way to call ?sid=sid&room=name=…) so I would highly appreciate an
> example in order to see how to send the sid and the room dto as query
> parameters.
>
>
>
> Thanks in advance!
>
>
>
> Cheers
>
> Andre
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Von:* Maxim Solodovnik [mailto:[email protected]]
> *Gesendet:* Friday, August 26, 2016 8:02 AM
> *An:* Openmeetings user-list <[email protected]>
> *Betreff:* Re: Cannot reproduce REST API example
>
>
>
> This is why I have created PHP API [1] :)))
>
> I guess you need to take a look at this [2] line
>
> It will not work if both params will be encoded
>
>
>
> [1] https://github.com/openmeetings/openmeetings-api-plugin
>
> [2] https://github.com/openmeetings/openmeetings-api-
> plugin/blob/master/src/main/scripts/OmGateway.php#L97
>
>
>
> On Fri, Aug 26, 2016 at 3:00 AM, Andre Wruszczak <[email protected]> wrote:
>
> Dear Openmeetings-Team!
> Thank you for submitting the REST API Sample on your homepage!
> I am currently struggling with reproducing the ajax call shown in the
> sample with php.
>
>
>
> My url is pretty much this = http://localhost:5080/
> openmeetings/services/user/hash?sid=SOMEVALIDSID
>
>
>
> I am preparing the data like this :
>
>   $user = array(
>
>             'firstname' => 'John',
>
>             'lastname' => 'Doe',
>
>             'externalId' => 'uid1',
>
>             'externalType' => 'myCMS',
>
>             'login' => 'superjohn');
>
>   $roomOptions = array(
>
>              'roomId' => 5,
>
>              'moderator' => true,
>
>              'showAudioVideoTest' => true);
>
>
>
>   $data = json_encode(array('user' => $user, 'options' => $roomOptions),
> JSON_FORCE_OBJECT);
>
>
>
> And curl it like this :
>
> $curl = curl_init();
>
>         curl_setopt_array($curl, [
>
>             CURLOPT_RETURNTRANSFER => 1,
>
>             CURLOPT_POST => 1,
>
>             CURLOPT_POSTFIELDS => $data,
>
>             CURLOPT_URL => $url,
>
>             CURLOPT_USERAGENT => 'Reproducing’,
>
>             CURLOPT_SSLVERSION => 3,
>
>             CURLOPT_SSL_VERIFYHOST => 0,
>
>             CURLOPT_SSL_VERIFYPEER => 0
>
>         ]);
>
>
>
> I tried it many times with different versions of the data etc. and I
> always get either (415 unsupported media type) or (500 Internal Server
> Error) without any (at least for me) helpful further informations.
>
> I have included one of the error.html.
>
>
>
> I would really appreciate some help at this stage. Maybe I should send the
> request with the “wadl” in the url?
>
>
>
> Thanks in advance,
>
>
>
> -Andre
>
>
>
>
>
>
>
>
>
> --
>
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax

Reply via email to