<?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: Prime API - how to get vlan list in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/prime-api-how-to-get-vlan-list/m-p/3943719#M2503</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;many thanks and you're right snmp is the proper approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again for helping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
    <pubDate>Sat, 19 Oct 2019 07:24:12 GMT</pubDate>
    <dc:creator>Chris P</dc:creator>
    <dc:date>2019-10-19T07:24:12Z</dc:date>
    <item>
      <title>Prime API - how to get vlan list</title>
      <link>https://community.cisco.com/t5/controllers/prime-api-how-to-get-vlan-list/m-p/3912145#M2501</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Does anyone know how to pull the list of vlan (layer2) configured on a device from the API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically what you get from GUI when you get to&lt;BR /&gt;&lt;SPAN class="xwtBreadcrumbText"&gt;Inventory&lt;/SPAN&gt;&lt;SPAN class="xwtBreadcrumbSeparator"&gt;&amp;nbsp;/&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xwtBreadcrumbText"&gt;Device Management&lt;/SPAN&gt;&lt;SPAN class="xwtBreadcrumbSeparator"&gt;&amp;nbsp;/&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xwtBreadcrumbText xwtBreadcrumbLast"&gt;Network Devices / Device Groups / All Devices / &amp;lt;device name&amp;gt;&amp;nbsp;&lt;BR /&gt;System &amp;gt; VLANs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="xwtBreadcrumbText xwtBreadcrumbLast"&gt;thank you&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="xwtNavBreadcrumbFavoriteContainer"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Aug 2019 08:42:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/prime-api-how-to-get-vlan-list/m-p/3912145#M2501</guid>
      <dc:creator>Chris P</dc:creator>
      <dc:date>2019-08-22T08:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Prime API - how to get vlan list</title>
      <link>https://community.cisco.com/t5/controllers/prime-api-how-to-get-vlan-list/m-p/3927491#M2502</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I do now know where or how from Cisco Prime API to get that information.&lt;/P&gt;&lt;P&gt;Not all information from the GUI is accessible or easily accessible in the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would do, if I couldn't find it, was to get the device list from Prime via its API, and then just SNMP-WALK each switch manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OID 1.3.6.1.4.1.9.9.46.1.3.1.1.4.1 should give you all the VLANs with its respective names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;iso.3.6.1.4.1.9.9.46.1.3.1.1.4.1.1 = STRING: "default"&lt;BR /&gt;iso.3.6.1.4.1.9.9.46.1.3.1.1.4.1.1002 = STRING: "fddi-default"&lt;BR /&gt;iso.3.6.1.4.1.9.9.46.1.3.1.1.4.1.1003 = STRING: "token-ring-default"&lt;BR /&gt;iso.3.6.1.4.1.9.9.46.1.3.1.1.4.1.1004 = STRING: "fddinet-default"&lt;BR /&gt;iso.3.6.1.4.1.9.9.46.1.3.1.1.4.1.1005 = STRING: "trnet-default"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then just do a split based on the OID, and you'll get the VLAN ID&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;oid, vlanId = "1.3.6.1.4.1.9.9.46.1.3.1.1.4.1.102".split('1.3.6.1.4.1.9.9.46.1.3.1.1.4.1.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want more example code, I can provide you with python and its necessary libraries.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 10:34:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/prime-api-how-to-get-vlan-list/m-p/3927491#M2502</guid>
      <dc:creator>henrikjohan</dc:creator>
      <dc:date>2019-09-20T10:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Prime API - how to get vlan list</title>
      <link>https://community.cisco.com/t5/controllers/prime-api-how-to-get-vlan-list/m-p/3943719#M2503</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;many thanks and you're right snmp is the proper approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again for helping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2019 07:24:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/prime-api-how-to-get-vlan-list/m-p/3943719#M2503</guid>
      <dc:creator>Chris P</dc:creator>
      <dc:date>2019-10-19T07:24:12Z</dc:date>
    </item>
  </channel>
</rss>

