<?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: Changed save searches/alert cron_schedule with rest api/bash in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-change-save-searches-alert-cron-schedule-with-rest-api/m-p/755896#M23505</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What about savedsearch with Sharing set to "Private".&lt;/P&gt;&lt;P&gt;Can those be access through API? From another user with "admin" privilege?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Nov 2025 08:53:59 GMT</pubDate>
    <dc:creator>Na_Kang_Lim</dc:creator>
    <dc:date>2025-11-26T08:53:59Z</dc:date>
    <item>
      <title>How to change save searches/alert cron_schedule with rest api/bash?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-change-save-searches-alert-cron-schedule-with-rest-api/m-p/559595#M6410</link>
      <description>&lt;P&gt;Hello, I am trying to change cron_schedule of saved searches/alerts by calling REST API URI in a bash script. I am reading cron_schedule, search title and app name from a CSV file. CURL commands with working fine to change cron_schedule for all the private searches/alerts. but in case of Global searches/alert, It makes a private copy of that global search and changes the cron_schedule of that one, not the original one. I want to change the schedule of both local and global searches/alerts without creating a private copy of the global one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;#! /bin/bash&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;INPUT=data.csv&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;OLDIFS=$IFS&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;IFS=','&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[ ! -f $INPUT ] &amp;amp;&amp;amp; {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;echo "$INPUT file not found"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;exit 99;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;echo "-----------------------------------------------------" &amp;gt;&amp;gt; output.txt&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;while read app cron search_name&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;do&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SEARCH=${search_name// /%20}&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;QUERY="&lt;A href="https://localhost:8089/servicesNS/admin/$app/saved/searches/$SEARCH" target="_blank" rel="noopener"&gt;https://localhost:8089/servicesNS/admin/$app/saved/searches/$SEARCH&lt;/A&gt;"&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;echo $QUERY &amp;gt;&amp;gt; output.txt&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;echo -e "\n---------------------------------------------------------\n"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;echo -e "---Search Name--&amp;gt;$search_name"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;echo -e "---Rest API URI--&amp;gt;$QUERY"&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;curl -i -k -u &amp;lt;admin_user&amp;gt;:&amp;lt;password&amp;gt; $QUERY -d cron_schedule=$cron -d output_mode=json &amp;gt;&amp;gt; response.txt&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;done &amp;lt; $INPUT&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;IFS=$OLDIFS&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 13:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-change-save-searches-alert-cron-schedule-with-rest-api/m-p/559595#M6410</guid>
      <dc:creator>LovepreetSingh</dc:creator>
      <dc:date>2023-06-12T13:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Changed save searches/alert cron_schedule with rest api/bash</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-change-save-searches-alert-cron-schedule-with-rest-api/m-p/646633#M16559</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;maybe this is too late for you, but for other who have same issue, here is fix for it.&lt;/P&gt;&lt;P&gt;When you are using /servicesNS/admin/$app/... you are targeting to admin user's private context. When you switches it to /servicesNS/nobody/$app/... you are targeting to app shared context.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could fix your script with changing QUERY to&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;QUERY="https://localhost:8089/servicesNS/nobody/$app/saved/searches/$SEARCH"&lt;/LI-CODE&gt;&lt;P&gt;Also you must check if there are any other characters in your Alerts/Savedsearch's names than space which needs to escape (like : ). Just do escape also to those.&lt;/P&gt;&lt;P&gt;Here is my own issue with this same subject &lt;A href="https://community.splunk.com/t5/Alerting/Why-can-t-I-change-alert-with-REST-It-change-permission-from-app/m-p/646456/thread-id/15104/highlight/false#M15117" target="_blank"&gt;https://community.splunk.com/t5/Alerting/Why-can-t-I-change-alert-with-REST-It-change-permission-from-app/m-p/646456/thread-id/15104/highlight/false#M15117&lt;/A&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 11:33:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-change-save-searches-alert-cron-schedule-with-rest-api/m-p/646633#M16559</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-06-12T11:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Changed save searches/alert cron_schedule with rest api/bash</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-change-save-searches-alert-cron-schedule-with-rest-api/m-p/755896#M23505</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What about savedsearch with Sharing set to "Private".&lt;/P&gt;&lt;P&gt;Can those be access through API? From another user with "admin" privilege?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 08:53:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-change-save-searches-alert-cron-schedule-with-rest-api/m-p/755896#M23505</guid>
      <dc:creator>Na_Kang_Lim</dc:creator>
      <dc:date>2025-11-26T08:53:59Z</dc:date>
    </item>
  </channel>
</rss>

