I want to first check if the Rest api is online or offline before actually submitting the form to the same. How can I do that using javascript in Forms Designer?
This is something you'll need to setup yourself. The NET.HTTP object provides functionality for making raw HTTP Requests. It's a matter of setting the request parameters to match the Rest API.