How do I handle "Resource temporarily unavailable" errors

I’m using Powershell to query the API. Normally, I’d do a do { invoke-webrequest… } while ($null -eq $logs), however that chews through my system calls rather fast. What is the best way to handle busy resources on the Argos end?

Hello Russ,
The netbiter uses a rate limiting system described here: Argos API Documentation

You can get the the current token count with the getlimitinfomattion call

Yes, I’m aware of the rate limits. If I don’t try redo the request when I get the “Resource temporarily unavailable” then I’m fine… but if I try until I get the result set, it eats up my tokens. I guess I’m unsure of why tokens are being used if I’m receiving a “Resource temporarily unavailable” on over half of my queries. In the graph below, you can see where I had it set to retry unsuccessful queries, and where I turned it back off. This is a graph of the system bucket tokens available for our account.

Hi Russ,

I misunderstood the initial questions i was thinking you were out of tokens with out realizing it.

For something like this you could delay when you get the error or implement an exponential back off.