<?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: Code Response Comes Up in Browser, not so with Python Code in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443060#M6679</link>
    <description>&lt;P&gt;Thank you! I have the code here, below, too- as all the formatting was dropped. I was able to pull stats on connections, and I am comparing the code now. If anything I think I am missing parameters, something with a Rest call. My hunch... but maybe I don't have EA...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/jadexing/Merakicode/blob/main/WIP_noWorkCode" target="_blank" rel="nofollow noopener noreferrer"&gt;jadexing/Merakicode: Code for Meraki Wi-Fi (github.com)&lt;/A&gt;&lt;BR /&gt;Here's the code I was able to get working (with some others posted)&lt;BR /&gt;&lt;A href="https://github.com/jadexing/Merakicode/blob/main/LatencyStats" target="_blank" rel="nofollow noopener noreferrer"&gt;Merakicode/LatencyStats at main · jadexing/Merakicode (github.com)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2023 21:41:29 GMT</pubDate>
    <dc:creator>Jamiegprice15</dc:creator>
    <dc:date>2023-08-09T21:41:29Z</dc:date>
    <item>
      <title>Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443056#M6675</link>
      <description>&lt;P&gt;I am not a coder-Jedi, help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I run this code, I get this error (also tried with BASE_URL = '&lt;A href="https://api.meraki.com/api/v1/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1/&lt;/A&gt;'):&lt;BR /&gt;Http Error: 404 Client Error: Not Found for url: &lt;A href="https://api.meraki.com/api/v1/networks/N_1111111111111111/wireless/clients/healthScores" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1/networks/N_1111111111111111/wireless/clients/healthScores&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Why? - The data comes up in a web browser just fine.&lt;/P&gt;&lt;P&gt;&amp;amp; Thank you.&lt;/P&gt;&lt;P&gt;#Code here#&lt;/P&gt;&lt;P&gt;import requests&lt;/P&gt;&lt;P&gt;BASE_URL = '&lt;A href="https://n1234.meraki.com/api/v1/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://n1234.meraki.com/api/v1/&lt;/A&gt;'&lt;/P&gt;&lt;P&gt;def get_api_key():&lt;BR /&gt;return input("Enter your Meraki API key: ")&lt;/P&gt;&lt;P&gt;def get_organizations(api_key):&lt;BR /&gt;headers = {&lt;BR /&gt;'X-Cisco-Meraki-API-Key': api_key,&lt;BR /&gt;}&lt;BR /&gt;try:&lt;BR /&gt;response = requests.get(BASE_URL + 'organizations', headers=headers)&lt;BR /&gt;response.raise_for_status()&lt;BR /&gt;return response.json()&lt;BR /&gt;except requests.exceptions.RequestException as e:&lt;BR /&gt;print(f"Error occurred during API call: {e}")&lt;BR /&gt;return []&lt;/P&gt;&lt;P&gt;def display_organizations(organizations):&lt;BR /&gt;print("Organizations:")&lt;BR /&gt;for idx, org in enumerate(organizations, 1):&lt;BR /&gt;print(f"{idx}. {org['name']} (ID: {org['id']})")&lt;BR /&gt;print()&lt;/P&gt;&lt;P&gt;def get_networks(api_key, org_id):&lt;BR /&gt;headers = {&lt;BR /&gt;'X-Cisco-Meraki-API-Key': api_key,&lt;BR /&gt;}&lt;BR /&gt;try:&lt;BR /&gt;response = requests.get(BASE_URL + f'organizations/{org_id}/networks', headers=headers)&lt;BR /&gt;response.raise_for_status()&lt;BR /&gt;return response.json()&lt;BR /&gt;except requests.exceptions.RequestException as e:&lt;BR /&gt;print(f"Error occurred during API call: {e}")&lt;BR /&gt;return []&lt;/P&gt;&lt;P&gt;def display_networks(networks):&lt;BR /&gt;print("Networks:")&lt;BR /&gt;for idx, network in enumerate(networks, 1):&lt;BR /&gt;print(f"{idx}. {network['name']} (ID: {network['id']})")&lt;/P&gt;&lt;P&gt;def get_health_info(api_key, network_id):&lt;BR /&gt;headers = {&lt;BR /&gt;'X-Cisco-Meraki-API-Key': api_key,&lt;BR /&gt;'Content-Type': 'application/json', # Add Content-Type header&lt;BR /&gt;}&lt;BR /&gt;url = BASE_URL + f'networks/{network_id}/wireless/clients/healthScores'&lt;BR /&gt;response = requests.get(url, headers=headers)&lt;BR /&gt;response.raise_for_status()&lt;BR /&gt;return response.json()&lt;/P&gt;&lt;P&gt;def main():&lt;BR /&gt;api_key = get_api_key()&lt;BR /&gt;organizations = get_organizations(api_key)&lt;BR /&gt;&lt;BR /&gt;if organizations:&lt;BR /&gt;if len(organizations) == 1:&lt;BR /&gt;print(f"Only one organization available: {organizations[0]['name']} (ID: {organizations[0]['id']})")&lt;BR /&gt;selected_org_id = organizations[0]['id']&lt;BR /&gt;else:&lt;BR /&gt;display_organizations(organizations)&lt;BR /&gt;org_choice = int(input("Please enter the number of your organization: "))&lt;BR /&gt;selected_org_id = organizations[org_choice - 1]['id']&lt;/P&gt;&lt;P&gt;networks = get_networks(api_key, selected_org_id)&lt;BR /&gt;if networks:&lt;BR /&gt;display_networks(networks)&lt;BR /&gt;&lt;BR /&gt;network_choice = int(input("Please enter the number of the network you want to check clients for: "))&lt;BR /&gt;selected_network_id = networks[network_choice - 1]['id']&lt;BR /&gt;&lt;BR /&gt;health_info = get_health_info(api_key, selected_network_id)&lt;BR /&gt;print("Network Health Information:")&lt;BR /&gt;print(health_info)&lt;/P&gt;&lt;P&gt;if __name__ == "__main__":&lt;BR /&gt;main()&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 20:39:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443056#M6675</guid>
      <dc:creator>Jamiegprice15</dc:creator>
      <dc:date>2023-08-09T20:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443057#M6676</link>
      <description>&lt;P&gt;I'm not great with Python but when i attempt, i'm getting 404 on browser and postman, but I'm also not enrolled in EA. Are all of your networks enrolled in that? It could be something as simple as that. &lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 20:59:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443057#M6676</guid>
      <dc:creator>PatWruk</dc:creator>
      <dc:date>2023-08-09T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443058#M6677</link>
      <description>&lt;P&gt;Thank you for the response.&lt;BR /&gt;&lt;BR /&gt;EA, "Enterprise Agreement?" I think so, as we are licensed? I am able to do things like pull Networks, and the APs within networks in a nice little list. Just not getting anywhere with this pull. Or, when I do, the shell of the data is there- with MAC, but none of the score info. Thank you again for your thoughts.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 21:03:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443058#M6677</guid>
      <dc:creator>Jamiegprice15</dc:creator>
      <dc:date>2023-08-09T21:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443059#M6678</link>
      <description>&lt;P&gt;Sorry, I meant Early Access. Everything I find on documentation for that section is under the early access API &lt;A href="https://developer.cisco.com/meraki/api-latest/get-network-wireless-devices-health-scores/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-latest/get-network-wireless-devices-health-scores/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you follow the menu on the left up it shows under Early Access. I can try to test with your code tomorrow and see if i get the same response without being signed up for Early Access&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 21:37:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443059#M6678</guid>
      <dc:creator>PatWruk</dc:creator>
      <dc:date>2023-08-09T21:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443060#M6679</link>
      <description>&lt;P&gt;Thank you! I have the code here, below, too- as all the formatting was dropped. I was able to pull stats on connections, and I am comparing the code now. If anything I think I am missing parameters, something with a Rest call. My hunch... but maybe I don't have EA...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/jadexing/Merakicode/blob/main/WIP_noWorkCode" target="_blank" rel="nofollow noopener noreferrer"&gt;jadexing/Merakicode: Code for Meraki Wi-Fi (github.com)&lt;/A&gt;&lt;BR /&gt;Here's the code I was able to get working (with some others posted)&lt;BR /&gt;&lt;A href="https://github.com/jadexing/Merakicode/blob/main/LatencyStats" target="_blank" rel="nofollow noopener noreferrer"&gt;Merakicode/LatencyStats at main · jadexing/Merakicode (github.com)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 21:41:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443060#M6679</guid>
      <dc:creator>Jamiegprice15</dc:creator>
      <dc:date>2023-08-09T21:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443061#M6680</link>
      <description>&lt;P&gt;Thinking again, I was trying to crack this API before I saw anything posted on v3.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 21:42:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443061#M6680</guid>
      <dc:creator>Jamiegprice15</dc:creator>
      <dc:date>2023-08-09T21:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443062#M6681</link>
      <description>&lt;P&gt;Well arguing with myself. I can still pull this data up through a browser, just not into a terminal with code.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jamieinbox_0-1691618275181.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/263113iE25E637AEA4F62C9/image-size/large?v=v2&amp;amp;px=999" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Still this... Doesn't make sense...&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jamieinbox_1-1691618369796.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/263114i41199492050296F8/image-size/large?v=v2&amp;amp;px=999" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 22:01:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443062#M6681</guid>
      <dc:creator>Jamiegprice15</dc:creator>
      <dc:date>2023-08-09T22:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443063#M6682</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/40128"&gt;@Jamiegprice15&lt;/A&gt; , it sounds like there's a chance the API endpoint is part of the early access program. For more info we have a post in the sidebar at &lt;A href="https://community.meraki.com/t5/Developers-APIs/bd-p/api" target="_blank"&gt;https://community.meraki.com/t5/Developers-APIs/bd-p/api&lt;/A&gt; with full details on the Early API Access program and what it means.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 22:05:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443063#M6682</guid>
      <dc:creator>John-on-API</dc:creator>
      <dc:date>2023-08-09T22:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Code Response Comes Up in Browser, not so with Python Code</title>
      <link>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443064#M6683</link>
      <description>&lt;P&gt;Ah... I thought because I was in API v 1 I was safe, further drilling in per pic below, I see it- and now know the significance. Thanks for assistance, was super confused as it was coming up in the browser.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jamieinbox_0-1691619762906.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/263115iA23CD971FAEA3277/image-size/large?v=v2&amp;amp;px=999" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jamieinbox_1-1691619864656.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/263118i28A5E3A1E9BD7E95/image-size/large?v=v2&amp;amp;px=999" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 22:25:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/code-response-comes-up-in-browser-not-so-with-python-code/m-p/5443064#M6683</guid>
      <dc:creator>Jamiegprice15</dc:creator>
      <dc:date>2023-08-09T22:25:35Z</dc:date>
    </item>
  </channel>
</rss>

