<?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: Create View with REST? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104726#M22051</link>
    <description>&lt;P&gt;Looking for an answer on this!&lt;/P&gt;</description>
    <pubDate>Sun, 05 Apr 2015 13:53:07 GMT</pubDate>
    <dc:creator>deanilol</dc:creator>
    <dc:date>2015-04-05T13:53:07Z</dc:date>
    <item>
      <title>Create View with REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104722#M22047</link>
      <description>&lt;P&gt;version 5.0.2&lt;/P&gt;

&lt;P&gt;Looking through the documentation, but nothing is jumping out at me as to how to create a View for an app dynamically via REST or C# SDK. I'll be creating the XML on the fly and would like to send it to Splunk programatically as opposed to copy / paste through the user interface.&lt;/P&gt;

&lt;P&gt;Thanks - sorry if this is a ridiculous question.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2013 22:51:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104722#M22047</guid>
      <dc:creator>nathankc</dc:creator>
      <dc:date>2013-07-23T22:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create View with REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104723#M22048</link>
      <description>&lt;P&gt;You're not crazy.  For some reason the &lt;CODE&gt;/data/ui/views&lt;/CODE&gt; endpoint is missing from the REST API reference. &lt;/P&gt;

&lt;P&gt;It's simple though.   With views there are only 2 relevant properties to get/set:  "name", which ends up being the filename on disk as well as the URL segment,  and &lt;CODE&gt;eai:data&lt;/CODE&gt;, which is the XML string.   &lt;/P&gt;

&lt;P&gt;To give an example off the top of my head, to add a system-owned view called "myView" to "myApp" just POST to &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;/servicesNS/nobody/myApp/data/ui/views/_new&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and pass "name" set to "myView", and "eai:data" set to the desired XML.   As with other namespaced REST calls, you would set permissions and ownership by incorporating usernames in URL as appropriate and setting the "eai:acl" property as appropriate in your POST.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2013 23:14:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104723#M22048</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-07-23T23:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create View with REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104724#M22049</link>
      <description>&lt;P&gt;Am I missing something here.  I submit eai:data and I get:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;MSG type="ERROR"&gt;In handler 'views':&lt;BR /&gt;
Argument "eai:data" is not supported&lt;BR /&gt;
by this handler.&lt;/MSG&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The curl I'm running is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -v -H "Content-Type: application/xml" -X POST -d name=test00013210 -d eai:data=%3Cdashboard%20%2F%3E  -u admin:changeme  -k hxxps://localhost:8091/servicesNS/admin/search/data/ui/views/_new
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Feb 2014 21:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104724#M22049</guid>
      <dc:creator>fman82</dc:creator>
      <dc:date>2014-02-26T21:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create View with REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104725#M22050</link>
      <description>&lt;P&gt;Tried it for myself and indeed,  something about posting to the _new endpoint doesn't work here.  I can't figure it out either.  I can do a nice simple &lt;CODE&gt;curl POST -d eai:data="&amp;lt;dashboard /&amp;gt;" -u admin:changeme -k https://localhost:8089/servicesNS/admin/search/data/ui/views/existing_view_name&lt;/CODE&gt;   and it works great.   &lt;/P&gt;

&lt;P&gt;But whenever I try anything to _new, I get that same error you're getting.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:59:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104725#M22050</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2020-09-28T15:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create View with REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104726#M22051</link>
      <description>&lt;P&gt;Looking for an answer on this!&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2015 13:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104726#M22051</guid>
      <dc:creator>deanilol</dc:creator>
      <dc:date>2015-04-05T13:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create View with REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104727#M22052</link>
      <description>&lt;P&gt;HI sideview, &lt;BR /&gt;
   how to get value of eai:data? &lt;/P&gt;

&lt;P&gt;so  in curl you mentioned "/admin/search/" here "search" is the app having the view?&lt;BR /&gt;
  And i am getting "Argument " name" is not supported by this handler."&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 07:06:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-View-with-REST/m-p/104727#M22052</guid>
      <dc:creator>ganesh_crms</dc:creator>
      <dc:date>2019-07-24T07:06:27Z</dc:date>
    </item>
  </channel>
</rss>

