I am doing GET and PUT requests using an API key that supposedly is limited to 10 requests/min. Results fall short:
Request: 1 Time: 1s Code: 200
Request: 2 Time: 1s Code: 200
Request: 3 Time: 5s Code: 200
Request: 4 Time: 9s Code: 200
Request: 5 Time: 13s Code: 200
Request: 6 Time: 17s Code: 429
Start dump...
object(SimpleXMLElement)[8]
public 'httpCode' => string '429' (length=3)
public 'httpMessage' => string 'Too Many Requests' (length=17)
public 'message' => string 'Rate Limit Exceeded: Please decrease your request volume. To eliminate this message, keep your request rate below 0.5 requests per second. Clients that continue to receive this response may have their traffic throttled.' (length=219)
public 'errorClass' => string 'RateLimitedException' (length=20)
That's only 6 requests in 17 seconds. Originally I was making unmetered requests and delaying for 60 seconds upon receiving a 429 response, but that approach only yielded 2-3 requests per minute, so I added a 3 sec delay between requests. Adding a 6 sec. delay only gets 7 requests in 50sec.
First, what is the best strategy for eeking out our full 10 request/min allowance?
Second, what do I need to do to increase our allowance? 10/min is not practical for writing more than a few dozen records, and we need to do some bulk database maintenance. There are OAuth keys on our account that I cannot access and have no idea what they are used for that are limited to 400/min and 1000/min. If we never use those volumes, can they be allocated to the API key that we do use? Or can we get higher limit by using OAuth instead of our current API key?
Thanks,
Mark Kendall
In White LLC