<?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 HEC token through an API call? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409122#M26878</link>
    <description>&lt;P&gt;Can you see this help&lt;BR /&gt;
- curl command to get token&lt;BR /&gt;
- build conf files and then move them in a git repo&lt;BR /&gt;
- have a schedule sync job to sync all conf file between git repo and deployment server&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2019 16:51:10 GMT</pubDate>
    <dc:creator>Aftab_alam</dc:creator>
    <dc:date>2019-06-28T16:51:10Z</dc:date>
    <item>
      <title>How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409115#M26871</link>
      <description>&lt;P&gt;Would like to create an HEC token based on an api call.&lt;/P&gt;

&lt;P&gt;Whenever a new instance (EC2) is coming up, it would make a call to splunk enterprise using the api gateway. splunk enterpise may need to create an HEC token and send a response back to the EC2 instance.&lt;/P&gt;

&lt;P&gt;Later, the HEC token created will be mapped to an index and other conf file would be changed.&lt;/P&gt;

&lt;P&gt;Question is:&lt;BR /&gt;
 "Is there a way to create HEC token on API call ?"&lt;BR /&gt;
post the creation of HEC token, is there a way to find the same &lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 13:33:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409115#M26871</guid>
      <dc:creator>sathiyaraj1983</dc:creator>
      <dc:date>2019-04-16T13:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409116#M26872</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Yes you can create HEC Token using Splunk REST API , have a look at this documentation &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/RESTREF/RESTinput#data.2Finputs.2Fhttp"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/RESTREF/RESTinput#data.2Finputs.2Fhttp&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I have created sample token in my lab and it is working fine and below command I have used. You can create python script to achieve this and when you fire below REST API it will provide Response in which token value will be there&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:pass &lt;A href="https://localhost:8089/servicesNS/nobody/search/data/inputs/http" target="test_blank"&gt;https://localhost:8089/servicesNS/nobody/search/data/inputs/http&lt;/A&gt; -d name=test -d index=main -d indexes=main,summary
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Apr 2019 15:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409116#M26872</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-04-16T15:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409117#M26873</link>
      <description>&lt;P&gt;Thanks for the help. &lt;BR /&gt;
Yes, using the curl command, i  have created the HEC token. but my requirement here is.&lt;/P&gt;

&lt;P&gt;1) On Creating HEC token using a dummy index. should trigger a script, which should in-turn create the index.conf and push it to deployment server and then callback rest api to update the index details in input.conf for respective HEC token.&lt;/P&gt;

&lt;P&gt;the challenge it to invoke a script, on creation of HEC token&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 06:22:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409117#M26873</guid>
      <dc:creator>sathiyaraj1983</dc:creator>
      <dc:date>2019-04-26T06:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409118#M26874</link>
      <description>&lt;P&gt;it is possible to call a script to create a index.conf file, on completion of above said Restapi call.&lt;BR /&gt;
would like to create the HEC using dummy index, then a script to create index.conf to deploy across the index cluster. post index.conf deployment, a script to call input.conf to update the index name.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 06:25:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409118#M26874</guid>
      <dc:creator>sathiyaraj1983</dc:creator>
      <dc:date>2019-04-26T06:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409119#M26875</link>
      <description>&lt;P&gt;You can create python script with Splunk Python SDK to create HEC token and then when you will get 200 response from Splunk invoke your other script.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 12:59:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409119#M26875</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-04-26T12:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409120#M26876</link>
      <description>&lt;P&gt;appreciate your help so far,&lt;BR /&gt;
my requirement is.....&lt;BR /&gt;
1) for a api call from EC2 instance,Create a HEC token and send a respond back .&lt;BR /&gt;
2) on creating HEC token, further do a subsequent call to create index.conf, auth.conf and deploy it to the cluster.&lt;/P&gt;

&lt;P&gt;so far i have achieved the step 1, HEC token got created and responded back to the API call with HEC token. &lt;/P&gt;

