Page 1 of 1

Create new Service REST Option not available in new account ??

Posted: Mon Oct 31, 2016 3:48 pm
by Joni de Campos

I am trying to create a new Service selecting REST Option in Service, but REST option is not appearing in the Create new Service Window anymore.

Project is a jquery project.

This is a new grandfathered account

I have another account where the rest option appears.

Image


Create new Service REST Option not available in new account ??

Posted: Mon Oct 31, 2016 7:10 pm
by Joni de Campos

Did I miss something?


Create new Service REST Option not available in new account ??

Posted: Mon Oct 31, 2016 8:02 pm
by Serhii Kulibaba

Hello Joni,

REST services are available only for old plans.

You can still easily invoke any external REST API using API Express or Server Code. Invoking APIs from the server has a number of security benefits and also allows you to make changes to the APIs without impacting the app. We have more information about security and benefits here: https://docs.appery.io/docs/apiintegr...


Create new Service REST Option not available in new account ??

Posted: Mon Oct 31, 2016 8:20 pm
by Joni de Campos

Hi Sergiy thanks for your fast reply.

So for new plans invoking API ( that are not database APIs) should be done as a server script and imported as a service ?

Is there a video or tutorial that can guide us?

Example. I have to test the notification registering service with the curl command:

curl -X POST \
-H "Content-Type: application/json" \
-H "X-Appery-App-Id: XXXXXXXXXXXXXXXXXXXXXX" \
-d '{"type":,"token":,"deviceID":, "" : }' \
https://api.appery.io/rest/push/reg

In this case should I use the callRestApiPost snippets or the createObject snippet ?

My understanding is that I should use the callRestApiPost since it provides the headers parameters as requested for the curl register device command.


Create new Service REST Option not available in new account ??

Posted: Tue Nov 01, 2016 6:26 pm
by Serhii Kulibaba

You are right, please use "callRestApiPost" for that.
"createObject" is used for the creation an object of the custom collection (all collections, instead of devices, users and files)