Re: REST API to upload file

2020-04-28 Thread K. Kamhamea
I cannot find a search function. Am Mi., 29. Apr. 2020 um 07:42 Uhr schrieb Maxim Solodovnik < solomax...@gmail.com>: > ML == mailing lists > https://openmeetings.apache.org/mailing-lists.html > > On Wed, 29 Apr 2020 at 12:41, K. Kamhamea wrote: > > > > Waht is " ML archives " ? > > > > Am Mi.,

Re: REST API to upload file

2020-04-28 Thread K. Kamhamea
This is headers and body of sending a one pixel transparent png image that triggers an 415 response. 'body': b'--668f009a1a08af558360542449ab33d1\r\nContent-Disposition: form-da' b'ta; name="file"\r\n\r\n{"ownerId": 12, "name": "spacer.png", "ro' b'omId": 50, "externalType": "

Re: REST API to upload file

2020-04-28 Thread Maxim Solodovnik
ML == mailing lists https://openmeetings.apache.org/mailing-lists.html On Wed, 29 Apr 2020 at 12:41, K. Kamhamea wrote: > > Waht is " ML archives " ? > > Am Mi., 29. Apr. 2020 um 03:47 Uhr schrieb Maxim Solodovnik > : >> >> On Tue, 28 Apr 2020 at 23:20, K. Kamhamea wrote: >> > >> > Does the fil

Re: REST API to upload file

2020-04-28 Thread K. Kamhamea
Waht is " ML archives " ? Am Mi., 29. Apr. 2020 um 03:47 Uhr schrieb Maxim Solodovnik < solomax...@gmail.com>: > On Tue, 28 Apr 2020 at 23:20, K. Kamhamea wrote: > > > > Does the file upload with moodle really work? I doubt so, as header and > body in my requests look almost the same no matter w

Re: REST API to upload file

2020-04-28 Thread Maxim Solodovnik
On Tue, 28 Apr 2020 at 23:20, K. Kamhamea wrote: > > Does the file upload with moodle really work? I doubt so, as header and body > in my requests look almost the same no matter which software I use to > generate it. Yes > > Is it possible that it depends on the content of the fileDTO? What fi

Re: REST API to upload file

2020-04-28 Thread K. Kamhamea
Does the file upload with moodle really work? I doubt so, as header and body in my requests look almost the same no matter which software I use to generate it. Is it possible that it depends on the content of the fileDTO? What fields are required in that structure. Also can I turn some debug on,

Re: REST API to upload file

2020-04-28 Thread Maxim Solodovnik
Please check sources for moodle plugin On Tue, Apr 28, 2020, 19:06 K. Kamhamea wrote: > Has anyone successfully used file upload with WebServices. I always get an > HTTP 415 error. > And of course I used headers > > 'Content-type': "multipart/form-data" > > > There is a discrepancy in the docume

Re: REST API parameter to load to Whiteboard

2020-03-06 Thread Maxim Solodovnik
Hello Daniel, there is no such API ATM On Fri, 6 Mar 2020 at 22:41, Daniel Baker wrote: > > Hi Maxim, > > > We got the rest API to load files to the room however we are not > sure what we have to configure to make it load to the whiteboard. It > currently loads to the file tree. > >

Re: REST API : Profile Picture URL

2017-08-15 Thread Jacob Ouanounou
OK. I'll re-install using MariaDB. I probably made a mistake during install. Thank you VERY MUCH, Maxim Le 15/08/2017 à 10:02, Maxim Solodovnik a écrit : AFAIK there is no chance to query Derby DB On Tue, Aug 15, 2017 at 3:01 PM, Jacob Ouanounou wrote: In persistence.xml I find this : wro

Re: REST API : Profile Picture URL

2017-08-15 Thread Maxim Solodovnik
AFAIK there is no chance to query Derby DB On Tue, Aug 15, 2017 at 3:01 PM, Jacob Ouanounou wrote: > In persistence.xml I find this : > > value="DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:open330;create=true, > ... > > which I assume means that I am using derby. > > How

Re: REST API : Profile Picture URL

2017-08-15 Thread Jacob Ouanounou
In persistence.xml I find this : value="DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:open330;create=true, ... which I assume means that I am using derby. How can I access and make a query on Derby ? Le 15/08/2017 à 05:23, Maxim Solodovnik a écrit : please find persis

