Re: [Dev] Access DAS analytics tables through REST API
Hi Sinthuja, i got a clue from your words "For each scenarios you can see a sample request, and according to that you need to send the authentication headers with your request. You can first try with curl or any other REST API tools, and then try to incorporate with jaggery app" Thank you very much. i confirmed the data on the database using curl, it worked Now i will try that with jaggery. Thanks for giving a little explanation. Cheers! On Sat, Nov 21, 2015 at 7:48 PM, Sinthuja Ragendranwrote: > Hi Dinali, > > Please find the documentation [1] for interacting with the data which is > stored in DAL via REST api. For each scenarios you can see a sample > request, and according to that you need to send the authentication headers > with your request. You can first try with curl or any other REST API tools, > and then try to incorporate with jaggery app. > > [1] > https://docs.wso2.com/display/DAS300/Checking+if+a+Given+Table+Exists+via+REST+API > > Thanks, > Sinthuja. > > On Sat, Nov 21, 2015 at 7:10 AM, Dinali Dabarera wrote: > >> HI, >> >> I am new to DAS and REST API. >> >> I converted normal h2 databases in to mysql as follows, >> >> >> WSO2_ANALYTICS_EVENT_STORE_DB >> The datasource used for analytics record >> store >> >> >> jdbc:mysql://localhost:3306/Election >> root >> root >> >> com.mysql.jdbc.Driver >> 80 >> 6 >> SELECT 1 >> false >> 0 >> true >> >> 4000 >> >> >> >> >> My intention is to store persistent data which i got from SPARK queeries >> in to a mySQL databse/tables, so that i get retrieve them from outside >> jaggery server/juggeryApp. >> >> >> My work succeeded, I get data into databases. >> >> Now I tried to retrieve those data through a juggeryapp >> >> >> >> >> Below is a Jaggery print >> >> <% >> config = {}; >> var db = new Database("jdbc:mysql://localhost:3306/Election", >> "root", "root", config); >> var q1 =" SELECT * FROM ANX___7LgTGRXo_ "; >> var data= db.query(q1); >> print(data); >> >> >> %> >> >> >> >> >> >> I get data but they are not in the format that I can read. MyQSL tables >> created inside the Election database is unreadable. >> >> Database changed >> mysql> show tables; >> ++ >> | Tables_in_Election | >> ++ >> | ANX___7LgTGRXo_| >> | ANX___8GECxAtQ_| >> | ANX___8GIvT7Rc_| >> | ANX___8GMmoCp8_| >> ++ >> 4 rows in set (0.00 sec) >> >> >> >> I found out this is because they are using rest API, But I cant find a >> complete documentation to do what i want. >> >> >> I did this, >> >> >> >> >> Below is a Jaggery print >> >> <% >> >> >> var url = " https://localhost:9446/api/configs/das/tables;; >> >>var twitterJson = get(url); >> print(twitterJson); >> >> >> >> >> %> >> >> >> >> >> >> >> >> But it does not work! it gives Error 500 >> >> Can anyone give any suggestions! >> >> Thanks! >> >> Cheers! >> >> Dinali Rosemin >> University of Peradeniya (Computer Engineering) >> WSO2 Intern >> 077-0198933 >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Sinthuja Rajendran* > Associate Technical Lead > WSO2, Inc.:http://wso2.com > > Blog: http://sinthu-rajan.blogspot.com/ > Mobile: +94774273955 > > > -- Dinali Rosemin University of Peradeniya (Computer Engineering) WSO2 Intern 077-0198933 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Access DAS analytics tables through REST API
Hi Dinali, Please find the documentation [1] for interacting with the data which is stored in DAL via REST api. For each scenarios you can see a sample request, and according to that you need to send the authentication headers with your request. You can first try with curl or any other REST API tools, and then try to incorporate with jaggery app. [1] https://docs.wso2.com/display/DAS300/Checking+if+a+Given+Table+Exists+via+REST+API Thanks, Sinthuja. On Sat, Nov 21, 2015 at 7:10 AM, Dinali Dabarerawrote: > HI, > > I am new to DAS and REST API. > > I converted normal h2 databases in to mysql as follows, > > > WSO2_ANALYTICS_EVENT_STORE_DB > The datasource used for analytics record > store > > > jdbc:mysql://localhost:3306/Election > root > root > > com.mysql.jdbc.Driver > 80 > 6 > SELECT 1 > false > 0 > true > > 4000 > > > > > My intention is to store persistent data which i got from SPARK queeries > in to a mySQL databse/tables, so that i get retrieve them from outside > jaggery server/juggeryApp. > > > My work succeeded, I get data into databases. > > Now I tried to retrieve those data through a juggeryapp > > > > > Below is a Jaggery print > > <% > config = {}; > var db = new Database("jdbc:mysql://localhost:3306/Election", > "root", "root", config); > var q1 =" SELECT * FROM ANX___7LgTGRXo_ "; > var data= db.query(q1); > print(data); > > > %> > > > > > > I get data but they are not in the format that I can read. MyQSL tables > created inside the Election database is unreadable. > > Database changed > mysql> show tables; > ++ > | Tables_in_Election | > ++ > | ANX___7LgTGRXo_| > | ANX___8GECxAtQ_| > | ANX___8GIvT7Rc_| > | ANX___8GMmoCp8_| > ++ > 4 rows in set (0.00 sec) > > > > I found out this is because they are using rest API, But I cant find a > complete documentation to do what i want. > > > I did this, > > > > > Below is a Jaggery print > > <% > > > var url = " https://localhost:9446/api/configs/das/tables;; > >var twitterJson = get(url); > print(twitterJson); > > > > > %> > > > > > > > > But it does not work! it gives Error 500 > > Can anyone give any suggestions! > > Thanks! > > Cheers! > > Dinali Rosemin > University of Peradeniya (Computer Engineering) > WSO2 Intern > 077-0198933 > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Sinthuja Rajendran* Associate Technical Lead WSO2, Inc.:http://wso2.com Blog: http://sinthu-rajan.blogspot.com/ Mobile: +94774273955 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Access DAS analytics tables through REST API
HI, I am new to DAS and REST API. I converted normal h2 databases in to mysql as follows, WSO2_ANALYTICS_EVENT_STORE_DB The datasource used for analytics record store jdbc:mysql://localhost:3306/Election root root com.mysql.jdbc.Driver 80 6 SELECT 1 false 0 true 4000 My intention is to store persistent data which i got from SPARK queeries in to a mySQL databse/tables, so that i get retrieve them from outside jaggery server/juggeryApp. My work succeeded, I get data into databases. Now I tried to retrieve those data through a juggeryapp Below is a Jaggery print <% config = {}; var db = new Database("jdbc:mysql://localhost:3306/Election", "root", "root", config); var q1 =" SELECT * FROM ANX___7LgTGRXo_ "; var data= db.query(q1); print(data); %> I get data but they are not in the format that I can read. MyQSL tables created inside the Election database is unreadable. Database changed mysql> show tables; ++ | Tables_in_Election | ++ | ANX___7LgTGRXo_| | ANX___8GECxAtQ_| | ANX___8GIvT7Rc_| | ANX___8GMmoCp8_| ++ 4 rows in set (0.00 sec) I found out this is because they are using rest API, But I cant find a complete documentation to do what i want. I did this, Below is a Jaggery print <% var url = " https://localhost:9446/api/configs/das/tables;; var twitterJson = get(url); print(twitterJson); %> But it does not work! it gives Error 500 Can anyone give any suggestions! Thanks! Cheers! Dinali Rosemin University of Peradeniya (Computer Engineering) WSO2 Intern 077-0198933 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev