Joni de Campos
Posts: 0
Joined: Fri Dec 11, 2015 12:21 pm

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

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

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

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...

Joni de Campos
Posts: 0
Joined: Fri Dec 11, 2015 12:21 pm

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

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

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

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)

Return to “Issues”