<?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: How to create or update UI view using rest api in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36515#M6682</link>
    <description>&lt;P&gt;This is rather a large topic.  Can you narrow down your question?    My guess is that the ideal form of this question is more "how can I learn everything I need to know,  in order to tinker with updating views from the rest api",  or "are there good examples of things that update views from the rest API?". &lt;/P&gt;

&lt;P&gt;The Sideview Editor springs to mind as a fully functional example, but there's a lot of power in there and that means it's not the &lt;EM&gt;simplest&lt;/EM&gt; example.  The Sideview Editor is packaged inside Sideview Utils, and while the free licensing doesn't technically allow you to reverse engineer the code and use it in your own products, I don't mind people taking a look at it for educational purposes. &lt;/P&gt;

&lt;P&gt;Going the other way,  reading and writing the XML is a matter of talking to the &lt;CODE&gt;data/ui/views&lt;/CODE&gt; endpoint.   If you're going from python this is often but not always done using Splunk's Entity class - for example &lt;CODE&gt;en.getEntity('data/ui/views', view, namespace=app)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and as far as the modifying part, you'll just use your XML library of choice.  In python this is usually ElementTree or lxml depending on preference. &lt;/P&gt;</description>
    <pubDate>Tue, 19 Feb 2013 18:38:34 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2013-02-19T18:38:34Z</dc:date>
    <item>
      <title>How to create or update UI view using rest api</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36514#M6681</link>
      <description>&lt;P&gt;How to create or update UI view using rest api?&lt;/P&gt;

&lt;P&gt;Is it possible to create/update a splunk view using data/ui/views endpoint. If yes, then what are parameters that this endpoint takes. &lt;BR /&gt;
I am hoping that if saved/searches endpoint has necessary parameters/options to create/modify a saved search then there should be similar options available for data/ui/views so that I can create/update the splunk views. &lt;BR /&gt;
I am not using python, I would need the rest endpoint and the parameters so that I can call them from a dot net/java or any other applications.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 12:26:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36514#M6681</guid>
      <dc:creator>sridamg</dc:creator>
      <dc:date>2013-02-19T12:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create or update UI view using rest api</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36515#M6682</link>
      <description>&lt;P&gt;This is rather a large topic.  Can you narrow down your question?    My guess is that the ideal form of this question is more "how can I learn everything I need to know,  in order to tinker with updating views from the rest api",  or "are there good examples of things that update views from the rest API?". &lt;/P&gt;

&lt;P&gt;The Sideview Editor springs to mind as a fully functional example, but there's a lot of power in there and that means it's not the &lt;EM&gt;simplest&lt;/EM&gt; example.  The Sideview Editor is packaged inside Sideview Utils, and while the free licensing doesn't technically allow you to reverse engineer the code and use it in your own products, I don't mind people taking a look at it for educational purposes. &lt;/P&gt;

&lt;P&gt;Going the other way,  reading and writing the XML is a matter of talking to the &lt;CODE&gt;data/ui/views&lt;/CODE&gt; endpoint.   If you're going from python this is often but not always done using Splunk's Entity class - for example &lt;CODE&gt;en.getEntity('data/ui/views', view, namespace=app)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and as far as the modifying part, you'll just use your XML library of choice.  In python this is usually ElementTree or lxml depending on preference. &lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 18:38:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36515#M6682</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-19T18:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create or update UI view using rest api</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36516#M6683</link>
      <description>&lt;P&gt;Thanks for your answer. Let me clarify my question. &lt;BR /&gt;
Is it possible to create/update a splunk view using data/ui/views endpoint. If yes, then what are parameters that this endpoint takes. &lt;BR /&gt;
I am hoping that if saved/searches endpoint has necessary parameters/options to create/modify a saved search then there should be similar options available for data/ui/views so that I can create/update the splunk views. &lt;BR /&gt;
I am not using python, I would need the rest endpoint and the parameters so that I can call them from a dot net/java or any other applications.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 04:05:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36516#M6683</guid>
      <dc:creator>sridamg</dc:creator>
      <dc:date>2013-02-20T04:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create or update UI view using rest api</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36517#M6684</link>
      <description>&lt;P&gt;Well it's quite different from posting to the savedsearches endpoint.  For one thing the views entity only has really the "eai:data" property, which is a large XML string.  The client really has to know all the legal values of that XML string, meaning posting invalid XML or slightly-invalid syntax will just give you a non-functional view.  Also the URL to hit depends on whether the view is shared.  &lt;/P&gt;

&lt;P&gt;It appears to be totally absent from the REST API docs, but for what it's worth the URL would be as follows: &lt;BR /&gt;
&lt;CODE&gt;/servicesNS/nobody/&amp;lt;app_name&amp;gt;/data/ui/views/&amp;lt;view_name&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 05:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36517#M6684</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-20T05:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to create or update UI view using rest api</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36518#M6685</link>
      <description>&lt;P&gt;i took the liberty of copying sridamg's clarification of the question into the question itself, for the benefit of future users.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 21:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36518#M6685</guid>
      <dc:creator>piebob</dc:creator>
      <dc:date>2013-03-05T21:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create or update UI view using rest api</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36519#M6686</link>
      <description>&lt;P&gt;Looking for an answer on this!&lt;/P&gt;

&lt;P&gt;doing the cURL command:&lt;BR /&gt;
$ curl -k -u admin:changeme &lt;A href="https://localhost:8089/servicesNS/admin/search/data/ui/views/_new"&gt;https://localhost:8089/servicesNS/admin/search/data/ui/views/_new&lt;/A&gt; -d "eai:data=" -d name=&lt;/P&gt;

&lt;P&gt;gives:&lt;BR /&gt;
Argument "eai:data" is not supported by this handler&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2015 13:51:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36519#M6686</guid>
      <dc:creator>deanilol</dc:creator>
      <dc:date>2015-04-05T13:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create or update UI view using rest api</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36520#M6687</link>
      <description>&lt;P&gt;To create a new dashboard named "newdash":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -ku admin:changeme &lt;A href="https://localhost:8089/servicesNS/admin/search/data/ui/views/" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/data/ui/views/&lt;/A&gt; -d 'name=newdash' -d 'eai:data=&amp;lt;put your xml here&amp;gt;'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To edit an existing dashboard with the name "newdash":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -ku admin:changeme &lt;A href="https://localhost:8089/servicesNS/nobody/search/data/ui/views/newdash" target="test_blank"&gt;https://localhost:8089/servicesNS/nobody/search/data/ui/views/newdash&lt;/A&gt; -d 'eai:data=&amp;lt;put your xml here&amp;gt;'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Take a look at the keys that are returned from the endpoint, that should give you a pretty good idea of what you can change.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTknowledge#data.2Fui.2Fviews.2F.7Bname.7D"&gt;http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTknowledge#data.2Fui.2Fviews.2F.7Bname.7D&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2015 04:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36520#M6687</guid>
      <dc:creator>jreuter_splunk</dc:creator>
      <dc:date>2015-10-14T04:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create or update UI view using rest api</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36521#M6688</link>
      <description>&lt;P&gt;Splunk has provided a simple example in the form or a Curl Statement&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:pass &lt;A href="https://localhost:8089/servicesNS/admin/search/data/ui/views" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/data/ui/views&lt;/A&gt; -d "name=new_dashboard&amp;amp;eai:data=&amp;lt;dashboard&amp;gt;&amp;lt;label&amp;gt;the_new_label&amp;lt;/label&amp;gt;&amp;lt;/dashboard&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Taken from:  &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.0/RESTREF/RESTknowledge#data.2Fui.2Fviews"&gt;http://docs.splunk.com/Documentation/Splunk/7.2.0/RESTREF/RESTknowledge#data.2Fui.2Fviews&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 15:53:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-or-update-UI-view-using-rest-api/m-p/36521#M6688</guid>
      <dc:creator>markbarber21</dc:creator>
      <dc:date>2018-11-07T15:53:05Z</dc:date>
    </item>
  </channel>
</rss>

