<?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: Callback actions on container's status change in Splunk SOAR</title>
    <link>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551065#M641</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231842"&gt;@drew19&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;When you send an email automatically you could update a custom list with the container_id &amp;amp; the mail_id and any other useful information for the update action(s). Then on a schedule check the status of each container_id, if closed use to the mail_id to run the update_email action then delete the entry from the list upon success.&lt;BR /&gt;This would take a relatively small time to setup and test.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;For your other question you need to use REST and hit the 'container' endpoint with some filtering.&amp;nbsp;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;&amp;lt;your_phantom_url&amp;gt;/rest/container?_filter_label='"&amp;lt;your_label&amp;gt;"'&amp;amp;page_size=0&amp;amp;sort=id&amp;amp;order=desc&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;If using the phantom.requests() API you need to set it up like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;url = phantom.build_phantom_rest_url('container')
params = [('_filter_label', '"&amp;lt;label&amp;gt;"'), ('page_size', 0), ('sort', 'id'), ('order', 'desc')]
r = phantom.requests.get(url, params=params, verify=False)
response = r.json()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;verify=False is only if you don't have valid certs on Phantom.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Docs links:&lt;BR /&gt;Filtering REST:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Phantom/4.10.3/PlatformAPI/RESTQueryData" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Phantom/4.10.3/PlatformAPI/RESTQueryData&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Sessions API:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Phantom/4.10.3/PlaybookAPI/SessionAPI" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Phantom/4.10.3/PlaybookAPI/SessionAPI&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 May 2021 10:35:23 GMT</pubDate>
    <dc:creator>phanTom</dc:creator>
    <dc:date>2021-05-10T10:35:23Z</dc:date>
    <item>
      <title>Callback actions on container's status change</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/550513#M635</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to know if there is the possibility to automatically trigger a playbook when there is a change in the status of a container (e.g. when it becomes "Closed")?&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 11:46:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/550513#M635</guid>
      <dc:creator>drew19</dc:creator>
      <dc:date>2021-05-05T11:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Callback actions on container's status change</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551051#M637</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231842"&gt;@drew19&lt;/a&gt;&amp;nbsp;unfortunately not out of the box. However it could be done, but there would be "some" lag.&lt;/P&gt;&lt;P&gt;Just some ways I can think of:&lt;BR /&gt;* Externalise the Splunk data and use SPL to look for a change in container status and send a container to phantom with relevant data to then drive the automation against the original container.&amp;nbsp;&lt;/P&gt;&lt;P&gt;* Persist a list of containers and have a timer app create a container on a schedule to check the list and if any entry changes from x to 'closed' take action and delete the entry from the list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope this helps give you some ideas/possibilities?&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 08:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551051#M637</guid>
      <dc:creator>phanTom</dc:creator>
      <dc:date>2021-05-10T08:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Callback actions on container's status change</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551054#M638</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;thank you for your answers.&lt;/P&gt;&lt;P&gt;These are the same ideas come into my mind, but they cannot help.&lt;/P&gt;&lt;P&gt;We don't like to create further containers just to close other ones, also considering the fact that we are dealing with tons of containers (we do not want "2xTonsOfContainers").&lt;/P&gt;&lt;P&gt;The same applies for externalization and, moreover, we have a very big external Splunk infrastructure... so to externalize is not trivial.&lt;/P&gt;&lt;P&gt;Probably this is a product limitation &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 09:13:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551054#M638</guid>
      <dc:creator>drew19</dc:creator>
      <dc:date>2021-05-10T09:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Callback actions on container's status change</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551055#M639</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231842"&gt;@drew19&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;"&lt;SPAN&gt;We don't like to create further containers just to close other ones, also considering the fact that we are dealing with tons of containers (we do not want "2xTonsOfContainers")."&lt;BR /&gt;- The 2xTon stuff could be tackled by sending a list of containers through so only 1 container per xTon of containers. This would rely on your schedule, or in the playbook 'only do stuff if x number of results found, otherwise wait for the next scheduled run'.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;- Your example was more 'once closed &amp;lt;do stuff&amp;gt;' but again if you take the list of containers to act upon approach and ensure the new container is closed once it's finished I really don't see the issue when it's going to provide consistent automation activities you are currently doing manually.&amp;nbsp;&lt;BR /&gt;- Getting the data into Splunk is simple:&lt;BR /&gt;1. Install the Phantom Remote Search App on IDX &amp;amp; SH layer&lt;BR /&gt;2. Create HEC Token on HEC reciever (if you don't have one already a HFW will usually do)&lt;BR /&gt;3. Put some configuration options into the External Splunk view on Phantom&lt;BR /&gt;4. Watch all the lovely data be ingested&amp;nbsp;&lt;BR /&gt;4.1 This is a highly recommended capability as the Phantom data is very rich and usable in SPL for either monitoring automation and/or reporting on Phantom utilisation.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;You are correct that it's a product limitation, for now ;), but as they are leaning heavily on the Case Management aspects I would expect to see new ways of triggering automation coming in future iterations *wink *wink (forward looking statements apply).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 09:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551055#M639</guid>
      <dc:creator>phanTom</dc:creator>
      <dc:date>2021-05-10T09:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Callback actions on container's status change</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551058#M640</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222170"&gt;@phanTom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what we have to do is simple: when a container is closed we have to trigger an action ("update email") through the Exchange (on-premise) App.&lt;/P&gt;&lt;P&gt;This is not a major feature of our use-case but it would be a "icing on the cake" because it would let us to understand something about an email without logging into Phantom.&lt;/P&gt;&lt;P&gt;Given this, we would like a simple (to develop, test, integrate, test again) solution for such a minor feature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, just to evaluate it further, do you know where can I find APIs in order to query for the "status of a set of containers under a certain label"?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 09:52:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551058#M640</guid>
      <dc:creator>drew19</dc:creator>
      <dc:date>2021-05-10T09:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Callback actions on container's status change</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551065#M641</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231842"&gt;@drew19&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;When you send an email automatically you could update a custom list with the container_id &amp;amp; the mail_id and any other useful information for the update action(s). Then on a schedule check the status of each container_id, if closed use to the mail_id to run the update_email action then delete the entry from the list upon success.&lt;BR /&gt;This would take a relatively small time to setup and test.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;For your other question you need to use REST and hit the 'container' endpoint with some filtering.&amp;nbsp;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;&amp;lt;your_phantom_url&amp;gt;/rest/container?_filter_label='"&amp;lt;your_label&amp;gt;"'&amp;amp;page_size=0&amp;amp;sort=id&amp;amp;order=desc&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;If using the phantom.requests() API you need to set it up like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;url = phantom.build_phantom_rest_url('container')
params = [('_filter_label', '"&amp;lt;label&amp;gt;"'), ('page_size', 0), ('sort', 'id'), ('order', 'desc')]
r = phantom.requests.get(url, params=params, verify=False)
response = r.json()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;verify=False is only if you don't have valid certs on Phantom.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Docs links:&lt;BR /&gt;Filtering REST:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Phantom/4.10.3/PlatformAPI/RESTQueryData" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Phantom/4.10.3/PlatformAPI/RESTQueryData&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Sessions API:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Phantom/4.10.3/PlaybookAPI/SessionAPI" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Phantom/4.10.3/PlaybookAPI/SessionAPI&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 10:35:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Callback-actions-on-container-s-status-change/m-p/551065#M641</guid>
      <dc:creator>phanTom</dc:creator>
      <dc:date>2021-05-10T10:35:23Z</dc:date>
    </item>
  </channel>
</rss>