&lt;P&gt;Now,would like to know, how can i do a subsequent call(post the Rest api call to create HEC token) to create index.conf &lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2019 10:50:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409120#M26876</guid>
      <dc:creator>sathiyaraj1983</dc:creator>
      <dc:date>2019-04-28T10:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409121#M26877</link>
      <description>&lt;P&gt;,You might be able to solve this as below&lt;BR /&gt;
- Use curl to get token &lt;BR /&gt;
- build conf file -&amp;gt; upload it to a git repo/s3 and then a schedule job sync these conf files to Splunk deployment server.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 16:49:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409121#M26877</guid>
      <dc:creator>Aftab_alam</dc:creator>
      <dc:date>2019-06-28T16:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409122#M26878</link>
      <description>&lt;P&gt;Can you see this help&lt;BR /&gt;
- curl command to get token&lt;BR /&gt;
- build conf files and then move them in a git repo&lt;BR /&gt;
- have a schedule sync job to sync all conf file between git repo and deployment server&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 16:51:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/409122#M26878</guid>
      <dc:creator>Aftab_alam</dc:creator>
      <dc:date>2019-06-28T16:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/524536#M35528</link>
      <description>&lt;P&gt;&amp;nbsp;hi there,&lt;/P&gt;&lt;P&gt;curl -u admin:pass https://localhost:8089/servicesNS/nobody/search/data/inputs/http -d name=myapp&lt;/P&gt;&lt;P&gt;above curl works well and generates token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to replicate same for self-service Splunk Cloud as i have tried above command on my trial Splunk Cloud account with below command&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;curl -k -v -u admin:pass &lt;A href="https://prd-p-aadrg.splunkcloud.com:8089/servicesNS/nobody/search/data/inputs/http" target="_blank"&gt;https://prd-p-aadrg.splunkcloud.com:8089/servicesNS/nobody/search/data/inputs/http&lt;/A&gt; -d name=myapp&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;and nmap shows that only three ports are open&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;Starting Nmap 7.60 ( &lt;A href="https://nmap.org" target="_blank"&gt;https://nmap.org&lt;/A&gt; ) at 2020-10-14 11:30 IST&lt;BR /&gt;Nmap scan report for prd-p-aadrg.splunkcloud.com (100.24.234.228)&lt;BR /&gt;Host is up (0.23s latency).&lt;BR /&gt;rDNS record for 100.24.234.228: ec2-100-24-234-228.compute-1.amazonaws.com&lt;BR /&gt;Not shown: 9998 filtered ports&lt;BR /&gt;PORT STATE SERVICE&lt;BR /&gt;80/tcp open http&lt;BR /&gt;443/tcp open https&lt;BR /&gt;8088/tcp open radan-http&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;same above command on port 8088 returns below error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;{"text":"The requested URL was not found on this server.","code":404}&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;So how to create http-event token for Self-service Splunk Cloud using REST api calls.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 06:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/524536#M35528</guid>
      <dc:creator>devopsadmin</dc:creator>
      <dc:date>2020-10-14T06:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/524538#M35529</link>
      <description>&lt;P&gt;well after searching&amp;nbsp; a bit, i got this link which suggest what needs to be done&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.6/RESTTUT/RESTandCloud" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.6/RESTTUT/RESTandCloud&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 06:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/524538#M35529</guid>
      <dc:creator>devopsadmin</dc:creator>
      <dc:date>2020-10-14T06:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/619977#M50904</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163905"&gt;@harsmarvania57&lt;/a&gt;&amp;nbsp;you mention creating HEC using Splunk Python SDK - would you please elaborate on that as I could not find anything on this in the SDK doc. Kindly please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 19:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/619977#M50904</guid>
      <dc:creator>Presses</dc:creator>
      <dc:date>2022-11-07T19:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create HEC token through an API call?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/657068#M54129</link>
      <description>&lt;P&gt;Do you have an example of the rest call you used to create the HEC?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 15:37:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-HEC-token-through-an-API-call/m-p/657068#M54129</guid>
      <dc:creator>NanSplk01</dc:creator>
      <dc:date>2023-09-08T15:37:24Z</dc:date>
    </item>
  </channel>
</rss>

