<?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: Bug with create organisation network API? Only works when a copy_from_network_id is specified. in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424582#M4058</link>
    <description>&lt;P&gt;The issue with parameter value of &lt;EM&gt;None&lt;/EM&gt; is one of multiple reasons why we are deprecating that&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="https://github.com/meraki/meraki-python-sdk" target="_blank" rel="noopener nofollow noreferrer"&gt;Python SDK&lt;/A&gt;, which is auto-generated by a third-party tool, with our&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="https://github.com/meraki/dashboard-api-python/" target="_blank" rel="noopener nofollow noreferrer"&gt;library/package&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;published in-house.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2020 22:54:38 GMT</pubDate>
    <dc:creator>Shiyue Cheng</dc:creator>
    <dc:date>2020-01-21T22:54:38Z</dc:date>
    <item>
      <title>Bug with create organisation network API? Only works when a copy_from_network_id is specified.</title>
      <link>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424577#M4053</link>
      <description>&lt;P&gt;I am having issues creating a new network when I don't include a "copy_from_network_id". I am using the following code that I got from the Meraki developer site and it works when I specify the "copy_from_network_id" and it doesn't when I don't specify it. &lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;collect &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; {}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;organization_id &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; 'my_org_id'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;collect[&lt;/SPAN&gt;&lt;SPAN&gt;'organization_id'&lt;/SPAN&gt;&lt;SPAN&gt;] &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; organization_id&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;create_organization_network &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; CreateOrganizationNetworkModel()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;create_organization_network.name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;'Long Island Office2'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;create_organization_network.mtype &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;'appliance switch wireless'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;create_organization_network.tags &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;' tag1 tag2 '&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;create_organization_network.time_zone &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;'America/Los_Angeles'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#create_organization_network.copy_from_network_id = 'network_id_to_copy'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;create_organization_network.disable_my_meraki_com &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;create_organization_network.disable_remote_status_page &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;collect[&lt;/SPAN&gt;&lt;SPAN&gt;'create_organization_network'&lt;/SPAN&gt;&lt;SPAN&gt;] &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; create_organization_network&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;result &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; meraki.networks.create_organization_network(collect)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I also had issues when I didn't specify the "disable_remote_status_page" field even though it says that is optional and the model defaults it to None.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Nov 2019 05:19:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424577#M4053</guid>
      <dc:creator>charlotte</dc:creator>
      <dc:date>2019-11-06T05:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with create organisation network API? Only works when a copy_from_network_id is specified.</title>
      <link>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424578#M4054</link>
      <description>&lt;P&gt;I can't speak to that code and what it is doing, but I am able to create a new network in an organization using the &lt;SPAN&gt;/organizations/{organizationId}/networks endpoint without specifying a network ID to copy from or a value for disableRemoteStatusPage. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The basics of this code is the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import requests&lt;BR /&gt;import json&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;header = {'X-Cisco-Meraki-API-Key': myAPIkey}&lt;BR /&gt;header.update({'Content-Type':'application/json'})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;orgId = '9876543210'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;url = '&lt;A href="https://api.meraki.com/api/v0/organizations/'+orgId+'/networks" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v0/organizations/'+orgId+'/networks&lt;/A&gt;'&lt;BR /&gt;payload = {'name':'Test Network','type':'appliance','timeZone':'US/Eastern'}&lt;BR /&gt;response = requests.request('POST', url, data=json.dumps(payload), headers=header)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This code returns a code of 201 and the network does get created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I had to guess what the problem is for the supplied code, I would say that create_organization_network.copy_from_network_id needs some kind of value. If you don't want to supply a network ID, try assigning a value of None to it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 19:15:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424578#M4054</guid>
      <dc:creator>CBurkhead</dc:creator>
      <dc:date>2019-11-06T19:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with create organisation network API? Only works when a copy_from_network_id is specified.</title>
      <link>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424579#M4055</link>
      <description>&lt;P&gt;Thanks for the reply, I might have to look into the sdk and see what API endpoint it is using. The model defaults the field to None when you don't enter a value which I assume should work but I will try some other options.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 23:30:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424579#M4055</guid>
      <dc:creator>charlotte</dc:creator>
      <dc:date>2019-11-10T23:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with create organisation network API? Only works when a copy_from_network_id is specified.</title>
      <link>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424580#M4056</link>
      <description>&lt;P&gt;Okay so I've done some more testing and there is something the API endpoint doesn't like about passing null (None) through as a value.&lt;/P&gt;&lt;P&gt;I removed the "copyFromNetworkId from the model all together and it worked and this is the data that was sent through to the endpoint.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{"disableMyMerakiCom": false, "disableRemoteStatusPage": false, "name": "Example Network 5", "tags": "", "timeZone": "Australia/Brisbane", "type": "appliance switch wireless"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I added it back in and this is the data sent to the endpoint which failed.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{"copyFromNetworkId": null, "disableMyMerakiCom": false, "disableRemoteStatusPage": false, "name": "Example Network 7", "tags": "", "timeZone": "Australia/Brisbane", "type": "appliance switch wireless"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And the reason the value is null is because the model sets all the values to None when it creates the class. So I guess the solution is to just not use the model. Is there anyone who knows anything more about how the models work and what I should be doing to get around this?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 00:36:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424580#M4056</guid>
      <dc:creator>charlotte</dc:creator>
      <dc:date>2019-11-11T00:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with create organisation network API? Only works when a copy_from_network_id is specified.</title>
      <link>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424581#M4057</link>
      <description>&lt;P&gt;Hi Charlotte,&lt;/P&gt;&lt;P&gt;I have just come across this issue. &lt;/P&gt;&lt;P&gt;Please could you provide a more in-depth analysis of how you fixed this issue? I have tried what you posted and am still having the issue!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 14:09:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424581#M4057</guid>
      <dc:creator>cdvmb</dc:creator>
      <dc:date>2020-01-21T14:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with create organisation network API? Only works when a copy_from_network_id is specified.</title>
      <link>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424582#M4058</link>
      <description>&lt;P&gt;The issue with parameter value of &lt;EM&gt;None&lt;/EM&gt; is one of multiple reasons why we are deprecating that&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="https://github.com/meraki/meraki-python-sdk" target="_blank" rel="noopener nofollow noreferrer"&gt;Python SDK&lt;/A&gt;, which is auto-generated by a third-party tool, with our&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="https://github.com/meraki/dashboard-api-python/" target="_blank" rel="noopener nofollow noreferrer"&gt;library/package&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;published in-house.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 22:54:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424582#M4058</guid>
      <dc:creator>Shiyue Cheng</dc:creator>
      <dc:date>2020-01-21T22:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with create organisation network API? Only works when a copy_from_network_id is specified.</title>
      <link>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424583#M4059</link>
      <description>&lt;P&gt;That's odd, our solution is still using an older version of the NodeJS SDK (1.1.0) and has recently started receiving the same error:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{ errorMessage: 'HTTP Response Not OK', errorCode: 400, errorResponse: `{"errors":["'copyFromNetworkId' must be a string"]}` }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;It appears to me that the API has recently changed it's behaviour in how it treats the presence (or in our case, absence) of this field. This violates the promise of backwards-compatible changes &lt;A href="https://developer.cisco.com/meraki/api/#/rest/guides/versioning" target="_self" rel="nofollow noopener noreferrer"&gt;documented here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Our previously working automation is broken ahead of our HQ rollout - can you please advise whether the API will be fixed to it's original behaviour?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 08:50:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/bug-with-create-organisation-network-api-only-works-when-a-copy/m-p/5424583#M4059</guid>
      <dc:creator>bly1</dc:creator>
      <dc:date>2020-01-23T08:50:23Z</dc:date>
    </item>
  </channel>
</rss>

