API rate limits

Comments

5 comments

  • Avatar
    Firewalla

    It is pretty rare that people hitting the 429, unless your API call is too frequent. (the API limit is not simple, so I can't really say, it is 100000 or 100 ... depend on the API)  May I know how often and API's are you calling? Do you do any type of throttling?

    0
    Comment actions Permalink
  • Avatar
    John Harrold

    I'm building a tool to visualize my flows using claude code. I asked it and this was the summary it produced:

    We call 4 documented endpoints, all GET, read-only, base https://<msp-domain>/v2:

    - Get Devices — GET /v2/devices
      - Polling, every 120 s → 30 calls/hour
    - Get Alarms — GET /v2/alarms?query=status:active&limit=25
      - Polling, every 120 s → 30 calls/hour
    - Get Flows (bandwidth sample) — GET /v2/flows?query=ts:<now-600>-<now>&groupBy=device&sortBy=total:desc&limit=60
      - Polling, every 120 s → 30 calls/hour
    - Get Flows (top talkers) — GET /v2/flows?query=ts:<now-3600>-<now>&groupBy=device&sortBy=total:desc&limit=60
      - Polling, every ~10 min → 6 calls/hour
    - Get Boxes — GET /v2/boxes
      - Polling, every ~10 min → 6 calls/hour
    - Get Flows (per-destination map) — GET /v2/flows?query=ts:<start>-<now>&groupBy=device&sortBy=total:desc&limit=60 and GET /v2/flows?query=ts:<start>-<now>&groupBy=device,destination&sortBy=total:desc&limit=400
      - On demand only, while a user has the Flows page open; response cached 180 s → up to ~40 calls/hour

    Per-endpoint totals (current):

    - /flows — ~36/hour idle, up to ~76/hour when the Flows page is open
    - /devices — 30/hour
    - /alarms — 30/hour
    - /boxes — 6/hour

    What we were doing when we hit HTTP 429 (now fixed):

    - /flows was running much hotter — bandwidth sample (30/hr) + top-talkers every 120 s instead of every 10 min (30/hr) + the per-destination map cached only 30 s against a 15 s UI auto-refresh (up to ~240/hr) = ~300 /flows calls/hour
    - The other endpoints were unchanged (~30/hr each)
    - This matches your note that limits are per-endpoint — we believe we tripped a low limit specific to /flows, not a global one

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    As it turns out, the overall rate limit is a lot more complex than just a number. may I know if the rate above is something claude told you or measured? 

    If you ask claude to reduce to 50%, will it be able to do that?

    Are you on the business plan or pro plan? the pro plan is shared container, and business is not

    0
    Comment actions Permalink
  • Avatar
    John Harrold

    Basically I just started getting 429 errors so the assumption is that I'm above a rate. Claude can tell me what the rate was, but it doesn't really have a way to know what the limit is, what the time window is to reset, etc. 

    Without some kind of defined limit (like x requests over an hour, y over a day, and z over a week for flows), it's hard to program around it. Am I just over the limit or am I way over the limit? Some clarity would be appreciated :). 

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    Are you using the professional MSP version? ($4/per month one?) If you are, it's likely the container limit has been reached. If this app is critical to you, switching to a business MSP may fix a few things. If you can wait, here is how to write better code to retry

    Reply from our developer:

    When the API returns 429 Too Many Requests, the client does not need to guess whether to wait an hour or a day. Please check the response headers.Use the Retry-After header first. It tells you how many seconds to wait before retrying. For example:

    Retry-After: 37
    0
    Comment actions Permalink

Please sign in to leave a comment.