<?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 Modify dashboard using REST API in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Modify-dashboard-using-REST-API/m-p/135057#M8061</link>
    <description>&lt;P&gt;I'd like to modify a dashboard's content using the REST API (for example add another report or an HTML panel). Is there a proper way to do it?&lt;/P&gt;

&lt;P&gt;I found out that I can get the dashboard information and source by issuing a GET request to &lt;A href="https://$server$:8089/servicesNS/$user$/$app$/data/ui/views/$dashboardName$" target="test_blank"&gt;https://$server$:8089/servicesNS/$user$/$app$/data/ui/views/$dashboardName$&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I tried to POST to the same URI with a "data=..." request body, containing the dashboard source, but I get an error:&lt;/P&gt;

&lt;P&gt;In handler 'views': Argument " Average usage &amp;lt;/searchName&amp;gt;      &amp;lt;option name" is not supported by this handler.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2014 15:27:20 GMT</pubDate>
    <dc:creator>neptoon</dc:creator>
    <dc:date>2014-02-03T15:27:20Z</dc:date>
    <item>
      <title>Modify dashboard using REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Modify-dashboard-using-REST-API/m-p/135057#M8061</link>
      <description>&lt;P&gt;I'd like to modify a dashboard's content using the REST API (for example add another report or an HTML panel). Is there a proper way to do it?&lt;/P&gt;

&lt;P&gt;I found out that I can get the dashboard information and source by issuing a GET request to &lt;A href="https://$server$:8089/servicesNS/$user$/$app$/data/ui/views/$dashboardName$" target="test_blank"&gt;https://$server$:8089/servicesNS/$user$/$app$/data/ui/views/$dashboardName$&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I tried to POST to the same URI with a "data=..." request body, containing the dashboard source, but I get an error:&lt;/P&gt;

&lt;P&gt;In handler 'views': Argument " Average usage &amp;lt;/searchName&amp;gt;      &amp;lt;option name" is not supported by this handler.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2014 15:27:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Modify-dashboard-using-REST-API/m-p/135057#M8061</guid>
      <dc:creator>neptoon</dc:creator>
      <dc:date>2014-02-03T15:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Modify dashboard using REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Modify-dashboard-using-REST-API/m-p/135058#M8062</link>
      <description>&lt;P&gt;Hi, i believe you might have included {name: 'your_dashboard_name'} in the data your are posting.&lt;BR /&gt;
For creating new dashboard, you need:&lt;BR /&gt;
 1. URL: https://$server$:8089/servicesNS/$user$/$app$/data/ui/views/&lt;BR /&gt;
 (Notice that please don't include the dashboard name in the url)&lt;BR /&gt;
 2. data {'name': 'dashboard_name', 'eai:data': 'dashboard_xml_definition'}&lt;/P&gt;

&lt;P&gt;For updating existing dashboard, you need:&lt;BR /&gt;
 1. URL: https://$server$:8089/servicesNS/$user$/$app$/data/ui/views/$dashboardName$&lt;BR /&gt;
 (Notice that please include the dashboard name)&lt;BR /&gt;
 2. data {'eai:data': 'dashboard_xml_definition'}&lt;BR /&gt;
 (Notice that don't include the name param)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:06:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Modify-dashboard-using-REST-API/m-p/135058#M8062</guid>
      <dc:creator>chujun1990</dc:creator>
      <dc:date>2020-09-29T10:06:18Z</dc:date>
    </item>
  </channel>
</rss>

