<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Please tell me how to solve '429 - Too many requests'. in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452757#M8153</link>
    <description>&lt;P&gt;Are you sure something in your code, perhaps somewhere else, is not in a tight loop making repeated API calls in succession?&lt;/P&gt;&lt;P&gt;If you chance to using the Python SDK this issue is likely to go away.  Or at a minimum, you'll be able to enable a trace of the calls to see if you are making lots of calls close together.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jul 2021 21:01:36 GMT</pubDate>
    <dc:creator>Philip D'Ath</dc:creator>
    <dc:date>2021-07-21T21:01:36Z</dc:date>
    <item>
      <title>Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452750#M8146</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I was collecting client information periodically using 'Get Network Clients'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But suddenly, 'Too Many Requests' started to happen.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="too_many_requests.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262508i5153B6BFA6F38405/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I stopped all API calls and waited.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But it's been 3 hours and 'Too Many Requests' are still happening.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Even though there's only one API call.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What do I have to do to release that condition?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let me know if anyone knows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards Gwangjin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 08:25:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452750#M8146</guid>
      <dc:creator>gwangjin.park</dc:creator>
      <dc:date>2021-07-19T08:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452751#M8147</link>
      <description>&lt;P&gt;&lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/22774"&gt;@gwangjin.park&lt;/A&gt; : Check this document &lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api/#!rate-limit" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api/#!rate-limit&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 13:48:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452751#M8147</guid>
      <dc:creator>inderdeepsingh1</dc:creator>
      <dc:date>2021-07-19T13:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452752#M8148</link>
      <description>&lt;P&gt;This is what I use..&lt;/P&gt;&lt;P&gt;The hardcoded &lt;FONT face="courier new,courier"&gt;status_code = 201&lt;/FONT&gt;, is only declared for testing purposes and its just "faking" a succesful POST towards the API.. Remove it, and uncomment the actual &lt;FONT face="courier new,courier"&gt;request()&lt;/FONT&gt;.&lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;...
                 for _ in range(MAX_RETRIES):
                    try:
                        resp.status_code = 201
                        # r = requests.request(
                        #         'POST',
                        #         url,
                        #         headers = headers,
                        #         data = payload
                        # )
                        if resp.status_code == 201:
                            if index &amp;lt; len(p_sitelist)-1:
                                LOGGER.info(f"[ Create Networks ]: Network {site['Network']} created successfully! On to Next..")
                                #print(f"Network {site['Network']} created successfully! On to Next..\n")
                                break
                            else:
                                LOGGER.info(f"[ Create Networks ]: No more networks to create.")
                                #print("No more networks to create.")
                                return              
                        elif resp.status_code == 429:
                            LOGGER.warning(f'[ Create Networks ]: Rate limited - Retrying after {r.headers["Retry-After"]}.')
                            #print(f'Rate limited - Retrying after {resp.headers["Retry-After"]}.')
                            time.sleep(int(resp.headers['Retry-After']))
                            continue
                        else:
                            LOGGER.critical(f'[ Create Networks ]: Unexpected status code: {r.status_code} returned from server.\n Msg: {r.text}')
                            raise SystemExit(f'Unexpected status code: {r.status_code} returned from server.\n Msg: {r.text}')
                    except Exception as e:
                        LOGGER.error("[ Create Networks ]: Unknown error..")
                        LOGGER.exception(e)
                        #pprint(e)
                        return ""&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:31:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452752#M8148</guid>
      <dc:creator>Rasmus Hoffmann Birkelund</dc:creator>
      <dc:date>2021-07-19T14:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452753#M8149</link>
      <description>&lt;P&gt;Note that if you use the Python SDK it automatically retries on a 429 for you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/" target="_self" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 20:14:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452753#M8149</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2021-07-19T20:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452754#M8150</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I found out something new during the test.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;In the company&lt;/STRONG&gt;, "Too Many Requests" occurs when the Meraki Dashboard API is called.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="429.png" style="width: 997px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262513i6049CF6B347C0C4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But it's normal(status code : 200) to call the same API &lt;STRONG&gt;at home&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="success.png" style="width: 998px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262515i8ABA7F3E1D9DE316/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think it's a restriction by IP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please let me know if you know what to do.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;* PS : We can't change the company's IP.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 01:51:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452754#M8150</guid>
      <dc:creator>gwangjin.park</dc:creator>
      <dc:date>2021-07-20T01:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452755#M8151</link>
      <description>&lt;P&gt;There is a concurrency limit of&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;10 concurrent requests per IP&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;It sounds like you are not the only one who is calling the same Meraki organization probably with a automation script. &lt;/P&gt;&lt;P&gt;Try to use the below endpoints to investigate.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Use 'getOrganizationApiRequestsOverview' to get an overview of API summary during a given timespan. Here is an example.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"responseCodeCounts"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"200"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;50000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"201"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;4000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"204"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"400"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;3500&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"404"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1500&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"429"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;10000&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Use '&lt;SPAN&gt;getOrganizationApiRequests' to analyze details on what are those API calls, who is calling them from which IP.  Below is an example of the output. You might need to create a script to analyze the output as there are tens of thousands of items in case of API being misused.&lt;/SPAN&g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lt;SPAN&gt;"2019-02-20T17:31:23Z"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"responseCode"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"sourceIp"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"123.123.123.1"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Once you identify the suspect admin ID, use '&lt;SPAN&gt;getOrganizationAdmins&lt;/SPAN&gt;' to get the email identity.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 12:46:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452755#M8151</guid>
      <dc:creator>xiaoyhu</dc:creator>
      <dc:date>2021-07-20T12:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452756#M8152</link>
      <description>&lt;P&gt;ShawnHu, &lt;SPAN&gt;thank you for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;First of all, I have something to say for sure.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;  1) &lt;STRONG&gt;No one&lt;/STRONG&gt; calls the Meraki Dashboard API.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;  2) '429 - Too many requests' only occur &lt;STRONG&gt;in the company&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Two days later, '429 - Too Many Requests' are still occurring.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I solve this problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Again, no one is calling the Meraki Dashboard API.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards Gwangjin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 06:46:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452756#M8152</guid>
      <dc:creator>gwangjin.park</dc:creator>
      <dc:date>2021-07-21T06:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452757#M8153</link>
      <description>&lt;P&gt;Are you sure something in your code, perhaps somewhere else, is not in a tight loop making repeated API calls in succession?&lt;/P&gt;&lt;P&gt;If you chance to using the Python SDK this issue is likely to go away.  Or at a minimum, you'll be able to enable a trace of the calls to see if you are making lots of calls close together.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 21:01:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452757#M8153</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2021-07-21T21:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452758#M8154</link>
      <description>&lt;P&gt;&lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/45238"&gt;@John-on-API&lt;/A&gt; , another one.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 22:14:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452758#M8154</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2021-07-21T22:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Please tell me how to solve '429 - Too many requests'.</title>
      <link>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452759#M8155</link>
      <description>&lt;P&gt;I'd check your actual API usage. How many other users (or applications) have API keys? You have to share the budget with those other folks in the same org. Even if your usage hasn't changed, there are likely others using API more, thus competing with your usage.&lt;/P&gt;&lt;P&gt;In the API docs, check Organizations &amp;gt; Monitor &amp;gt; API Requests for the two endpoints that give you this info.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 22:21:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/please-tell-me-how-to-solve-429-too-many-requests/m-p/5452759#M8155</guid>
      <dc:creator>John-on-API</dc:creator>
      <dc:date>2021-07-21T22:21:58Z</dc:date>
    </item>
  </channel>
</rss>

