Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
mandeeeps
New Contributor

429 Status code with message "Too many Request"

Hi all, 
I am calling the API of local users, license , interfaces etc . Getting response status - 429 with message "Too many requests" . 
How can it solve this.

2 REPLIES 2
atakannatak
Contributor II

Hi @mandeeeps ,

 

FortiGate’s REST API returns HTTP 429 “Too Many Requests” when a client exceeds the firewall’s built-in rate-limit. Typical default caps are ~100 GET/monitor calls per second and ~30 configuration writes per second. When you hit the limit the appliance blocks further queries from that source IP for a short sliding window and answers with like your mentioned.

 

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Ansible-too-many-attempts/ta-p/344330

 

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Administrative-lockout-durations-for-Forti...

 

https://docs.fortinet.com/document/fortigate/6.2.7/cookbook/631730/setting-the-administrator-passwor...

 

The limits are fixed in FortiOS and cannot be raised, so the remedies are to:

 

  • Throttle your script (sleep/back-off or cut request bursts).
  • Batch queries (ask once for the whole table instead of per-object loops).
  • Reuse one session/API key instead of many parallel logins.
  • Stagger multiple monitoring systems so their polls do not collide.

BR.

 

If my answer provided a solution for you, please mark the reply as solved it so that others can get it easily while searching for similar scenarios.

 

CCIE #68781

 

Atakan Atak
Atakan Atak
mandeeeps

Thank you @atakannatak , i tried with added time sleep, generated new api key with new resource ip but still getting the same 429 status code with message “Too Many Requests”.
Could you help on this what need to be do next.


- mandeeeps

Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors