<?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: Adding networks to existing templates via API in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400765#M551</link>
    <description>&lt;P&gt;Very much appreciative. Thank you both!&lt;/P&gt;</description>
    <pubDate>Mon, 15 Nov 2021 16:54:26 GMT</pubDate>
    <dc:creator>genesisjoec</dc:creator>
    <dc:date>2021-11-15T16:54:26Z</dc:date>
    <item>
      <title>Adding networks to existing templates via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400762#M548</link>
      <description>&lt;P&gt;I'm researching the best method to add hundreds of networks split between two templates within an organization. The networks already exist in the organization and just need to be sync'd to a template to receive their configuration. I see in Postman that I can execute a put to update a configuration template. I'm thinking the best method to make the change is by using json in the body of the call, but I'm not certain of the syntax to use. In truth, I'm not certain that's even the correct call to use, to make a change of this type. Any help is appreciated. Please let me know if further explanation is needed.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 22:10:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400762#M548</guid>
      <dc:creator>genesisjoec</dc:creator>
      <dc:date>2021-11-10T22:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks to existing templates via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400763#M549</link>
      <description>&lt;P&gt;First get a list of all of your network IDs&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/#!get-organization-networks" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/#!get-organization-networks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You will then need to bind each network to a configuration template. &lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/#!bind-network" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/#!bind-network&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If this will be a lot of  API requests,  then I would suggest using action batches for this. &lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/#!action-batches-overview/use-cases" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/#!action-batches-overview/use-cases&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 13:06:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400763#M549</guid>
      <dc:creator>DexterLabora</dc:creator>
      <dc:date>2021-11-11T13:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks to existing templates via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400764#M550</link>
      <description>&lt;P&gt;For a Postman solution to this, you could use the Runner tool to import a CSV or JSON file with a list of IDs to act as variables for each run of the request. &lt;/P&gt;&lt;P&gt;Start by creating a new Collection for this Runner group&lt;/P&gt;&lt;P&gt;- Copy in the "Bind a network to a template" endpoint into your new collection.  (delete any existing headers)&lt;/P&gt;&lt;P&gt;- The POST body should look like this&lt;/P&gt;&lt;PRE class="lia-code-sample language-javascript"&gt;&lt;CODE&gt;{
    "configTemplateId": "{{configTemplateId}}"
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;- Add a Tests script for better logging&lt;/P&gt;&lt;PRE class="lia-code-sample language-javascript"&gt;&lt;CODE&gt;pm.test("Status code is 201", function () {
    pm.response.to.have.status(201);
});&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;- Make sure your environment has an {{apiKey}} variable set&lt;/P&gt;&lt;P&gt;- Make sure your Collection has the following Authorization config&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DexterLaBora_1-1636980405922.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262547i1285F784F7E8C9FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then "Run" the collection.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DexterLaBora_2-1636980699149.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262546iF5A5991C5678CF62/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Upload a csv file with two columns and a row for each &lt;STRONG&gt;networkId&lt;/STRONG&gt; and its desired &lt;STRONG&gt;configTemplateId&lt;/STRONG&gt; or a JSON file with an array with the those params for each network.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Set the Delay to about 250ms&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;file.csv&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;networkId,configTemplateId&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;L_6434517960000001,N_111111111&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;L_6434517960000002,N_111111111&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;L_6434517960000003,N_111111111&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;L_6434517960000004,N_222222222&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;L_6434517960000004,N_222222222&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DexterLaBora_4-1636981726692.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262548iA958E078BECB32AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Runner demo - bind network.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262555i3C6655A34CAD7A3A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This will run the desired API for each network, binding it to the config template. You will get a report of each request so you have a log of what worked or had issues.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;example summary  (using Blink the LEDs )&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DexterLaBora_3-1636981621408.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262549i58CCB604F49C88D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 13:11:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400764#M550</guid>
      <dc:creator>DexterLabora</dc:creator>
      <dc:date>2021-11-15T13:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding networks to existing templates via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400765#M551</link>
      <description>&lt;P&gt;Very much appreciative. Thank you both!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 16:54:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/adding-networks-to-existing-templates-via-api/m-p/5400765#M551</guid>
      <dc:creator>genesisjoec</dc:creator>
      <dc:date>2021-11-15T16:54:26Z</dc:date>
    </item>
  </channel>
</rss>

