<?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: Python meraki : Unable to claim network device in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/python-meraki-unable-to-claim-network-device/m-p/5436025#M5762</link>
    <description>&lt;P&gt;Are you setting the api_key?  I think the code you want looks something like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;meraki&lt;BR /&gt;api_key = &lt;SPAN&gt;"721e1notmyrealapikeyf72"&lt;BR /&gt;&lt;/SPAN&gt;dashboard = meraki.DashboardAPI(api_key)&lt;BR /&gt;&lt;BR /&gt;serialnums = [&lt;SPAN&gt;"XXXX-XXXX-XXXX"&lt;/SPAN&gt;]&lt;BR /&gt;networkid = &lt;SPAN&gt;"L_6notmynetworkid93483"&lt;BR /&gt;&lt;/SPAN&gt;claimdevice = dashboard.devices.claimNetworkDevices(networkid&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;serials&lt;/SPAN&gt;=serialnums&lt;SPAN&gt;,&lt;/SPAN&gt;)&lt;/PRE&gt;</description>
    <pubDate>Fri, 01 May 2020 21:12:04 GMT</pubDate>
    <dc:creator>nicburr</dc:creator>
    <dc:date>2020-05-01T21:12:04Z</dc:date>
    <item>
      <title>Python meraki : Unable to claim network device</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-meraki-unable-to-claim-network-device/m-p/5436024#M5761</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to claim a network device by using the Python API.&lt;/P&gt;&lt;P&gt;I am using the library "&lt;STRONG&gt;meraki 0.100.2&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;In this library, I am trying to use the method &lt;STRONG&gt;"claimNetworkDevices(self, networkId: str, **kwargs)&lt;/STRONG&gt;", but it doesn't work.&lt;/P&gt;&lt;P&gt;Here is my code : &lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;meraki&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;__name__ == &lt;SPAN&gt;"__main__"&lt;/SPAN&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;    dashboard = meraki.DashboardAPI()&lt;BR /&gt;    serial = [&lt;SPAN&gt;'****-****-****'&lt;/SPAN&gt;]&lt;BR /&gt;    network_id = &lt;SPAN&gt;"N_******************"&lt;BR /&gt;&lt;/SPAN&gt;    dashboard.devices.claimNetworkDevices(network_id&lt;SPAN&gt;,&lt;/SPAN&gt;serial)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt; I get this error :&lt;/P&gt;&lt;P&gt;dashboard.devices.claimNetworkDevices(network_id,serial)&lt;BR /&gt;TypeError: claimNetworkDevices() takes 2 positional arguments but 3 were given&lt;/P&gt;&lt;P&gt;I have tried by using different type of serial argument :&lt;/P&gt;&lt;PRE&gt;serial = {&lt;BR /&gt;    &lt;SPAN&gt;"serials"&lt;/SPAN&gt;: [&lt;BR /&gt;        &lt;SPAN&gt;"****-****-****"&lt;BR /&gt;&lt;/SPAN&gt;    ]&lt;BR /&gt;}&lt;BR /&gt;serial = "****-****-****'&lt;BR /&gt;serial = '****-****-****'&lt;/PRE&gt;&lt;P&gt;but I still have the same issue. I checked the method definition in "&lt;STRONG&gt;devices.py&lt;/STRONG&gt;", but I didn't help.&lt;/P&gt;&lt;P&gt;It works fine when I use POSTMAN with the same request.&lt;/P&gt;&lt;P&gt;What am I doing wrong ? Does anyone have the same issue ?&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 17:48:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-meraki-unable-to-claim-network-device/m-p/5436024#M5761</guid>
      <dc:creator>thibaut.matzke</dc:creator>
      <dc:date>2020-05-01T17:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python meraki : Unable to claim network device</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-meraki-unable-to-claim-network-device/m-p/5436025#M5762</link>
      <description>&lt;P&gt;Are you setting the api_key?  I think the code you want looks something like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;meraki&lt;BR /&gt;api_key = &lt;SPAN&gt;"721e1notmyrealapikeyf72"&lt;BR /&gt;&lt;/SPAN&gt;dashboard = meraki.DashboardAPI(api_key)&lt;BR /&gt;&lt;BR /&gt;serialnums = [&lt;SPAN&gt;"XXXX-XXXX-XXXX"&lt;/SPAN&gt;]&lt;BR /&gt;networkid = &lt;SPAN&gt;"L_6notmynetworkid93483"&lt;BR /&gt;&lt;/SPAN&gt;claimdevice = dashboard.devices.claimNetworkDevices(networkid&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;serials&lt;/SPAN&gt;=serialnums&lt;SPAN&gt;,&lt;/SPAN&gt;)&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 May 2020 21:12:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-meraki-unable-to-claim-network-device/m-p/5436025#M5762</guid>
      <dc:creator>nicburr</dc:creator>
      <dc:date>2020-05-01T21:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Python meraki : Unable to claim network device</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-meraki-unable-to-claim-network-device/m-p/5436026#M5763</link>
      <description>&lt;P&gt;Hello &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/4922"&gt;@nicburr&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;My api_key was already set in my environment variable.&lt;/P&gt;&lt;P&gt;I tried by using &lt;STRONG&gt;serials=serialnums&lt;/STRONG&gt;, and it perfectly worked !&lt;/P&gt;&lt;P&gt;I tried again without specifying &lt;STRONG&gt;serials&lt;/STRONG&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;, and it didn't work, so that was the thing I wasn't doing right&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 23:30:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-meraki-unable-to-claim-network-device/m-p/5436026#M5763</guid>
      <dc:creator>thibaut.matzke</dc:creator>
      <dc:date>2020-05-01T23:30:22Z</dc:date>
    </item>
  </channel>
</rss>

