<?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: DNAC Template System Variables Doc? in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920459#M8767</link>
    <description>&lt;P&gt;I think i made a boo boo, as the DNAC open.api.json i cannot find...&lt;/P&gt;</description>
    <pubDate>Fri, 08 Sep 2023 15:41:53 GMT</pubDate>
    <dc:creator>bigevilbeard</dc:creator>
    <dc:date>2023-09-08T15:41:53Z</dc:date>
    <item>
      <title>DNAC Template System Variables Doc?</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920030#M8762</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Is there a doc for the DNAC template system variables? I'm looking for the schemas for these variables:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MicrosoftTeams-image.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/196654iF3AAEBF27E8109A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="MicrosoftTeams-image.png" alt="MicrosoftTeams-image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;BR /&gt;Marcel&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 08:16:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920030#M8762</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-09-08T08:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC Template System Variables Doc?</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920049#M8763</link>
      <description>&lt;P&gt;Hey buddy like these?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;${hostname} - Populates with the host name of the device
${site} - Populates with the site of the device&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 09:35:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920049#M8763</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-09-08T09:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC Template System Variables Doc?</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920096#M8764</link>
      <description>&lt;P&gt;Hey Stu, yeah plus what I'm most intrested in is the format of the corresponding return values, for example for&amp;nbsp;&lt;EM&gt;interface.portName&lt;/EM&gt;&amp;nbsp;is the output "Gig1/0/1", "G1/0/1" or "GigabitEthernet1/0/1"... ...again, &lt;EM&gt;interface.portName&lt;/EM&gt; is just an example, I'm looking for a doc containing this information for all available system vars. I was not able to find such a doc.&lt;BR /&gt;&lt;BR /&gt;Sure, I can check it on the fly in the template editor for a certain var, but that's a little bit time consuming..&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 11:03:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920096#M8764</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-09-08T11:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC Template System Variables Doc?</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920300#M8765</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/293649"&gt;@Marcel Zehnder&lt;/a&gt;&amp;nbsp;ive not seen one on my travel buddy, but this does not mean there isnt one. I am wondering if you can&amp;nbsp;&lt;SPAN&gt;extract a list of the system variables referenced in the OpenAPI specs by parsing through the JSON file?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DNAC SDK has a TemplateSystemVariable class that represents these variables. You can query for the list of supported system variables like this (BTW untested on the sandbox as he SDK does not support the current AO versions)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Just thinking outloud here and pasting in stuff i have come over in other platforms/asks... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from dnacentersdk import DNACenterAPI

dnac = DNACenterAPI(
    username="devnetuser",
    password="Cisco123!",
    base_url="https://sandboxdnac2.cisco.com:443",
    version="2.3.5.3",
    verify=True)


dnac.authentication.login()

template_api = dnac.system.api.template_programmability


variables = template_api.systems.template_system_variable.get_template_system_variable()

for var in variables['response']:
    print(var['name'])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 13:26:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920300#M8765</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-09-08T13:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC Template System Variables Doc?</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920457#M8766</link>
      <description>&lt;P&gt;Thanks Stu, I will dig into it.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 15:37:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920457#M8766</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-09-08T15:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC Template System Variables Doc?</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920459#M8767</link>
      <description>&lt;P&gt;I think i made a boo boo, as the DNAC open.api.json i cannot find...&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 15:41:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/4920459#M8767</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-09-08T15:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC Template System Variables Doc?</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/5104990#M8769</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/293649"&gt;@Marcel Zehnder&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Did you find a way or a document? I didn't find a correct way to specify the interface "index".&lt;BR /&gt;&lt;BR /&gt;#if ( __interface[GigabitEthernet0/0].description == "Blabla")&lt;BR /&gt;Execute Stuff&lt;BR /&gt;#else&lt;BR /&gt;Execute else stuff&lt;BR /&gt;#end&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 13:54:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/5104990#M8769</guid>
      <dc:creator>Leonardo Neves</dc:creator>
      <dc:date>2024-05-15T13:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC Template System Variables Doc?</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/5110292#M8771</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1104094"&gt;@Leonardo Neves&lt;/a&gt;&amp;nbsp;nope, I went with try/error...&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2024 13:19:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-template-system-variables-doc/m-p/5110292#M8771</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2024-05-19T13:19:15Z</dc:date>
    </item>
  </channel>
</rss>

