Page 1 of 1

REST Service From Javascript to Insert a record

Posted: Mon Oct 14, 2013 10:41 am
by Pete Nellmapius

I know how to get data from the service's success event but how do I insert a record into an appery.io DB collection?
If I have a collection "Table1" with 2 fields
'Field1" datatype Number
'Field2" datatype Text
SQL Equivalent would be:
INSERT INTO Table1 ( Field1, Field2 ) VALUES (14, 'Some Text');


REST Service From Javascript to Insert a record

Posted: Mon Oct 14, 2013 1:36 pm
by Kateryna Grynko

Hi Pete,

http://docs.appery.io/documentation/b...

You should send the following object:
code{
"Field1":"14",
"Field2":"Some Text"
}/code


REST Service From Javascript to Insert a record

Posted: Mon Oct 14, 2013 3:43 pm
by Pete Nellmapius

Would that then be:
restCreateService1.execute( {"Field1":"14","Field2":"Some Text"} );
I'll try that out.
Thanks for the prompt response.