Page 1 of 1

how to access my Appery.io table and get some info from where from my app

Posted: Sun Jun 08, 2014 11:45 pm
by B510

Dear All,

is there any article or tutorial that can help me to access my Appery.io table and get some info from where from my app?

could any body please help?

thanks


how to access my Appery.io table and get some info from where from my app

Posted: Sun Jun 08, 2014 11:53 pm
by B510

Dear All,

is there any article or tutorial that can help me to access my Appery.io table and get some info from my app?

could any body please help?


how to access my Appery.io table and get some info from where from my app

Posted: Sun Jun 08, 2014 11:59 pm
by Alena Prykhodko

Hello,

To retrieve data you can use Rest Service, please read this doc, it's very useful http://devcenter.appery.io/documentat...

What do you mean under Appery.io table?


how to access my Appery.io table and get some info from where from my app

Posted: Mon Jun 09, 2014 12:02 am
by Yurii Orishchuk

Hi Winanjaya.

If you want to access your Appery.io DB data from Appery.io app you can follow this tutorial:

http://devcenter.appery.io/tutorials/...

With this tutorial you can learn how to create new Appery.io DB, import DB services and use services.

Regards.


how to access my Appery.io table and get some info from where from my app

Posted: Mon Jun 09, 2014 12:18 am
by B510

I want to access Appery.io table (meant our mobile app's table) from my own application (desktop app).. my desktop app is Winform C#

is it possible?


how to access my Appery.io table and get some info from where from my app

Posted: Mon Jun 09, 2014 12:32 am
by B510

Let me clarify more detail of my goal:

I want to access MTWI_Photo table to get the image from external app (Desktop or Web app)

I am looking for example or article or tutorial for doing this..


how to access my Appery.io table and get some info from where from my app

Posted: Mon Jun 09, 2014 1:05 am
by Yurii Orishchuk

Winanjaya,

Yes you can access Appery.io DB from external app using Appery.io DB REST API.

Please read more about it here:

http://devcenter.appery.io/documentat...

Regards.


how to access my Appery.io table and get some info from where from my app

Posted: Mon Jun 09, 2014 7:51 am
by B510

do you have any example for doing this?


how to access my Appery.io table and get some info from where from my app

Posted: Mon Jun 09, 2014 3:45 pm
by B510

please ignore this.. it resolved .. I just want to share .. hopefully I can help someone

client.EndPoint = @"https://api.appery.io/rest/1/db/colle...";
client.Method = HttpVerb.GET;
client.ContentType = "application/json";
client.PostData = "";
var json = client.MakeRequest("put_your_id_here_or_leave_it_blank");

public string MakeRequest(string parameters)
{
var request = (HttpWebRequest)WebRequest.Create(EndPoint + parameters);
request.Headers.Add("X-Appery-Database-Id","put_your_database_id_here");
request.Method = Method.ToString();
request.ContentLength = 0;
request.ContentType = ContentType;
request.Accept = "/";
if (!string.IsNullOrEmpty(PostData) && Method == HttpVerb.POST)
{
var encoding = new UTF8Encoding();
var bytes = Encoding.GetEncoding("iso-8859-1").GetBytes(PostData);
request.ContentLength = bytes.Length;

Code: Select all

                 using (var writeStream = request.GetRequestStream()) 
                 { 
                     writeStream.Write(bytes, 0, bytes.Length); 
                 } 
             } 

             using (var response = (HttpWebResponse)request.GetResponse()) 
             { 
                 var responseValue = string.Empty; 

                 if (response.StatusCode != HttpStatusCode.OK) 
                 { 
                     var message = String.Format("Request failed. Received HTTP {0}", response.StatusCode); 
                     throw new ApplicationException(message); 
                 } 

                 // grab the response 
                 using (var responseStream = response.GetResponseStream()) 
                 { 
                     if (responseStream != null) 
                         using (var reader = new StreamReader(responseStream)) 
                         { 
                             responseValue = reader.ReadToEnd(); 
                         } 
                 } 

                 return responseValue; 
             } 
         } 

     } 

then use the HTMLBox if you want to display image ..

good luck :)


how to access my Appery.io table and get some info from where from my app

Posted: Mon Jun 09, 2014 3:54 pm
by Evgene Karachevtsev

Hello Winanjaya,

Thank you for the update. Let us know if you need any further help.