Re: REST API : Profile Picture URL

2017-08-14 Thread Maxim Solodovnik
please find persistense.xml and check what DB driver is used On Mon, Aug 14, 2017 at 10:59 PM, Jacob Ouanounou wrote: > I thought that I had configured OM to use MariaDB, but the database is > empty. Would it mean that it uses Derby ? How can I check ? > > > Le 11/08/2017 à 14:53, Maxim Solodovni

Re: REST API : Profile Picture URL

2017-08-14 Thread Jacob Ouanounou
I thought that I had configured OM to use MariaDB, but the database is empty. Would it mean that it uses Derby ? How can I check ? Le 11/08/2017 à 14:53, Maxim Solodovnik a écrit : Everything seems to be ok (it is PHP not json, but code looks ok) What is in db? Om_user table for this user? WB

Re: REST API : Profile Picture URL

2017-08-11 Thread Maxim Solodovnik
Everything seems to be ok (it is PHP not json, but code looks ok) What is in db? Om_user table for this user? WBR, Maxim (from mobile, sorry for the typos) On Aug 11, 2017 14:46, "Jacob Ouanounou" wrote: > Here it is : (masked some fields with X's) > function connectToRoom($roomId,$options) > {

Re: REST API : Profile Picture URL

2017-08-11 Thread Jacob Ouanounou
Here it is : (masked some fields with X's) function connectToRoom($roomId,$options) { $OMConfig=array( "protocol" => "http", "host" => "X", "port" => "5080", "context" => "cursus", "user" =>XXX,

Re: REST API : Profile Picture URL

2017-08-11 Thread Maxim Solodovnik
I need JSON you are sending to be able to help you On Fri, Aug 11, 2017 at 2:18 PM, Jacob Ouanounou wrote: > Hi Maxim, > > I am still trying to solve this issue : I don't succeed to get the > profilePictureUrl set. > > In the doc, I see this field named either profilePictureUrl or > profilePictu

Re: REST API : Profile Picture URL

2017-08-11 Thread Jacob Ouanounou
Hi Maxim, I am still trying to solve this issue : I don't succeed to get the profilePictureUrl set. In the doc, I see this field named either profilePictureUrl or profilePictureUri When I set NONE of them I get a picture with a question mark, When I set profiePictureUrl, I get no picture a

Re: REST API : Profile Picture URL

2017-07-27 Thread Maxim Solodovnik
This array doesn't make sense :( could var_dump() it? so "real value" for $Photo will be printed On Thu, Jul 27, 2017 at 4:09 PM, Jacob Ouanounou wrote: > Thank you for your answer > > Here is my user array : > > $user=array( > "login" => "cursusA" >

Re: REST API : Profile Picture URL

2017-07-27 Thread Jacob Ouanounou
Thank you for your answer Here is my user array : $user=array( "login" => "cursusA" ,"username" => "Id:".$_SESSION['id'] , "firstname" => $_SESSION['prenom'] , "lastname" => $_SESSION['nom']

Re: REST API : Profile Picture URL

2017-07-27 Thread Maxim Solodovnik
Please do not write personal emails (use Reply All :)) OK let's do investigation together step-by-step you are calling services/user/hash REST function in API it is: http://openmeetings.apache.org/openmeetings-webservice/apidocs/org/apache/openmeetings/webservice/UserWebService.html#getRoomHash

Re: REST API : Profile Picture URL

2017-07-27 Thread Maxim Solodovnik
https://help.github.com/articles/about-pull-requests/ On Thu, Jul 27, 2017 at 3:05 PM, Jacob Ouanounou wrote: > What is PR ? > > Le 27/07/2017 à 10:04, Maxim Solodovnik a écrit : > > What description are you expecting to see? > > UserDTO doesn't have pictureUri, User has this field > > You can p

Re: REST API : Profile Picture URL

2017-07-27 Thread Maxim Solodovnik
What description are you expecting to see? UserDTO doesn't have pictureUri, User has this field You can propose PR with better JavaDoc :))) On Thu, Jul 27, 2017 at 3:01 PM, Jacob Ouanounou wrote: > In this page I see something called pictureUri. When I use that keyword, I > get a picture with

Re: REST API : Profile Picture URL

2017-07-27 Thread Jacob Ouanounou
In this page I see something called pictureUri. When I use that keyword, I get a picture with a question mark, the same as if I don't specify any photo for the user. But if I use the keyword "profilePictureUrl" , I get no picture for the user in the room. (I don't understand the structure of t

Re: REST API : Profile Picture URL

2017-07-27 Thread Maxim Solodovnik
You can check properties in API javadocs: http://openmeetings.apache.org/openmeetings-db/apidocs/org/apache/openmeetings/db/dto/user/UserDTO.html?is-external=true it seems pictureUri was dropped during migration could you please file JIRA, should be easy to fix On Thu, Jul 27, 2017 at 2:43 PM, Ja

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
FINE !!! GOT CONNECTION !!! Thank you Le 26/07/2017 à 17:49, Maxim Solodovnik a écrit : Try hash?secure=hash I guess this is the issue Check JS example page WBR, Maxim (from mobile, sorry for the typos) On Jul 26, 2017 22:27, "Jacob Ouanounou" > wrote: I use each

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Try hash?secure=hash I guess this is the issue Check JS example page WBR, Maxim (from mobile, sorry for the typos) On Jul 26, 2017 22:27, "Jacob Ouanounou" wrote: > I use each hash only on time > > Le 26/07/2017 à 17:00, Maxim Solodovnik a écrit : > > Hash is one time only > It is invalid after

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
I use each hash only on time Le 26/07/2017 à 17:00, Maxim Solodovnik a écrit : Hash is one time only It is invalid after browser refresh etc. WBR, Maxim (from mobile, sorry for the typos) On Jul 26, 2017 19:40, "Jacob Ouanounou" > wrote: Thanx, I have impleme

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Hash is one time only It is invalid after browser refresh etc. WBR, Maxim (from mobile, sorry for the typos) On Jul 26, 2017 19:40, "Jacob Ouanounou" wrote: > Thanx, > > I have implemented the as you kindly explained. > > I get a sessionId, then a hash ... everything seems OK. Ten I try to > co

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
I have checked a little bit more : The reason why I got connected when I used the service keyword swf rather than hash is that I had another window of the breowser that was already connected to OM. So I still have the problem : ahen I try to connect using the hash code provided by OM, I get

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
Thanx, I have implemented the as you kindly explained. I get a sessionId, then a hash ... everything seems OK. Ten I try to connect, using the $gateway->getUrl() ... When I use : http://35.157.227.184:5080/openmeetings/_*hash*_?secureHash=b68d0bc9-2537-4ad7-b3fb-b835a5311a5b&scopeRoomId=7&la

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Yes, It is already in a Wiki: https://github.com/openmeetings/openmeetings-api-plugin/wiki/1.-SOAP-REST-API-(in-PHP) it shows step-by-step how to: 1) create options: https://github.com/openmeetings/openmeetings-api-plugin/wiki/1.-SOAP-REST-API-(in-PHP)#create-config-array 2) perform login https:/

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
Thank you, Maxim. I had understood that everything was in OmGateway.php, but I still don't understand how to use it exactly. Do you have a sample php file that performs the sequence of calls : login -> hash -> Enter room ? What do you mean by "enhance wiki pages" ? Thanks Le 26/07/2017 à 12:

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
As and additiona/alternative documentation can be added to PHP files ... PRs are welcome :))) On Wed, Jul 26, 2017 at 5:37 PM, Maxim Solodovnik wrote: > Then check the code of https://github.com/openmeetings/openmeetings-api- > plugin/blob/master/src/main/scripts/OmGateway.php > and enhance Wiki

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Then check the code of https://github.com/openmeetings/openmeetings-api-plugin/blob/master/src/main/scripts/OmGateway.php and enhance Wiki pages :) On Wed, Jul 26, 2017 at 5:33 PM, Maxim Solodovnik wrote: > I believe you can start from here: https://github.com/ > openmeetings/openmeetings-api-pl

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
I believe you can start from here: https://github.com/openmeetings/openmeetings-api-plugin/wiki On Wed, Jul 26, 2017 at 5:27 PM, Jacob Ouanounou wrote: > I don't see which of the numerous files shows an example of connection to > OM classroom. > > I feel it would be easier to have the sequence o

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
I don't see which of the numerous files shows an example of connection to OM classroom. I feel it would be easier to have the sequence of calls, witha doc on the parameters and their structure. I suppose that $gateway contains attributes : user, pass, and url (?) ... what else ? The call t

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Have added user@ Examples can be found in our open source plugin for Moodle: https://github.com/openmeetings/openmeetings-moodle-plugin $gateway = new OmGateway(. config parameters as array here ); if ($gateway->login()) { $hash = $gateway->getSecureHash($gateway->getUser( param

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
For PHP I would recommend to use PHP API: https://github.com/openmeetings/openmeetings-api-plugin/tree/master/src/main/scripts On Wed, Jul 26, 2017 at 4:42 PM, Maxim Solodovnik wrote: > Could you please tell me how are you call the service? > > Example on http://openmeetings.apache.org/RestAPISa

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Could you please tell me how are you call the service? Example on http://openmeetings.apache.org/RestAPISample.html requires jquery, so it cannot be _just used_ To use REST you need client able to send GET/POST/etc. requests. Which one are you using? The error you are getting doesn't make sense :

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
Back to REST API : I succeed to get the SID, but when I try to get the hash, using excatly the code written there : http://openmeetings.apache.org/RestAPISample.html , with the sid I obtained, I get an error (in the console of the browser) : http://35.157.227.184:5080/openmeetings/services/u

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
THANK YOU MAXIM ! It works fine ... Le 26/07/2017 à 09:10, Maxim Solodovnik a écrit : you have to escape your password using JS escape function or urlescape written in any pther language On Wed, Jul 26, 2017 at 1:53 PM, Jacob Ouanounou wrote: Hi Maxim, I have found in the log file (in file

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
you have to escape your password using JS escape function or urlescape written in any pther language On Wed, Jul 26, 2017 at 1:53 PM, Jacob Ouanounou wrote: > Hi Maxim, > > I have found in the log file (in file : 0.0.0.0_access..2017-07-25.log) the > lines corresponding to my trials to connect. >

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
Hi Maxim, I have found in the log file (in file : 0.0.0.0_access..2017-07-25.log) the lines corresponding to my trials to connect. The request I did (URL) is reproduced without the special characters in the password. It seems logical, since GET mode alters the special characters. The problem

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
You can search it on your server :) it should be located in "log" folder under the folder you have unpacked openmeetings On Tue, Jul 25, 2017 at 7:11 PM, Jacob Ouanounou wrote: > In which directory is this file ? > > Le 25/07/2017 à 13:57, Maxim Solodovnik a écrit : > > is there anything suspici

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
In which directory is this file ? Le 25/07/2017 à 13:57, Maxim Solodovnik a écrit : is there anything suspicious in openmeetings.log file? On Tue, Jul 25, 2017 at 6:54 PM, Jacob Ouanounou > wrote: When I enter this directly on the browser, using the correct user

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
is there anything suspicious in openmeetings.log file? On Tue, Jul 25, 2017 at 6:54 PM, Jacob Ouanounou wrote: > When I enter this directly on the browser, using the correct user and pwd, > I get this > > {"serviceResult":{"code":-1,"message":"Login failed","type":"ERROR"}} > > > Le 25/07/2017 à

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
When I enter this directly on the browser, using the correct user and pwd, I get this {"serviceResult":{"code":-1,"message":"Login failed","type":"ERROR"}} Le 25/07/2017 à 13:47, Maxim Solodovnik a écrit : to login and get SID you can just type in your browser: http://35.157.227.184:5080/open

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
to login and get SID you can just type in your browser: http://35.157.227.184:5080/openmeetings/services/user/login?user=XXX&; pass=XXX Here is the link to PHP API (seems to work, just have tested with Moodle) https://github.com/openmeetings/openmeetings-api-plugin Here is the link to Java Unit t

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
Can you please send me your code, si that I could see a code that works and get inspired ... Le 25/07/2017 à 13:33, Maxim Solodovnik a écrit : just have tested on demo server, works as expected how are you using the service? On Tue, Jul 25, 2017 at 6:28 PM, Jacob Ouanounou

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
In a script, java inserted these lines $.ajax({ method: "GET", url: "http://35.157.227.184:5080/openmeetings/services/user/login";, data: {user: 'XXX', pass: 'XXX'}, dataType: "json" }); Le 25/07/2017 à 13:33, Maxim Solodovnik a écrit : just have tested on demo server, works as expec

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
just have tested on demo server, works as expected how are you using the service? On Tue, Jul 25, 2017 at 6:28 PM, Jacob Ouanounou wrote: > I have followed the first example, and I get this error : > (services/user/login) > > No 'Access-Control-Allow-Origin' header is present on the requested >

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
I have followed the first example, and I get this error : (services/user/login) No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. Le 25/07/2017 à 12:24, Maxim Solodovnik a écrit : Yes, API was changed please check t

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
Yes, API was changed please check the example I believe it is cleaner now :) On Tue, Jul 25, 2017 at 5:22 PM, Jacob Ouanounou wrote: > In a previous version, I started by using this link to do a session > request : > > http://:5080/openmeetings/services/UserService/getSession > > to initiate the

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
In a previous version, I started by using this link to do a session request : http://:5080/openmeetings/services/UserService/getSession to initiate the connection process Now I get this answer : http://schemas.xmlsoap.org/soap/envelope/";> soap:Server No binding operation info while invok

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
It is definitely possible :) Here is sample: http://openmeetings.apache.org/RestAPISample.html Here is the link to the API javadoc: http://openmeetings.apache.org/openmeetings-webservice/apidocs/index.html On Tue, Jul 25, 2017 at 4:57 PM, Jacob Ouanounou wrote: > Hi, > > It seems that it is not

Re: REST API

2016-10-10 Thread Alessio Falsetti
Hi Maxim, thank you very much! I try this new improvement and let you know if everything is ok! ;) Alessio 2016-10-10 5:30 GMT+02:00 Maxim Solodovnik : > Hello Alessio, > > I believe this [1] commit might be interesting for you :) > I have added "createFile" method and basic test to prove it

Re: REST API

2016-10-09 Thread Maxim Solodovnik
Hello Alessio, I believe this [1] commit might be interesting for you :) I have added "createFile" method and basic test to prove it works :) [1] https://github.com/openmeetings/openmeetings-api-plugin/commit/51ccde85b71bc32b1e4c5074171822606606dfad On Thu, Sep 22, 2016 at 11:35 PM, Maxim Solod

Re: REST API

2016-09-22 Thread Maxim Solodovnik
Hello Alessio, I don't have time right now to implement it in PHP, maybe next week :(( Here is the example of how this method is currently used [1] [2], it's not PHP but you will get an idea RestCall is custom class [3] I'll try to improve PHP API, please ping me if I'll be too silent [1] https:

Re: REST API

2016-09-22 Thread Alessio Falsetti
Hi Maxim, I made many test, this is an example of what I tried to do: -- $restService = new OmRestService(); $path = "http://www.mysite.com/myfile.jpg";; $data = array("ownerId" => 2, "externalId" => 1000, "externalType" => "moodle", "roomId" => 12, "parentId" => 0

Re: REST API

2016-09-20 Thread Maxim Solodovnik
Current version of the Gateway is unable to work with files But there are lots of examples (for ex. here http://blog.derakkilgo.com/2009/06/07/send-a-file-via-post-with-curl-and-php/) how this can be implemented I can add it to the api https://github.com/openmeetings/openmeetings-api-plugin but unf

Re: REST API

2016-09-20 Thread Alessio Falsetti
Hello Hemant, thank you for your help! I had already seen this documentation, but there is still the problem of inserting files into the room. With the previous version of OM Gateway & APIs, I call this: $result = $restService->call($this->getRestUrl("FileService") . "importFile?SID=" . $this->se

RE: REST API

2016-09-19 Thread Coscend@OM
Hello Alessio, Guide and snippets: https://github.com/openmeetings/openmeetings-api-plugin/wiki Moodle plugin: http://openmeetings.apache.org/MoodlePlugin.html Thank you. Sincerely, Hemant K. Sabat Coscend Communications Solutions Web site: www.Coscend.com -