Hope this helps!
If you call this integration from a microflow button on a page you can set a blocking progress bar in the microflow settings, it will just show a progress bar until the microflow has finished.
The problem with answers from Johan and Glenn is that I want the progress bar to be on the page, not as a overlay on top off the page.
I have added an idea to the community to implement this in the pogress bar widget.
Please give it a vote if you like the idea: https://forum.mendix.com/link/ideas/3474
One way to do this can be to have a progress bar in the page. You can program the progress to behave like an indeterminate bar by setting the values to 0 initially and increment that to 100 while the rest call is in progress and repeat this as long as the api call response is not received.