<?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: Custom Web server on XSOAR in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/536875#M1948</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/159920"&gt;@MBeauchamp2&lt;/a&gt;&amp;nbsp;for reply. The problem with your suggestion is that I will get 1 incident per 1 POST. But I'ld like to aggregate all the posts (e.g. 1000 of them) within the timeframe in 1 incident.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 07:11:45 GMT</pubDate>
    <dc:creator>Antanas</dc:creator>
    <dc:date>2023-03-29T07:11:45Z</dc:date>
    <item>
      <title>Custom Web server on XSOAR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/534701#M1898</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'ld like to run a simple web server on demand, which would listen for POST requests and put the data posted in a file (or context).&lt;/P&gt;
&lt;P&gt;So far I achieved similar by modifying community integration XSOAR-Web-Server, which use long lasting instance mode and creates web server using Python Bottle. Server is started by an integration in a simple oneliner:&lt;/P&gt;
&lt;P&gt;run(host='0.0.0.0', port=listen_port, debug=True)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I then deal with&amp;nbsp; POST requests with:&lt;/P&gt;
&lt;P&gt;@route('post-uri', method='POST')&amp;nbsp;&lt;/P&gt;
&lt;P&gt;def post-uri():&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;...&amp;nbsp; &amp;nbsp; # write to a file /tmp/data.txt locally&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After web server received all the posts, I get the data form the XSOAR file system container ../diff/tmp/data.txt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to access the data from the container using the commands in that integration? Cause at the time the data is collected, there are no incidents associated with it. If i create a new command and try to access /tmp/data.txt - it seem to be executed in different container and does not have access to that file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 12:15:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/534701#M1898</guid>
      <dc:creator>Antanas</dc:creator>
      <dc:date>2023-03-16T12:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Web server on XSOAR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/534721#M1899</link>
      <description>&lt;P&gt;I think you'd be better off using something like the Generic Webhook integration to receive the post request, and then have the created Incident write the data to a file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The POST would need to be JSON, but you could then map the data to a field, or drop it to labels.&amp;nbsp; &amp;nbsp;Then have your automation create the file and return it to the war room using the fileResult method (check the script helper)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://xsoar.pan.dev/docs/reference/integrations/generic-webhook" target="_blank"&gt;https://xsoar.pan.dev/docs/reference/integrations/generic-webhook&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 14:35:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/534721#M1899</guid>
      <dc:creator>MBeauchamp2</dc:creator>
      <dc:date>2023-03-16T14:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Web server on XSOAR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/536875#M1948</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/159920"&gt;@MBeauchamp2&lt;/a&gt;&amp;nbsp;for reply. The problem with your suggestion is that I will get 1 incident per 1 POST. But I'ld like to aggregate all the posts (e.g. 1000 of them) within the timeframe in 1 incident.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 07:11:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/536875#M1948</guid>
      <dc:creator>Antanas</dc:creator>
      <dc:date>2023-03-29T07:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Web server on XSOAR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/536906#M1949</link>
      <description>&lt;P&gt;Then I'd use a preprocessing script to handle that part.&amp;nbsp; And have it add an entry to the first Incident.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 14:17:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/custom-web-server-on-xsoar/m-p/536906#M1949</guid>
      <dc:creator>MBeauchamp2</dc:creator>
      <dc:date>2023-03-29T14:17:57Z</dc:date>
    </item>
  </channel>
</rss>

