<?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: How to get output data when calling a playbook through the API in Splunk SOAR</title>
    <link>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698298#M1567</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;Thanks for the reply. Unfortunately the input playbook contains a http app block. I've tried to just make the request in a code block using requests but am running into proxy errors, works fine when I use the app.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 14:59:39 GMT</pubDate>
    <dc:creator>N_K</dc:creator>
    <dc:date>2024-09-05T14:59:39Z</dc:date>
    <item>
      <title>How to get output data when calling a playbook through the API</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698278#M1565</link>
      <description>&lt;P&gt;I have an input playbook with two output variables. I can retrieve these variables when I call the playbook using the playbook block in the UI.&lt;/P&gt;&lt;P&gt;However, I now need to loop over items in a list and call the playbook for each item in that list, this requires using the&amp;nbsp;&lt;STRONG&gt;phantom.playbook&lt;/STRONG&gt; function. From what I can see, there is no way to retrieve the output of this playbook now, is that correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example below:&lt;/P&gt;&lt;PRE&gt;for item in prepare_data__post_list:&lt;BR /&gt;    phantom.playbook(playbook="local/__Post_To_Server", container={"id": int(container_id)}, inputs={"body": item, "headers": prepare_data__headers, "path": prepare_data__path})&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Sep 2024 10:10:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698278#M1565</guid>
      <dc:creator>N_K</dc:creator>
      <dc:date>2024-09-05T10:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get output data when calling a playbook through the API</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698279#M1566</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254063"&gt;@N_K&lt;/a&gt;&amp;nbsp;I would recommend that you make the input playbook capable of handling list items as inputs and doing the iteration inside the playbook as it will be the path of least resistance and put less strain on the platform from a worker perspective.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 10:13:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698279#M1566</guid>
      <dc:creator>phanTom</dc:creator>
      <dc:date>2024-09-05T10:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get output data when calling a playbook through the API</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698298#M1567</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;Thanks for the reply. Unfortunately the input playbook contains a http app block. I've tried to just make the request in a code block using requests but am running into proxy errors, works fine when I use the app.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 14:59:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698298#M1567</guid>
      <dc:creator>N_K</dc:creator>
      <dc:date>2024-09-05T14:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get output data when calling a playbook through the API</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698300#M1568</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254063"&gt;@N_K&lt;/a&gt;&amp;nbsp; You can make an action block loop through a list of parameters with the right input from a format block. With the HTTP app it may be harder to do as there are a lot of potential parameters.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yeah, please don't try to use requests outside of an app space &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Depending what you are using the HTTP app for it may be best to build an app to handle it as you get a lot more control over the behaviour and the HTTP app, IMO, is usually only useful to test interactions with external APIs OR simple HTTP related tasks.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How many parameters are dynamic when using the HTTP app?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 15:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/698300#M1568</guid>
      <dc:creator>phanTom</dc:creator>
      <dc:date>2024-09-05T15:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get output data when calling a playbook through the API</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/700970#M1590</link>
      <description>&lt;P&gt;You can do this without custom code and without calling a child playbook.&lt;BR /&gt;&lt;BR /&gt;With your list, use format block with %% in front and after&amp;nbsp; you format your API to then call HTTP app's action using format_1:formatted_data.* (important you pass in the formatted data using the formatted_data.* with asterisk) to the http action. This will cause the http action to be triggered once for each item in the list.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 05:30:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/How-to-get-output-data-when-calling-a-playbook-through-the-API/m-p/700970#M1590</guid>
      <dc:creator>churyn_splunk</dc:creator>
      <dc:date>2024-10-04T05:30:28Z</dc:date>
    </item>
  </channel>
</rss>

