<?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 create shared splunk alert with api in Splunk Cloud Platform</title>
    <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747592#M3830</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create alert using api, alert is not getting created in shared mode. I need to run acl command separately to give r+w access&amp;nbsp; to user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command to create alert.&lt;/P&gt;&lt;P&gt;curl --location --request POST '&lt;A href="https://splunkHost:8089/services/saved/searches" target="_blank" rel="noopener"&gt;https://splunkHost:8089/services/saved/searches&lt;/A&gt;' \ --header 'Authorization: Basic Auth' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'name=test_alert_harpreet07' \ --data-urlencode 'cron_schedule=*/30 * * * *' \ --data-urlencode 'description=This alert will be triggered if proxy has 4x,5x errors' \ --data-urlencode 'dispatch.earliest_time=-30@m' \ --data-urlencode 'dispatch.latest_time=now' \ --data-urlencode 'search=search index="federated:some-index" statusCode"&amp;gt;3*'' \ --data-urlencode 'alert_type=number of events' \ --data-urlencode 'alert.expires=730d' \ --data-urlencode 'action.email.to=xyz.abc@def.com' \ --data-urlencode 'action.email.maxresults=50' \ --data-urlencode 'action.email.subject=some-Errors' \ --data-urlencode 'dispatchAs=user' \ --data-urlencode 'action.email.from=Splunk'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to give permission to user&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;curl --location --request POST '&lt;A href="https://splunkHOST" target="_blank" rel="noopener"&gt;https://splunkHOST&lt;/A&gt;"8089/services/saved/searches/&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;alertName&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;/acl' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--header 'Authorization: Basic Auth' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--header 'Content-Type: application/x-www-form-urlencoded' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'sharing=app' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'app=search' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'perms.read=user' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'perms.write=user' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'owner=automation'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#splunk #cloud&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;is there a way, that alert should be created in shared mode with&amp;nbsp; r+w access to user.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 06 Jun 2025 00:04:19 GMT</pubDate>
    <dc:creator>harpr86</dc:creator>
    <dc:date>2025-06-06T00:04:19Z</dc:date>
    <item>
      <title>create shared splunk alert with api</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747592#M3830</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create alert using api, alert is not getting created in shared mode. I need to run acl command separately to give r+w access&amp;nbsp; to user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command to create alert.&lt;/P&gt;&lt;P&gt;curl --location --request POST '&lt;A href="https://splunkHost:8089/services/saved/searches" target="_blank" rel="noopener"&gt;https://splunkHost:8089/services/saved/searches&lt;/A&gt;' \ --header 'Authorization: Basic Auth' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'name=test_alert_harpreet07' \ --data-urlencode 'cron_schedule=*/30 * * * *' \ --data-urlencode 'description=This alert will be triggered if proxy has 4x,5x errors' \ --data-urlencode 'dispatch.earliest_time=-30@m' \ --data-urlencode 'dispatch.latest_time=now' \ --data-urlencode 'search=search index="federated:some-index" statusCode"&amp;gt;3*'' \ --data-urlencode 'alert_type=number of events' \ --data-urlencode 'alert.expires=730d' \ --data-urlencode 'action.email.to=xyz.abc@def.com' \ --data-urlencode 'action.email.maxresults=50' \ --data-urlencode 'action.email.subject=some-Errors' \ --data-urlencode 'dispatchAs=user' \ --data-urlencode 'action.email.from=Splunk'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to give permission to user&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;curl --location --request POST '&lt;A href="https://splunkHOST" target="_blank" rel="noopener"&gt;https://splunkHOST&lt;/A&gt;"8089/services/saved/searches/&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;alertName&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;/acl' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--header 'Authorization: Basic Auth' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--header 'Content-Type: application/x-www-form-urlencoded' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'sharing=app' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'app=search' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'perms.read=user' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'perms.write=user' \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--data-urlencode 'owner=automation'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#splunk #cloud&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;is there a way, that alert should be created in shared mode with&amp;nbsp; r+w access to user.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Jun 2025 00:04:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747592#M3830</guid>
      <dc:creator>harpr86</dc:creator>
      <dc:date>2025-06-06T00:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: create shared splunk alert with api</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747593#M3831</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/268929"&gt;@harpr86&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which app is the first request creating the search in?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would recommend trying to update both of the API calls to using the servicesNS endpoints instead:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/servicesNS/&amp;lt;user&amp;gt;/&amp;lt;app&amp;gt;/saved/searches
and
/servicesNS/&amp;lt;user&amp;gt;/&amp;lt;app&amp;gt;/saved/searches/&amp;lt;alertName&amp;gt;/acl&lt;/LI-CODE&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --location --request POST 'https://splunkHost:8089/servicesNS/automation/search/saved/searches' \
--header 'Authorization: Basic Auth' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=test_alert_harpreet07' \
--data-urlencode 'cron_schedule=*/30 * * * *' \
--data-urlencode 'description=This alert will be triggered if proxy has 4x,5x errors' \
--data-urlencode 'dispatch.earliest_time=-30@m' \
--data-urlencode 'dispatch.latest_time=now' \
--data-urlencode 'search=search index="federated:some-index" statusCode"&amp;gt;3*"' \
--data-urlencode 'alert_type=number of events' \
--data-urlencode 'alert.expires=730d' \
--data-urlencode 'action.email.to=xyz.abc@def.com' \
--data-urlencode 'action.email.maxresults=50' \
--data-urlencode 'action.email.subject=some-Errors' \
--data-urlencode 'dispatchAs=user' \
--data-urlencode 'action.email.from=Splunk'

curl --location --request POST 'https://splunkHost:8089/servicesNS/automation/search/saved/searches/test_alert_harpreet07/acl' \
--header 'Authorization: Basic Auth' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'sharing=app' \
--data-urlencode 'app=search' \
--data-urlencode 'perms.read=user' \
--data-urlencode 'perms.write=user' \
--data-urlencode 'owner=automation'&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 00:31:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747593#M3831</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-06-06T00:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: create shared splunk alert with api</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747625#M3838</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp;thanks for your response. but,&amp;nbsp; I am looking to perform the two operation in single api.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for example, at the time of creation of splunk alert&amp;nbsp; , alert should have permission of r+w to user.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 15:18:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747625#M3838</guid>
      <dc:creator>harpr86</dc:creator>
      <dc:date>2025-06-06T15:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: create shared splunk alert with api</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747630#M3840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/268929"&gt;@harpr86&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately this isn’t possible. I think this is the same when using the UI? Eg you create a search and it starts as private and then you have to update the permission to be shared.&amp;nbsp;&lt;BR /&gt;I hope this helps, sorry it isn’t the answer you might have hoped for!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 18:36:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/create-shared-splunk-alert-with-api/m-p/747630#M3840</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-06-06T18:36:49Z</dc:date>
    </item>
  </channel>
</rss>

