I have a Ps code below which I am trying to adapt for a specific scenario, its an asynchronous API REST call, which gets called and could take some time to complete, the cal