<?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: How to search devices using API in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/how-to-search-devices-using-api/m-p/3572077#M1725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also filter the results of, say, network-device:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://apic-em/api/v1/network-device?managementIpAddress=10.20.30" rel="nofollow" target="_blank"&gt;https://apic-em/api/v1/network-device?managementIpAddress=10.20.30&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Properties like hostname, serialNumber and managementIpAddress can be used as query args.&amp;nbsp; They will then do begins with searches.&amp;nbsp; You can use '%' as a wildcard character to do contains searches:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://apic-em/api/v1/network-device?managementIpAddress=10.20.30." title="https://apic-em/api/v1/network-device?managementIpAddress=10.20.30."&gt;https://apic-em/api/v1/network-device?managementIpAddress=%.20.%&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2016 16:00:14 GMT</pubDate>
    <dc:creator>Joe Clarke</dc:creator>
    <dc:date>2016-10-07T16:00:14Z</dc:date>
    <item>
      <title>How to search devices using API</title>
      <link>https://community.cisco.com/t5/controllers/how-to-search-devices-using-api/m-p/3572075#M1723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can devices or items be searched for using the APIC-EM API? In PI I use the contains("search_string") method in the URL but I can't find an equivalent in APIC-EM's API. I tried using "=@" and "*=" and the same as PI in case it was the same function but none work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I wanted to search/filter for any devices that start with the IP address "10.20.30.", how do I do that? Or if I wanted to search for part of a MAC address for example? Or maybe want to search for any network devices that have a hostname starting with "AU". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is this done using APIC-EM API? Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 12:31:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-search-devices-using-api/m-p/3572075#M1723</guid>
      <dc:creator>Bobby Stojceski</dc:creator>
      <dc:date>2019-03-01T12:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to search devices using API</title>
      <link>https://community.cisco.com/t5/controllers/how-to-search-devices-using-api/m-p/3572076#M1724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example you you like know the device with certain IP address you can use&lt;/P&gt;&lt;H3 style="font-size: 1.1em; color: #000000; font-family: 'Droid Sans', sans-serif; font-style: normal; text-align: left; text-indent: 0px;"&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;A class="toggleOperation" href="https://sandboxapic.cisco.com/swagger#!/network-device/getNetworkDeviceByIp" style="font-size: 13.86px; color: black; text-decoration: underline;"&gt;GET /network-device/ip-address/{ipAddress} API&lt;/A&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;This one is easier because there is an existing API, otherwise you can use &lt;/SPAN&gt;&lt;/P&gt;&lt;H3 style="font-size: 1.1em; color: #000000; font-family: 'Droid Sans', sans-serif; font-style: normal; text-align: left; text-indent: 0px;"&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;A class="toggleOperation" href="https://sandboxapic.cisco.com/swagger#%21/network-device/getNetworkDeviceByIp" style="font-size: 13.86px; color: black; text-decoration: underline;"&gt;GET /network-device &lt;BR /&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;to get all network devices then depends on the key you like to search, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;for example &lt;SPAN style="color: #000000; font-family: monospace; font-size: 11.34px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;"&lt;/SPAN&gt;&lt;SPAN class="attribute" style="font-size: 11.34px; color: #000000; font-family: monospace; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;serialNumber&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: 11.34px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;": &lt;/SPAN&gt;&lt;SPAN class="value" style="font-size: 11.34px; color: #000000; font-family: monospace; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;&lt;SPAN class="string" style="font-size: 11.34px; color: #880000;"&gt;"FGL1548S2YF"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: 11.34px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt; or &lt;SPAN style="color: #000000; font-family: monospace; font-size: 11.34px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;"&lt;/SPAN&gt;&lt;SPAN class="attribute" style="font-size: 11.34px; color: #000000; font-family: monospace; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;macAddress&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: 11.34px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;": &lt;/SPAN&gt;&lt;SPAN class="value" style="font-size: 11.34px; color: #000000; font-family: monospace; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;&lt;SPAN class="string" style="font-size: 11.34px; color: #880000;"&gt;"68:bc:0c:63:4a:b0"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: 11.34px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;,or &lt;SPAN style="color: #000000; font-family: monospace; font-size: 11.34px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt; "&lt;/SPAN&gt;&lt;SPAN class="attribute" style="font-size: 11.34px; color: #000000; font-family: monospace; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;hostname&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: 11.34px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;": &lt;/SPAN&gt;&lt;SPAN class="value" style="font-size: 11.34px; color: #000000; font-family: monospace; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; background-color: #fcf6db;"&gt;&lt;SPAN class="string" style="font-size: 11.34px; color: #880000;"&gt;"Branch-Router1"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-indent: 0px; text-align: left; color: #000000; font-style: normal; font-size: 11.34px; background-color: #fcf6db; font-family: monospace; font-weight: normal; padding: 0 0 0 10px;"&gt;you iterate the entire response from the GET query to find the device ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-indent: 0px; text-align: left; color: #000000; font-style: normal; font-size: 11.34px; background-color: #fcf6db; font-family: monospace; font-weight: normal; padding: 0 0 0 10px;"&gt;for the device then use &lt;/SPAN&gt;&lt;/P&gt;&lt;H3 style="font-size: 1.1em; color: #000000; font-family: 'Droid Sans', sans-serif; font-style: normal; text-align: left; text-indent: 0px;"&gt;&lt;SPAN class="http_method" style="font-size: 13.86px;"&gt;&lt;A class="toggleOperation" href="https://sandboxapic.cisco.com/swagger#!/network-device/getNetworkDeviceById" style="padding: 7px 0 4px; font-size: 0.7em; color: white; text-align: center; background-color: #0f6ab4;"&gt;GET&lt;/A&gt;&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;A class="toggleOperation" href="https://sandboxapic.cisco.com/swagger#!/network-device/getNetworkDeviceById" style="font-size: 13.86px; color: black; text-decoration: underline;"&gt;/network-device/{id}&lt;/A&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;to get the detail of that device &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;Maybe there is other way but wonder if this can serve your need ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-indent: 0px; text-align: left; color: #000000; font-style: normal; font-size: 11.34px; background-color: #fcf6db; font-family: monospace; font-weight: normal; padding: 0 0 0 10px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="path" style="padding: 0 0 0 10px; font-size: 13.86px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 15:53:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-search-devices-using-api/m-p/3572076#M1724</guid>
      <dc:creator>yawming</dc:creator>
      <dc:date>2016-10-07T15:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to search devices using API</title>
      <link>https://community.cisco.com/t5/controllers/how-to-search-devices-using-api/m-p/3572077#M1725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also filter the results of, say, network-device:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://apic-em/api/v1/network-device?managementIpAddress=10.20.30" rel="nofollow" target="_blank"&gt;https://apic-em/api/v1/network-device?managementIpAddress=10.20.30&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Properties like hostname, serialNumber and managementIpAddress can be used as query args.&amp;nbsp; They will then do begins with searches.&amp;nbsp; You can use '%' as a wildcard character to do contains searches:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://apic-em/api/v1/network-device?managementIpAddress=10.20.30." title="https://apic-em/api/v1/network-device?managementIpAddress=10.20.30."&gt;https://apic-em/api/v1/network-device?managementIpAddress=%.20.%&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 16:00:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-search-devices-using-api/m-p/3572077#M1725</guid>
      <dc:creator>Joe Clarke</dc:creator>
      <dc:date>2016-10-07T16:00:14Z</dc:date>
    </item>
  </channel>
</rss>

