<?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: can you create searches using the REST API in splunk cloud in Splunk Cloud Platform</title>
    <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/can-you-create-searches-using-the-REST-API-in-splunk-cloud/m-p/699442#M3254</link>
    <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Yes, you can create searches using the REST API in Splunk Cloud. Here are the basic steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Get a Session Key&lt;/STRONG&gt;: Authenticate with Splunk to get a session key.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Create a Search Job&lt;/STRONG&gt;: Use the /services/search/jobs endpoint to create a search job. You’ll need to send a POST request with your search query in the body.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Check Search Status&lt;/STRONG&gt;: Use the search ID (sid) returned from the previous step to check the status of your search job.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here’s a simple example using curl:&lt;/P&gt;&lt;PRE&gt;curl -k -u username:password https://&amp;lt;splunk-cloud-url&amp;gt;/services/search/jobs -d search=&lt;SPAN class=""&gt;"search index=_internal | head 10"&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;This command will create a search job that retrieves the first 10 events from the _internal index.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 18 Sep 2024 17:23:10 GMT</pubDate>
    <dc:creator>akapa</dc:creator>
    <dc:date>2024-09-18T17:23:10Z</dc:date>
    <item>
      <title>can you create searches using the REST API in splunk cloud</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/can-you-create-searches-using-the-REST-API-in-splunk-cloud/m-p/697778#M3220</link>
      <description>&lt;P&gt;can you create searches using the REST API in splunk cloud&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 21:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/can-you-create-searches-using-the-REST-API-in-splunk-cloud/m-p/697778#M3220</guid>
      <dc:creator>adeyoyeniyi</dc:creator>
      <dc:date>2024-08-29T21:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: can you create searches using the REST API in splunk cloud</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/can-you-create-searches-using-the-REST-API-in-splunk-cloud/m-p/697920#M3224</link>
      <description>&lt;P&gt;Yes - see example here:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/RESTTUT/RESTsearches#Example:_Create_a_search" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/RESTTUT/RESTsearches#Example:_Create_a_search&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 03:44:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/can-you-create-searches-using-the-REST-API-in-splunk-cloud/m-p/697920#M3224</guid>
      <dc:creator>KendallW</dc:creator>
      <dc:date>2024-09-02T03:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: can you create searches using the REST API in splunk cloud</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/can-you-create-searches-using-the-REST-API-in-splunk-cloud/m-p/699442#M3254</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Yes, you can create searches using the REST API in Splunk Cloud. Here are the basic steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Get a Session Key&lt;/STRONG&gt;: Authenticate with Splunk to get a session key.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Create a Search Job&lt;/STRONG&gt;: Use the /services/search/jobs endpoint to create a search job. You’ll need to send a POST request with your search query in the body.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Check Search Status&lt;/STRONG&gt;: Use the search ID (sid) returned from the previous step to check the status of your search job.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here’s a simple example using curl:&lt;/P&gt;&lt;PRE&gt;curl -k -u username:password https://&amp;lt;splunk-cloud-url&amp;gt;/services/search/jobs -d search=&lt;SPAN class=""&gt;"search index=_internal | head 10"&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;This command will create a search job that retrieves the first 10 events from the _internal index.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Sep 2024 17:23:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/can-you-create-searches-using-the-REST-API-in-splunk-cloud/m-p/699442#M3254</guid>
      <dc:creator>akapa</dc:creator>
      <dc:date>2024-09-18T17:23:10Z</dc:date>
    </item>
  </channel>
</rss>

