<?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: POST cliTemplateConfiguration/upload - multiple variables in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542864#M1567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So for JSON, there should be a JSON object "variables" containing a JSON array "variable" of variable objects.&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14926199604789566" jivemacro_uid="_14926199604789566"&gt;
&lt;P&gt;"variables":{&lt;/P&gt;
&lt;P&gt;"variable":[&lt;/P&gt;
&lt;P&gt;{"name":"Example one","description":"Example",...},&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;{"name":"Example two","description":"Example",...},&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;{"name":"Example three","description":"Example",...}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;]&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The square brackets denote that it's an array of objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For customers using JSON, we recommend moving to API v2, as the JSON output and input handling for arrays is consistent (in v1, the JSON handler will treat "variable" as an object if it has only one element and an array if it has more than one).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Apr 2017 16:45:44 GMT</pubDate>
    <dc:creator>Spencer Zier</dc:creator>
    <dc:date>2017-04-19T16:45:44Z</dc:date>
    <item>
      <title>POST cliTemplateConfiguration/upload - multiple variables</title>
      <link>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542863#M1566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on a script to upload a CLI template to Prime, followed by deployment.&lt;/P&gt;&lt;P&gt;As part of my script I will need to have multiple variables used:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080;"&gt;/webacs/api/v1/op/cliTemplateConfiguration/upload&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"variables" :&lt;/P&gt;&lt;P&gt;&amp;nbsp; {"variable" : {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "defaultValue" : "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "description" : "IP address",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "displayLabel" : "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "name" : "RemoteClient",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "rangeFrom" : "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "rangeTo" : "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "required" : True,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "type" : "IPv4 Address",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "validationExpression" : ""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "variable" : {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "defaultValue" : "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "description" : "VLAN number",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "displayLabel" : "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "name" : "VlanId",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "rangeFrom" : "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "rangeTo" : "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "required" : True,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "type" : "Integer",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "validationExpression" : ""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to send one variable to Prime, but not more. The documentation asks for a list of variables. It does not seem to work as a list of variables.&lt;/P&gt;&lt;P&gt;The documentation is not very clear how to actually accomplish this. How do I format the data I need to send to be able to use multiple variables in my code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:58:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542863#M1566</guid>
      <dc:creator>Gabriel Zapodeanu</dc:creator>
      <dc:date>2017-04-14T15:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: POST cliTemplateConfiguration/upload - multiple variables</title>
      <link>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542864#M1567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So for JSON, there should be a JSON object "variables" containing a JSON array "variable" of variable objects.&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14926199604789566" jivemacro_uid="_14926199604789566"&gt;
&lt;P&gt;"variables":{&lt;/P&gt;
&lt;P&gt;"variable":[&lt;/P&gt;
&lt;P&gt;{"name":"Example one","description":"Example",...},&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;{"name":"Example two","description":"Example",...},&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;{"name":"Example three","description":"Example",...}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;]&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The square brackets denote that it's an array of objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For customers using JSON, we recommend moving to API v2, as the JSON output and input handling for arrays is consistent (in v1, the JSON handler will treat "variable" as an object if it has only one element and an array if it has more than one).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 16:45:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542864#M1567</guid>
      <dc:creator>Spencer Zier</dc:creator>
      <dc:date>2017-04-19T16:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: POST cliTemplateConfiguration/upload - multiple variables</title>
      <link>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542865#M1568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Spencer, Thank you, I will try out the solution and use API v2. I will update with the results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 17:03:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542865#M1568</guid>
      <dc:creator>Gabriel Zapodeanu</dc:creator>
      <dc:date>2017-04-19T17:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: POST cliTemplateConfiguration/upload - multiple variables</title>
      <link>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542866#M1569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help. It worked as stated. Example of using two variables: $VlanId and $RemoteClient&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14937444201935384" jivemacro_uid="_14937444201935384" modifiedtitle="true"&gt;
&lt;P&gt;list_var = {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008080;"&gt;'variable'&lt;/SPAN&gt;: [&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;SPAN style="color: #008080;"&gt;'name'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'RemoteClient'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;'displayLabel'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'RemoteClient'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;'description'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'IP address'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;'required'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'True'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;'type'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'IPv4 Address'&lt;/SPAN&gt;}&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;SPAN style="color: #008080;"&gt;'name'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'VlanId'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;'displayLabel'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'VlanId'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;'description'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'VLAN number'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;'required'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'True'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;'type'&lt;/SPAN&gt;: &lt;SPAN style="color: #008080;"&gt;'Integer'&lt;/SPAN&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ]&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 17:00:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/post-clitemplateconfiguration-upload-multiple-variables/m-p/3542866#M1569</guid>
      <dc:creator>Gabriel Zapodeanu</dc:creator>
      <dc:date>2017-05-02T17:00:40Z</dc:date>
    </item>
  </channel>
</rss>

