arduino / arduino-cloud-cli

GNU Affero General Public License v3.0
15 stars 4 forks source link

Arduino-cloud-cli issues too many requests per second and runs into rate-limit #126

Open Bodobolero opened 2 years ago

Bodobolero commented 2 years ago

When running the following command which creates a dashboard with 6 elements (3 static variables and 3 graphs)

arduino-cloud-cli dashboard create --name LoraWetterStation --template "LoraSample - Wetterstation DHT11 Pin 3-dashboard".json  --override LoraWetterStation=<my-secret-thing-id>

I get the following error with an "entry" plan:

429 Too Many Requests

the page https://www.arduino.cc/reference/en/iot/

indicates that "Arduino IoT APIs are rate limited, authenticated clients limit is up to 10req/s."

To be more user friendly the cli should have either a default to throttle API invocations to max n per second or a command option to specify how many API calls it can do per second.

I just learned that the "entry" plan is limited to 1 request per second. So it should be a configuration or command line option to specify the amount of API calls issued per second.