Hee Priya,
yes it is possible with javascript action check out the following marketplace module that can help you:
https://marketplace.mendix.com/link/component/204760
Hope this helps
Good luck
Hello Priya,
Other option you can use is to check from nanoflow if the device has connection with a javascript call:
And, in case it's true (you have connection) you can call a microflow that can connect to the Rest service.
I hope this can help you.
Cheers.
Here an example in my own project just create a nanoflow and drag and drop one of the actions in your flow and then you can open the actions in your flow and edit the parametres