Page 1 of 1

Where to enter the cURL?

Posted: Sun Jun 16, 2013 3:59 pm
by Bajaru

I thought I might add a few fields to the built-in 'User' table, such as a name. If I wanted to get the data, the hint says:
curl -X GET \
-H "X-Appery-Database-Id: 5175f360e4b044a47ce22ab8" \
-H "X-Appery-Session-Token: " \
https://api.appery.io/rest/1/db/users/

In Appery, I see where the URL goes, but what do I with the other 3 lines? I've read the Bankend Services Database doc ( http://docs.appery.io/documentation/b... ), but that doesn't seem to say what to do with the other lines either.

-thanks


Where to enter the cURL?

Posted: Sun Jun 16, 2013 5:34 pm
by Alena Prykhodko

Hello Brian!

Go Backend Services - Open your Database - Tab Files.
These lines are already created.


Where to enter the cURL?

Posted: Mon Jun 17, 2013 2:49 am
by maxkatz

Just to add, a curl command is a simple way to test a REST service from a command line. You can search for "curl" to get examples how to run it. "curl" should be available on Mac and LInux but might need to be installed on Windows.

As Alena suggested, you can automatically generate REST services when connecting to Appeyr.io database.


Where to enter the cURL?

Posted: Mon Jun 17, 2013 12:02 pm
by Bajaru

Thanks for the replies. I'm getting close, but... Do I add it in Appery somewhere, such as the URL field in the Settings tab of a service?

-thx


Where to enter the cURL?

Posted: Mon Jun 17, 2013 1:02 pm
by Maryna Brodina

Hello! You can create service in builder with https://api.appery.io/rest/1/db/users/ service URL
X - means method (GET, POST, PUT, DELETE)
H - means header, so for example for X-Appery-Database-Id and X-Appery-Session-Token parameters you should check "header"

You can also automatically add services as shown in this tutorial http://docs.appery.io/tutorials/build...
Let us know if you still have any questions.