<?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 Is it possible to create, retrieve, modify, and delete eventtypes from Javascript SDK? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207262#M2761</link>
    <description>&lt;P&gt;Can we create/retrieve/update/delete eventtypes, tags from javascript SDK ? &lt;BR /&gt;
If yes how do we it? &lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2016 13:49:40 GMT</pubDate>
    <dc:creator>sashankdvk</dc:creator>
    <dc:date>2016-09-23T13:49:40Z</dc:date>
    <item>
      <title>Is it possible to create, retrieve, modify, and delete eventtypes from Javascript SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207262#M2761</link>
      <description>&lt;P&gt;Can we create/retrieve/update/delete eventtypes, tags from javascript SDK ? &lt;BR /&gt;
If yes how do we it? &lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 13:49:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207262#M2761</guid>
      <dc:creator>sashankdvk</dc:creator>
      <dc:date>2016-09-23T13:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to create, retrieve, modify, and delete eventtypes from Javascript SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207263#M2762</link>
      <description>&lt;P&gt;Yes and no.  Eventtypes and tags can be trivially made using the REST API - SDK not required.  All you need is something that can make HTTP calls, like the JQuery $.ajax() function, or whatever you would use in NodeJS.  The SDK exposes parts of the entities available via the REST API as subclasses of splunkjs.Service - like splunkjs.Service.SavedSearches.   There is no pre-built splunkjs.Service.EventTypes, so you'd have to extend the SDK some.&lt;/P&gt;

&lt;P&gt;But if you look here, you can see the underlying REST API for making a new EventType:  &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/RESTREF/RESTknowledge#saved.2Feventtypes"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/RESTREF/RESTknowledge#saved.2Feventtypes&lt;/A&gt;  Here is an example of using that endpoint, via curl on the command line, to make a new eventtype and tag it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme 'https://localhost:8089/servicesNS/admin/search/saved/eventtypes?output_mode=json' -X POST -d 'name=example' -d 'search=index=abc sourcetype=foo' -d 'tags=potato,tomato,crap'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Again anything that can create an HTTP request with post data can do this.  The SDK's wrappings make it somewhat easier, but you don't strictly need it.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2016 15:54:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207263#M2762</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2016-09-24T15:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to create, retrieve, modify, and delete eventtypes from Javascript SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207264#M2763</link>
      <description>&lt;P&gt;thanks for the answer it is helpful. We are trying to make this similar call from JS , can you tell us how to authenticate to splunk server using JS than in curl ? will the splunk service give us some authentication token ? &lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 11:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207264#M2763</guid>
      <dc:creator>sashankdvk</dc:creator>
      <dc:date>2016-09-27T11:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to create, retrieve, modify, and delete eventtypes from Javascript SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207265#M2764</link>
      <description>&lt;P&gt;@sashankdvk were you able to solve this problem? I am trying to do exactly same. I would really appreciate if you can share how you solve this.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 18:40:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-it-possible-to-create-retrieve-modify-and-delete-eventtypes/m-p/207265#M2764</guid>
      <dc:creator>nimeshkakadiya</dc:creator>
      <dc:date>2017-06-19T18:40:25Z</dc:date>
    </item>
  </channel>
</rss>

