<?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: Automating SSID roleout with a Meraki/python Script in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/automating-ssid-roleout-with-a-meraki-python-script/m-p/4739920#M8830</link>
    <description>&lt;P&gt;Hi Alex,&lt;BR /&gt;your solution Looks Very interesting, thank you Very much, Ill comeback to you with the results.&lt;/P&gt;&lt;P&gt;I found in the meantime another solution.&lt;/P&gt;&lt;P&gt;I’m using the below API and Postman.&lt;/P&gt;&lt;P&gt;"&lt;A href="https://n123.meraki.com/api/v1/networks/" target="_blank"&gt;https://n123.meraki.com/api/v1/networks/&lt;/A&gt;networkid/appliance/ssids/2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which Works very good and very straight forward.&lt;/P&gt;&lt;P&gt;I'm still looking forward to implementing your solution. I’m sure it will be handy in the near future&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Ishai&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 20:37:34 GMT</pubDate>
    <dc:creator>igonda</dc:creator>
    <dc:date>2022-12-15T20:37:34Z</dc:date>
    <item>
      <title>Automating SSID roleout with a Meraki/python Script</title>
      <link>https://community.cisco.com/t5/network-platform-api/automating-ssid-roleout-with-a-meraki-python-script/m-p/4736829#M8828</link>
      <description>&lt;P&gt;Hello&amp;nbsp;community,&lt;BR /&gt;I Need your assistance with a Meraki, Python issue,&lt;/P&gt;&lt;P&gt;I’m not a python specialist and I really wonder if the solution is really that simple with Python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let’s say I have 100 networks and I want to enable SSID interface Nr. 2 with a specific VLAN Nr. (The WLAN configuration is not the issue here).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the below python script to re&lt;FONT color="#000000"&gt;ad through a . txt or .CSV file a&lt;/FONT&gt;nd execute the command below for every network.&lt;/P&gt;&lt;P&gt;Networkid.txt&lt;BR /&gt;N_111111111111111111&lt;BR /&gt;N_111111111111111112&lt;BR /&gt;N_111111111111111113&lt;BR /&gt;N_111111111111111114&lt;BR /&gt;N_111111111111111115&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read a file with networkids, execute the Python - Request &amp;nbsp;“URL” with the variable Networkid and go for the&amp;nbsp; next Networkid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;url = "&lt;A href="https://api.meraki.com/api/v1/networks/" target="_blank" rel="noopener"&gt;https://api.meraki.com/api/v1/networks/&lt;/A&gt;{&lt;FONT color="#FF0000"&gt;networkId&lt;/FONT&gt;}/wireless/ssids/{number}"&lt;/P&gt;&lt;P&gt;url = "&lt;A href="https://n123.meraki.com/api/v1/networks/" target="_blank" rel="noopener"&gt;https://n123.meraki.com/api/v1/networks/&lt;/A&gt;&lt;FONT color="#FF0000"&gt;networkid&lt;/FONT&gt;/appliance/ssids/2"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-------This Script works fine for a single Network-----&lt;/P&gt;&lt;P&gt;import meraki&lt;BR /&gt;import requests&lt;BR /&gt;dashboard = meraki.DashboardAPI()&lt;/P&gt;&lt;P&gt;url = "&lt;A href="https://n123.meraki.com/api/v1/networks/N_111111111111111113/appliance/ssids/2" target="_blank" rel="noopener"&gt;https://n123.meraki.com/api/v1/networks/N_111111111111111113/appliance/ssids/2&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;payload = '''{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "number": 2,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name": "Test_3333",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "enabled": true,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "defaultVlanId": 777,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "authMode": "psk",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "psk": "xtesty2022",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "encryptionMode": "wpa",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "wpaEncryptionMode": "WPA2 only",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "visible": false&lt;/P&gt;&lt;P&gt;}'''&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;headers = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Content-Type": "application/json",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Accept": "application/json",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "X-Cisco-Meraki-API-Key": "xxabcc7ff12344bababababa333334444"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;response = requests.request('PUT', url, headers=headers, data = payload)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;print(response.text.encode('utf8'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;Ishai&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 08:42:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/automating-ssid-roleout-with-a-meraki-python-script/m-p/4736829#M8828</guid>
      <dc:creator>igonda</dc:creator>
      <dc:date>2022-12-12T08:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SSID roleout with a Meraki/python Script</title>
      <link>https://community.cisco.com/t5/network-platform-api/automating-ssid-roleout-with-a-meraki-python-script/m-p/4738913#M8829</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/41800"&gt;@igonda&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Cool stuff.&lt;/P&gt;
&lt;P&gt;The first thing I would do is import the network ids. I created a virtual environment and made two files in the same directory: one is 'network_ids.txt' and the other is 'meraki_script.py'&lt;/P&gt;
&lt;P&gt;I installed numpy and now I can import from the text file into my Python script.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexStevenson_1-1671031563130.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/171002iF3C9091A711C0302/image-size/large?v=v2&amp;amp;px=999" role="button" title="AlexStevenson_1-1671031563130.png" alt="AlexStevenson_1-1671031563130.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The same thing can be done with CSV, Excel file, etc. by changing it a little bit.&lt;/P&gt;
&lt;P&gt;I looped through every network id by stating 'for network in data', but you can substitute any word for 'network' and Python will know what you mean.&lt;/P&gt;
&lt;P&gt;Now, we can use an f-string to construct the URL based on our data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexStevenson_3-1671032293282.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/171005i10E6A3DFFDDDDDBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="AlexStevenson_3-1671032293282.png" alt="AlexStevenson_3-1671032293282.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I hope that helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 16:00:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/automating-ssid-roleout-with-a-meraki-python-script/m-p/4738913#M8829</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2022-12-14T16:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SSID roleout with a Meraki/python Script</title>
      <link>https://community.cisco.com/t5/network-platform-api/automating-ssid-roleout-with-a-meraki-python-script/m-p/4739920#M8830</link>
      <description>&lt;P&gt;Hi Alex,&lt;BR /&gt;your solution Looks Very interesting, thank you Very much, Ill comeback to you with the results.&lt;/P&gt;&lt;P&gt;I found in the meantime another solution.&lt;/P&gt;&lt;P&gt;I’m using the below API and Postman.&lt;/P&gt;&lt;P&gt;"&lt;A href="https://n123.meraki.com/api/v1/networks/" target="_blank"&gt;https://n123.meraki.com/api/v1/networks/&lt;/A&gt;networkid/appliance/ssids/2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which Works very good and very straight forward.&lt;/P&gt;&lt;P&gt;I'm still looking forward to implementing your solution. I’m sure it will be handy in the near future&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Ishai&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 20:37:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/automating-ssid-roleout-with-a-meraki-python-script/m-p/4739920#M8830</guid>
      <dc:creator>igonda</dc:creator>
      <dc:date>2022-12-15T20:37:34Z</dc:date>
    </item>
  </channel>
</rss>

