<?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 API Auth and Search Script in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685516#M11443</link>
    <description>&lt;P&gt;Hello Experts, I'm trying to create a python script to run adhoc searches via a api request but the documentation has me opening webpages after webpages. I've created a token already. Can someone please help me with this task? Thank you in advance,&lt;A class="" href="https://community.splunk.com/t5/Splunk-Search/bd-p/splunk-search" target="_blank" rel="noopener"&gt;Splunk Search&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2024 19:09:38 GMT</pubDate>
    <dc:creator>martillo_300</dc:creator>
    <dc:date>2024-04-25T19:09:38Z</dc:date>
    <item>
      <title>API Auth and Search Script</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685516#M11443</link>
      <description>&lt;P&gt;Hello Experts, I'm trying to create a python script to run adhoc searches via a api request but the documentation has me opening webpages after webpages. I've created a token already. Can someone please help me with this task? Thank you in advance,&lt;A class="" href="https://community.splunk.com/t5/Splunk-Search/bd-p/splunk-search" target="_blank" rel="noopener"&gt;Splunk Search&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 19:09:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685516#M11443</guid>
      <dc:creator>martillo_300</dc:creator>
      <dc:date>2024-04-25T19:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: API Auth and Search Script</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685521#M11444</link>
      <description>&lt;P&gt;Try modifying this CURL request to your needs (adjust the endpoint, search, and token)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -H 'Authorization: Splunk &amp;lt;your_token_here&amp;gt;' https://your_searchhead_here:8089/services/search/v2/jobs/export -d search="search index=* | head 10 | table host"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 19:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685521#M11444</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-04-25T19:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: API Auth and Search Script</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685530#M11445</link>
      <description>&lt;P&gt;Thanks. Is there a count that I can limit this to? I makes the call but never comes back with data where I have to kill the process.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 21:20:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685530#M11445</guid>
      <dc:creator>martillo_300</dc:creator>
      <dc:date>2024-04-25T21:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: API Auth and Search Script</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685679#M11450</link>
      <description>&lt;P&gt;The /export endpoint will dispatch a search and then retrieve the results when the search is completed. If the search takes a lot of time, then likely the request will time out. You can either make your search faster or you can use two endpoints, one where you dispatch the search and another endpoint where you later retrieve the results.&lt;/P&gt;&lt;P&gt;To dispatch the search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -H 'Authorization: Splunk &amp;lt;your_token_here&amp;gt;' https://your_searchhead_here:8089/services/search/jobs -d search="search index=* | head 10 | table host"&lt;/LI-CODE&gt;&lt;P&gt;The above call will return you a search id (sid), which you'll need in the following call to retrieve the results:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -H 'Authorization: Splunk &amp;lt;your_token_here&amp;gt;' https://your_searchhead_here:8089/services/search/&amp;lt;yoursidhere&amp;gt;/results&lt;/LI-CODE&gt;&lt;P&gt;Ref:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/RESTTUT/RESTsearches" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/RESTTUT/RESTsearches&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 18:54:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685679#M11450</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-04-26T18:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: API Auth and Search Script</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685826#M11453</link>
      <description>&lt;P&gt;That worked! Thank you so much. This is exactly what I was needing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 12:52:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/API-Auth-and-Search-Script/m-p/685826#M11453</guid>
      <dc:creator>martillo_300</dc:creator>
      <dc:date>2024-04-29T12:52:13Z</dc:date>
    </item>
  </channel>
</rss>

