Can the datatable read URL be used to ping a server?


Hi guys,

I’m building an enterprise app and the design features an icon showing the status of the server (online / offline).

I wanted to use a ping to check the status of the server. Do I have to create an Json endpoint for that or does the data table read allow me to do it in an easier way?


inquiring minds would like to know


You need some json endpoint because DataTableReadURL will fail if there’s no valid JSON returned.

With a valid JSON endpoint you can use ActionSucceeded/Failed to know if the server responded with valid.

The best approach is to read some useful data at the same time to minimize the number of requests. Usually there’s some global states that you want to show, like the user name, server name/id/location, server time, some global KPIs. Reading that and updating the server’s state then is going to be the most reliable way. Also because ideally you want to make sure your JSON endpoints work, there’s no point doing a ping on your .com if your services are actually not working, a dumb ping is generally not enough to ensure that your endpoints are in working order.


Noted, thanks for the sustainability tips :smiley: