<?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 SM Device details API in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449079#M7642</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am calling the following SM API to get the list of SM devices with some filed details for example "&lt;SPAN&gt;isManaged&lt;/SPAN&gt;":&lt;/P&gt;&lt;DIV class="swagger-operation-top"&gt; &lt;/DIV&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;{{baseUrl}}/networks/:networkId/sm/devices?fields={{fields}}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P class="blackUrl"&gt; &lt;/P&gt;&lt;P class="blackUrl"&gt;&lt;SPAN class="resolvedVariable"&gt;&lt;SPAN&gt;But it's returning following error:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="blackUrl"&gt; &lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;PRE class="lia-code-sample language-javascript"&gt;&lt;CODE&gt;{
    "errors": [
        "'fields' must be an array"
    ]
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is there any specific payload/information need to provide?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="swagger-operation-main"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 12 Mar 2021 00:30:52 GMT</pubDate>
    <dc:creator>MohammadFakrulAlam14356</dc:creator>
    <dc:date>2021-03-12T00:30:52Z</dc:date>
    <item>
      <title>SM Device details API</title>
      <link>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449079#M7642</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am calling the following SM API to get the list of SM devices with some filed details for example "&lt;SPAN&gt;isManaged&lt;/SPAN&gt;":&lt;/P&gt;&lt;DIV class="swagger-operation-top"&gt; &lt;/DIV&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;{{baseUrl}}/networks/:networkId/sm/devices?fields={{fields}}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P class="blackUrl"&gt; &lt;/P&gt;&lt;P class="blackUrl"&gt;&lt;SPAN class="resolvedVariable"&gt;&lt;SPAN&gt;But it's returning following error:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="blackUrl"&gt; &lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;PRE class="lia-code-sample language-javascript"&gt;&lt;CODE&gt;{
    "errors": [
        "'fields' must be an array"
    ]
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is there any specific payload/information need to provide?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="swagger-operation-main"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 12 Mar 2021 00:30:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449079#M7642</guid>
      <dc:creator>MohammadFakrulAlam14356</dc:creator>
      <dc:date>2021-03-12T00:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: SM Device details API</title>
      <link>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449080#M7643</link>
      <description>&lt;P&gt;Here is the documentation for it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/#!get-network-sm-devices" target="_self" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/#!get-network-sm-devices&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Click "Template", "Python-Request" to get an example close to what you want.&lt;/P&gt;&lt;P&gt;It looks like the trick is to not specify the "fields" parameter at all if you don't want to list specific fields.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Mar 2021 18:18:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449080#M7643</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2021-03-14T18:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: SM Device details API</title>
      <link>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449081#M7644</link>
      <description>&lt;P&gt;When using arrays in a query string, add [] to the param name for each item.&lt;/P&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;{{baseUrl}}/networks/:networkId/sm/devices?fields[]=foo&amp;amp;fields[]=bar&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Mar 2021 08:37:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449081#M7644</guid>
      <dc:creator>DexterLabora</dc:creator>
      <dc:date>2021-03-15T08:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: SM Device details API</title>
      <link>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449082#M7645</link>
      <description>&lt;P&gt;Thanks &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/1450"&gt;@DexterLabora&lt;/A&gt;  for the tips.&lt;/P&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;import requests

fields_array = "fields[]=isManaged&amp;amp;fields[]=isSupervised"
network_ID = 'N_1234567890'

url = "https://api.meraki.com/api/v1/networks/{0}/sm/devices?{1}".format(network_ID, fields_array)

payload = None

headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Cisco-Meraki-API-Key": "9abcdefghijklmnopqrstuvzxyz"
}

response = requests.request('GET', url, headers=headers, data = payload)

print(response.text.encode('utf8'))&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Mar 2021 21:33:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/sm-device-details-api/m-p/5449082#M7645</guid>
      <dc:creator>MohammadFakrulAlam14356</dc:creator>
      <dc:date>2021-03-15T21:33:06Z</dc:date>
    </item>
  </channel>
</rss>

