Wait Time on Server Side Server Connect API

Hi there everyone,

I have an “API” on the server side, on which I’m using Google APIs
image
How do I link the second one to after the first one is done? There is no “done” event server side like client side (see below)
Or at least a Wait time between the two so the first one has time to finish? Same, no Wait on server side…

When I do the same on the client-side, the first is auto-load, and the second is not auto-load but triggered when the first one is done.

Thanks for the help :slight_smile:

All actions within a server API complete before moving to the next action.

Ok, glad to hear that actions within a server API complete before moving to the next action.
But does an API call wait for the response before going to the next action though?
Here are my tests:

  • Google API 1 to get Lat/Lng from a city name: returns data ok.
  • Google API 2 to get TimeZone from real number Lat/Lng: returns data ok
  • But Google API 2 to get TimeZone from the results passed from API 1 - empty
    That tells me that each step is indeed fired after the previous one is fired, but the data from 1 doesn’t have the time to come back to be used in 2. Looks like there is a need for a delay for the result to be available.

I mean I could do a: while {count to 100.000.000} in between, but is there a better way to wait for one API results to start the next? Again on the client side there is a “done” condition to start another step. Or a “Wait” step to give it some time. Why not on the SC side?

Yes

1 Like

Cool. Thank you everyone.
I rewrote the SC and it started working well, waiting for the data from one before being used correctly on the next.
This thread can be closed, thanks! :slight_smile: