James Glaubiger
Posts: 0
Joined: Sun Nov 17, 2013 6:13 am

Can an Appery.io App expose REST methods for 3rd party services to pass info in?

I have an Appery.io app that connects to a 3rd Party REST API/Service.

The 3rd party service has the ability to send a message back to me when my job is completed (perhaps hours later)... is there a way for me to expose a REST method within my app that the external service can hit with the info I need so I can trigger the appropriate actions with Server Side scripting to update the database?

All the documentation seems to talk about connecting to external REST services, but I don't see anything documented that allows me to expose methods in Appery.io for external services to make use of. I am assuming the answer is no, but would love it if I am wrong since I need this functionality to avoid polling the external service constantly.

thanks in advance.

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

Can an Appery.io App expose REST methods for 3rd party services to pass info in?

Hello James,

I need to consult on this question, we'll update asap.

James Glaubiger
Posts: 0
Joined: Sun Nov 17, 2013 6:13 am

Can an Appery.io App expose REST methods for 3rd party services to pass info in?

I did a little testing and it appears that I can in fact call Server Code externally:

Create a Server Code script with the default sample javascript and save it.

GET or POST to

https://api.appery.io/rest/1/code/{GU...

I get HTTP 200 response with whatever I passed in.

This is interesting since it appears to allow public access which is fine for now. Is there a way to secure the inbound calls would be my next question? I do see there is a way to tie the Server Code script to a User database, but what I really need is application level security not user level security.

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

Can an Appery.io App expose REST methods for 3rd party services to pass info in?

A Server Code script that you create has a simple REST API that you can call from your app or from any where else. Are you asking if you can add security to the REST API? If that's your question, you can enable authentication by going to open the script, Settings, select database and check "Allow only authenticated users to call this script"

Return to “Issues”