<?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 Add data programmatically using REST API in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Add-data-programmatically-using-REST-API/m-p/649986#M110458</link>
    <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;do you have example of script or curl commands using REST API to add data?&lt;/P&gt;&lt;P&gt;There is&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.4/RESTREF/RESTinput#data.2Finputs.2Fmonitor" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.4/RESTREF/RESTinput#data.2Finputs.2Fmonitor&lt;/A&gt;&amp;nbsp;but how to specify serverclass?&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jul 2023 13:19:44 GMT</pubDate>
    <dc:creator>splunkreal</dc:creator>
    <dc:date>2023-07-11T13:19:44Z</dc:date>
    <item>
      <title>Add data programmatically using REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Add-data-programmatically-using-REST-API/m-p/649986#M110458</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;do you have example of script or curl commands using REST API to add data?&lt;/P&gt;&lt;P&gt;There is&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.4/RESTREF/RESTinput#data.2Finputs.2Fmonitor" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.4/RESTREF/RESTinput#data.2Finputs.2Fmonitor&lt;/A&gt;&amp;nbsp;but how to specify serverclass?&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 13:19:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Add-data-programmatically-using-REST-API/m-p/649986#M110458</guid>
      <dc:creator>splunkreal</dc:creator>
      <dc:date>2023-07-11T13:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add data programmatically using REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Add-data-programmatically-using-REST-API/m-p/650018#M110462</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/171872"&gt;@splunkreal&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Yes, first you need (as far as I know) to enable the HTTP Event Collector on your receiver (let's suppose it's a standalone Splunk Server).&lt;/P&gt;&lt;P&gt;You need to navigate (from the GUI) to &lt;STRONG&gt;settings/data inputs/HTTP Event Collector&amp;nbsp;&lt;/STRONG&gt;and click on &lt;STRONG&gt;Global Settings.&amp;nbsp;&lt;/STRONG&gt;From there you can enable all Tokens, eventually disable SSL and save. Finally create a &lt;STRONG&gt;New Token&lt;/STRONG&gt;&amp;nbsp;from the same page.&lt;/P&gt;&lt;P&gt;Then from another machine (or here in my test in localhost) you can run this curl command :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -X POST -H "Authorization: Splunk &amp;lt;hec_token_created&amp;gt;" -d '{"event": "Hello World!", "index": "&amp;lt;your_index&amp;gt;"}' http://&amp;lt;splunk_receiver&amp;gt;:8088/services/collector/event&lt;/LI-CODE&gt;&lt;P&gt;Then you should be able to search this event you just sent.&lt;/P&gt;&lt;P&gt;Hope it helps !&lt;/P&gt;&lt;P&gt;GaetanVP&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 15:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Add-data-programmatically-using-REST-API/m-p/650018#M110462</guid>
      <dc:creator>GaetanVP</dc:creator>
      <dc:date>2023-07-11T15:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add data programmatically using REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Add-data-programmatically-using-REST-API/m-p/650028#M110463</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Gaetan,&lt;/P&gt;&lt;P&gt;thanks for HEC solution however how do you add data the same way you add monitor stanza using app's inputs.conf on deployment server and attach it to particular serverclass using REST API?&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 17:17:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Add-data-programmatically-using-REST-API/m-p/650028#M110463</guid>
      <dc:creator>splunkreal</dc:creator>
      <dc:date>2023-07-11T17:17:53Z</dc:date>
    </item>
  </channel>
</rss>

