<?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: Get Switch and port ID When AP Down via API in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408503#M1608</link>
    <description>&lt;P&gt;You should probably use &lt;SPAN&gt;&lt;A href="https://api.meraki.com/api/v1/devices/:serial/lldpCdp" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1/devices/:serial/lldpCdp&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;) and build yourself a little inventory. I wouldn't expect AP moving from ports to ports on your switch.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Other than that I'm not sure there is any endpoint that would do what you expect. I might be wrong.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2024 01:28:11 GMT</pubDate>
    <dc:creator>Raphael_L</dc:creator>
    <dc:date>2024-02-28T01:28:11Z</dc:date>
    <item>
      <title>Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408502#M1607</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am after for an API that can tell me which switch and port an Access Point (AP) is connected to, even when the AP is offline. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This would allow me to automatically enable or disable ports to get the AP back online in most situations. Currently, I can only get the switch and port information via API when the AP is working.(&lt;SPAN&gt;&lt;A href="https://api.meraki.com/api/v1/devices/:serial/lldpCdp" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1/devices/:serial/lldpCdp&lt;/A&gt;&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone know of such an API, or is it possible to build one&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Netcomeng67&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 01:20:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408502#M1607</guid>
      <dc:creator>netcomeng</dc:creator>
      <dc:date>2024-02-28T01:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408503#M1608</link>
      <description>&lt;P&gt;You should probably use &lt;SPAN&gt;&lt;A href="https://api.meraki.com/api/v1/devices/:serial/lldpCdp" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1/devices/:serial/lldpCdp&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;) and build yourself a little inventory. I wouldn't expect AP moving from ports to ports on your switch.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Other than that I'm not sure there is any endpoint that would do what you expect. I might be wrong.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 01:28:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408503#M1608</guid>
      <dc:creator>Raphael_L</dc:creator>
      <dc:date>2024-02-28T01:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408504#M1609</link>
      <description>&lt;P&gt;Yes , AP won't be moved. Any documents or guide for how to build our own &lt;EM&gt;build yourself a little inventory&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 01:46:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408504#M1609</guid>
      <dc:creator>netcomeng</dc:creator>
      <dc:date>2024-02-28T01:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408505#M1610</link>
      <description>&lt;P&gt;You could store the data in a plain text file ( csv ? ). Read it every x hours and if the port status has changed or no cdp/lldp info present on that port , you could validate the status of the AP. &lt;/P&gt;&lt;P&gt;Those are just generic ideas.&lt;/P&gt;&lt;P&gt;Our friend &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/1069"&gt;@jscorb&lt;/A&gt; usually has some great ideas ! ( by usually I mean't all the time &lt;SPAN class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/SPAN&gt; )&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 01:49:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408505#M1610</guid>
      <dc:creator>Raphael_L</dc:creator>
      <dc:date>2024-02-28T01:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408506#M1611</link>
      <description>&lt;P&gt;Pretty much what &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/13291"&gt;@Raphletourn&lt;/A&gt; says.&lt;/P&gt;&lt;P&gt;The details depend on what will be running this, for instance in a unix/linux environment if your script to go and grab the current port-AP list writes to a text file p-ap-tmp and if the 'database' is the text file p-ap-master, both files same format, one switch-port-ap record per line, both sorted. It can be done more compactly, but this way is clearer to see...&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;your_lldpcdp_script |sort &amp;gt;p-ap-tmp&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;cat p-ap-tmp p-ap-master |sort -u &amp;gt;p-ap-new&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;mv p-ap-new p-ap-master&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Will keep p-ap-master updated with any additions, without losing records for APs that are no longer detected.&lt;/P&gt;&lt;P&gt;You could extend the shellscript to spit out a list of records for any missing APs...&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;comm -3 p-ap-master p-ap-tmp &amp;gt;p-ap-missing&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 10:03:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408506#M1611</guid>
      <dc:creator>sungod</dc:creator>
      <dc:date>2024-02-28T10:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408507#M1612</link>
      <description>&lt;P&gt;First lets take a step back.  You should not need to disable/re-enable a port to get an MR back online.  Something is fundamentally wrong if you have to do that.  You should solve that problem instead.&lt;/P&gt;&lt;P&gt;Back to your question - what about searching for all ports in the dashboard with an MR attached, tag those ports, and then extract all the ports based on the tag?&lt;/P&gt;&lt;P&gt;You could then use the below to get every switch port in your whole organisation (one API call!), and then programmatically filter by tag.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/get-organization-switch-ports-by-switch/" target="_self" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/get-organization-switch-ports-by-switch/&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 20:06:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408507#M1612</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2024-02-28T20:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408508#M1613</link>
      <description>&lt;P&gt;Thanks for your help! In our Meraki network, our Level 1 team often fixes issues on during power outages by disable/enable switch port. We wanted to automate this process.&lt;/P&gt;&lt;P&gt;I tried the API you suggested, but it doesn't give me the AP names, just a list &lt;/P&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;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"switch name"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"serial"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Serial number"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"mac"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Mac xx: xx: xx"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"network"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"id"&lt;/SPA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PAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"accessPolicyType"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Open"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;As an alternative, we could run a report and read it from an Excel file each time, but that wouldn't be very efficient for our large network.&lt;/P&gt;&lt;P&gt;Ideally, we'd have a fully automated system:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;When an AP goes down then&lt;/LI&gt;&lt;LI&gt;The system automatically finds the connected switch and port.&lt;/LI&gt;&lt;LI&gt;The system disables and then re-enables the port on the switch.&lt;/LI&gt;&lt;LI&gt;Finally, the system checks if the AP is back online.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I might not be explaining perfectly, but hopefully you understand what we're trying to achieve. Is it possible to build an API to do this?&lt;/P&gt;&lt;P&gt;Thank you &lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 00:38:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408508#M1613</guid>
      <dc:creator>netcomeng</dc:creator>
      <dc:date>2024-02-29T00:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408509#M1614</link>
      <description>&lt;P&gt;Is this something you are willing to spend PS dollars on or just trying to work your way through?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 00:47:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408509#M1614</guid>
      <dc:creator>matt_uc</dc:creator>
      <dc:date>2024-02-29T00:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408510#M1615</link>
      <description>&lt;P&gt;&lt;SPAN&gt;just trying to work through as not authorised &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 01:22:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408510#M1615</guid>
      <dc:creator>netcomeng</dc:creator>
      <dc:date>2024-02-29T01:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get Switch and port ID When AP Down via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408511#M1616</link>
      <description>&lt;P&gt;As &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/95836"&gt;@Phil91&lt;/A&gt; has mentioned, if you need to reboot the AP everytime you have a power outage in the network(s), you have something fundamentally wrong which perhaps you may want to solve urgently.&lt;/P&gt;&lt;P&gt;It's also quite a question on how you will do this.&lt;/P&gt;&lt;P&gt;How are you going to deploy some kind of monitoring on this? Checking if the APs replying to ping, or using API to check if APs are offline in a timely fashion, etc?&lt;/P&gt;&lt;P&gt;Anyway, given it's a rare case that we move around APs, to build a database on where the APs are connected to your switch, a simple way is just to download the information on the Meraki dashboard (Network -&amp;gt; Wireless -&amp;gt; Access Points) and make sure you have the "Ethernet 1 LLDP" column checked and then download it as csv.&lt;/P&gt;&lt;P&gt;Of course, you will then have to work on the column as it will give you "[switch name]/[port id]" by leveraging it to contain switch serial, for example, and maybe other information that you need (switch IP address, etc)&lt;/P&gt;&lt;P&gt;When you need to reboot your APs via API you can use &lt;A href="https://developer.cisco.com/meraki/api-v1/cycle-device-switch-ports/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/cycle-device-switch-ports/ &lt;/A&gt;based on the database that you have built.&lt;/P&gt;&lt;P&gt;Again, as mentioned previously, something is wrong if you have to do this everytime you have a power outage on the network.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 02:27:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/get-switch-and-port-id-when-ap-down-via-api/m-p/5408511#M1616</guid>
      <dc:creator>wellyhartanto</dc:creator>
      <dc:date>2024-02-29T02:27:09Z</dc:date>
    </item>
  </channel>
</rss>

