Bajaru
Posts: 0
Joined: Sat May 11, 2013 6:46 am

Where to enter the cURL?

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Where to enter the cURL?

Hello Brian!

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Where to enter the cURL?

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.

Bajaru
Posts: 0
Joined: Sat May 11, 2013 6:46 am

Where to enter the cURL?

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Where to enter the cURL?

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.

Return to “Issues”