Server API endpoints are alive when?

I’m building an Anvil app which will receive JSON POST message from a web service. My app can only roughly predict when the message will arrive +/- 10 mins. So it will need to wait and listen for the message. Then send a JSON acknowledgment back.

Thus, my app has an endpoint allowing the external service to call a server function. I have registered this endpoint with the external service; so it knows where to find me. When the message arrives, my app will write to a Data Table.

I start my app by opening its main Form, as a web page, from a browser.

Does my app need to be “running" - or my browser stay in a session with my app - in order that my API server endpoint will respond to the external service request?

Or will my app start and respond whenever an API request arrives?

If this is in the docs, I missed it.

Your endpoint will respond whenever a request arrives (but it will have to load your server modules each time if you’re on a free plan).

There’s no need to keep a browser session open.

1 Like

So there might be some small delay while my server module loads?

As long as the sender receives an acknowledgement …and doesn’t time out.

I will ask the external service folks, if they expect an acknowledgement within a timeout limit.

My own app is not super time sensitive so that part is OK.

I am not on the free plan, so perhaps the issue is “solved” already.

Thanks,

= Will

On a paid plan, just make sure you have the server set to be persistent and you avoid that problem.