<?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: REST API for Splunk Dashboard update giving error for complex XML in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/REST-API-for-Splunk-Dashboard-update-giving-error-for-complex/m-p/563357#M46367</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you this solution worked perfectly !&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 05:38:04 GMT</pubDate>
    <dc:creator>shirlal</dc:creator>
    <dc:date>2021-08-16T05:38:04Z</dc:date>
    <item>
      <title>REST API for Splunk Dashboard update giving error for complex XML</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/REST-API-for-Splunk-Dashboard-update-giving-error-for-complex/m-p/557379#M38776</link>
      <description>&lt;P&gt;I have a complex Splunk Dashboard that needs to be updated through REST API.&lt;BR /&gt;The Dashboard was created manually, so the Dashboard XML is very large with many graphs,charts and complex search queries.&lt;/P&gt;&lt;P&gt;I am able to do a GET of the dashboard contents.&lt;/P&gt;&lt;P&gt;But when I try to update dashboard via POST and pass entire XML as &lt;STRONG&gt;eai:data&lt;/STRONG&gt;, I get&amp;nbsp; the error:&lt;BR /&gt;&lt;STRONG&gt;Unparsable URI-encoded request data .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shirlal_0-1624869620763.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14840iAAC8C8F1D694ABD7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shirlal_0-1624869620763.png" alt="shirlal_0-1624869620763.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I try to pass the xml as file (request.xml) for &lt;STRONG&gt;Curl&amp;nbsp;&lt;/STRONG&gt; :&lt;BR /&gt;curl -ku username:pwd -X POST -H "Content-Type:text/xml"&amp;nbsp; -d 'name=testdashboard' -d 'eai:data=@request.xml' &lt;A href="https://my_splunk_url:8089/servicesNS/username/appspace/data/ui/views" target="_blank" rel="noopener"&gt;https://my_splunk_url:8089/servicesNS/username/appspace/data/ui/views&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;response&amp;gt;&lt;BR /&gt;&amp;lt;messages&amp;gt;&lt;BR /&gt;&amp;lt;msg type="ERROR"&amp;gt;&lt;STRONG&gt;Error parsing XML on line 1: Start tag expected, '&amp;amp;lt;'&lt;/STRONG&gt; not found&lt;BR /&gt;&amp;lt;/msg&amp;gt;&lt;BR /&gt;&amp;lt;/messages&amp;gt;&lt;BR /&gt;&amp;lt;/response&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the request.xml have tried to replace&amp;nbsp;&lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt;form&lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt; with&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&amp;amp;lt;form&amp;amp;gt;&lt;/STRONG&gt;&amp;nbsp; still no luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone please advise how to update large complex XML through REST API?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 08:48:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/REST-API-for-Splunk-Dashboard-update-giving-error-for-complex/m-p/557379#M38776</guid>
      <dc:creator>shirlal</dc:creator>
      <dc:date>2021-06-28T08:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: REST API for Splunk Dashboard update giving error for complex XML</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/REST-API-for-Splunk-Dashboard-update-giving-error-for-complex/m-p/558393#M38830</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235848"&gt;@shirlal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After many experiments in this week I think this shell script will help you.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;#!/bin/sh
data=`cat request.xml`
param=`echo "eai:data=$data"`

res=`curl -ku admin:admin123 https://localhost:8089/servicesNS/admin/search/data/ui/views/ -d 'name=testdashboard' --data-urlencode "$param"`
echo $res&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 12:16:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/REST-API-for-Splunk-Dashboard-update-giving-error-for-complex/m-p/558393#M38830</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-06T12:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: REST API for Splunk Dashboard update giving error for complex XML</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/REST-API-for-Splunk-Dashboard-update-giving-error-for-complex/m-p/563357#M46367</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you this solution worked perfectly !&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 05:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/REST-API-for-Splunk-Dashboard-update-giving-error-for-complex/m-p/563357#M46367</guid>
      <dc:creator>shirlal</dc:creator>
      <dc:date>2021-08-16T05:38:04Z</dc:date>
    </item>
  </channel>
</rss>

