<?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: PYTHON - get_network_traffic_shaping - HTTP response not OK. in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432555#M5256</link>
    <description>&lt;P&gt;Hey &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/38480"&gt;@cgarrido&lt;/A&gt; !&lt;/P&gt;&lt;P&gt;Similar to what &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/340"&gt;@Philip D'Ath&lt;/A&gt; said.&lt;/P&gt;&lt;P&gt;I chucked your code in to an environment to test, and it works fine for me.&lt;/P&gt;&lt;P&gt;It's more likely to be an issue with your key, rather than your network ID (but check both).&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
    <pubDate>Mon, 09 Mar 2020 10:53:24 GMT</pubDate>
    <dc:creator>John_Chandler</dc:creator>
    <dc:date>2020-03-09T10:53:24Z</dc:date>
    <item>
      <title>PYTHON - get_network_traffic_shaping - HTTP response not OK.</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432553#M5254</link>
      <description>&lt;P&gt;I'm trying to use get_network_traffic_shaping, however whenever I call the function I'm getting a "HTTP response not OK."&lt;/P&gt;&lt;PRE&gt;#! /usr/bin/env python3&lt;/PRE&gt;&lt;PRE&gt;from meraki_sdk.meraki_sdk_client import MerakiSdkClient&lt;BR /&gt;from meraki_sdk.exceptions.api_exception import APIException&lt;/PRE&gt;&lt;PRE&gt;def init():&lt;BR /&gt;    x_cisco_meraki_api_key = 'REDACTED'&lt;BR /&gt;    meraki = MerakiSdkClient(x_cisco_meraki_api_key)&lt;BR /&gt;    return meraki&lt;/PRE&gt;&lt;PRE&gt;def trafficShaping(meraki, network_id):&lt;BR /&gt;    traffic_shaping_controller = meraki.traffic_shaping&lt;BR /&gt;    try:&lt;BR /&gt;        result = traffic_shaping_controller.get_network_traffic_shaping(network_id)&lt;BR /&gt;        return result&lt;BR /&gt;    except APIException as e:&lt;BR /&gt;        print(e)&lt;/PRE&gt;&lt;PRE&gt;if __name__ == '__main__':&lt;BR /&gt;    try:&lt;BR /&gt;        meraki = init()&lt;BR /&gt;        test_shaping = trafficShaping(meraki, 'NETWORK_ID')&lt;BR /&gt;        print(test_shaping)&lt;BR /&gt;    except KeyboardInterrupt:&lt;BR /&gt;        print('Program terminated.') &lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 20:41:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432553#M5254</guid>
      <dc:creator>cgarrido</dc:creator>
      <dc:date>2020-03-06T20:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: PYTHON - get_network_traffic_shaping - HTTP response not OK.</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432554#M5255</link>
      <description>&lt;P&gt;How confident are you that the "NETWORK_ID" that you are using is correct?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 06:31:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432554#M5255</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2020-03-08T06:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: PYTHON - get_network_traffic_shaping - HTTP response not OK.</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432555#M5256</link>
      <description>&lt;P&gt;Hey &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/38480"&gt;@cgarrido&lt;/A&gt; !&lt;/P&gt;&lt;P&gt;Similar to what &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/340"&gt;@Philip D'Ath&lt;/A&gt; said.&lt;/P&gt;&lt;P&gt;I chucked your code in to an environment to test, and it works fine for me.&lt;/P&gt;&lt;P&gt;It's more likely to be an issue with your key, rather than your network ID (but check both).&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 10:53:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432555#M5256</guid>
      <dc:creator>John_Chandler</dc:creator>
      <dc:date>2020-03-09T10:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: PYTHON - get_network_traffic_shaping - HTTP response not OK.</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432556#M5257</link>
      <description>&lt;P&gt;Thanks for the reply. I think I'v been able to figure it out. I was able to verify that the network_id was correct, however when I generated a log file I received the following:&lt;BR /&gt;&lt;BR /&gt;2020-03-09 08:56:12 meraki: ERROR &amp;gt; Traffic shaping, getNetworkTrafficShaping - 400 Bad Request, {'errors': ['Unsupported for networks bound to a template']}&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:01:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432556#M5257</guid>
      <dc:creator>cgarrido</dc:creator>
      <dc:date>2020-03-09T16:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: PYTHON - get_network_traffic_shaping - HTTP response not OK.</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432557#M5258</link>
      <description>&lt;P&gt;Similar to my other response it looks like the traffic_shaping call didn't work with a network I had bound to a template. Thank you for the response!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:02:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432557#M5258</guid>
      <dc:creator>cgarrido</dc:creator>
      <dc:date>2020-03-09T16:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: PYTHON - get_network_traffic_shaping - HTTP response not OK.</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432558#M5259</link>
      <description>&lt;P&gt;Two separate things here:&lt;BR /&gt;1. It looks like you moved over to the new &lt;A href="https://github.com/meraki/dashboard-api-python/" target="_blank" rel="noopener nofollow noreferrer"&gt;Python library&lt;/A&gt; since your original post (which in the source there uses the deprecated SDK), so that's good. This library is easier and more intuitive to use.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. Just like in dashboard UI, the "traffic shaping" page change significantly for a network that is bound to template, you cannot make the GET call here since the settings live on the parent template. If you change the network ID to be the configuration template's ID, you'll get back the traffic settings as dictated by the template.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 20:53:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-get-network-traffic-shaping-http-response-not-ok/m-p/5432558#M5259</guid>
      <dc:creator>Shiyue Cheng</dc:creator>
      <dc:date>2020-03-09T20:53:42Z</dc:date>
    </item>
  </channel>
</rss>

