<?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: Restapi task in HPE Morpheus Enterprise Software</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248793#M1967</link>
    <description>&lt;P&gt;Ahh , got it , its working now , how to pass print command here , i want to  run print(requests) but i see empty screen&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149424iFD9B6FC366C602B5/image-size/large?v=v2&amp;amp;px=2000" role="button" title="6bd3379472f098e7ff220cc0bc36635991739d31.png" alt="6bd3379472f098e7ff220cc0bc36635991739d31.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;i use GET to fetch some information , or POST to create , both task needs to return some output which i need to pass in other task input , how is it possible ?&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2023 16:09:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2023-04-10T16:09:42Z</dc:date>
    <item>
      <title>Restapi task</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248791#M1965</link>
      <description>&lt;P&gt;I am trying to run python task but getting an error , same script is running manally from MD cli&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149909i97293C6705E2EA1A/image-size/large?v=v2&amp;amp;px=2000" role="button" title="5a70881dc1393555830e435a0e2c752761b99d6c.png" alt="5a70881dc1393555830e435a0e2c752761b99d6c.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149874iA3F41A83A2515DCE/image-size/large?v=v2&amp;amp;px=2000" role="button" title="d58fda5fc311f16619d6500908ca160334e65e74.png" alt="d58fda5fc311f16619d6500908ca160334e65e74.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 15:51:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248791#M1965</guid>
      <dc:creator />
      <dc:date>2023-04-10T15:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Restapi task</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248792#M1966</link>
      <description>&lt;P&gt;You can use a workflow and task results to do that.  This link has some additional context for that: &lt;A href="https://docs.morpheusdata.com/en/latest/library/automation/tasks/taskResults.html" class="inline-onebox"&gt;Task Results — Morpheus Docs documentation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Just make sure you are only outputting what you want to be read in the next task and it is in the proper format (ie. JSON)&lt;/P&gt;
&lt;P&gt;Just to add onto the original question, python tasks run in a fresh virtual environment, so you need to put any additional packages into the tasks options to make sure they are installed when you run the task.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 16:24:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248792#M1966</guid>
      <dc:creator />
      <dc:date>2023-04-10T16:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Restapi task</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248793#M1967</link>
      <description>&lt;P&gt;Ahh , got it , its working now , how to pass print command here , i want to  run print(requests) but i see empty screen&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149424iFD9B6FC366C602B5/image-size/large?v=v2&amp;amp;px=2000" role="button" title="6bd3379472f098e7ff220cc0bc36635991739d31.png" alt="6bd3379472f098e7ff220cc0bc36635991739d31.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;i use GET to fetch some information , or POST to create , both task needs to return some output which i need to pass in other task input , how is it possible ?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 16:09:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248793#M1967</guid>
      <dc:creator />
      <dc:date>2023-04-10T16:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Restapi task</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248794#M1968</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149730i0D33D8E271BE2A9C/image-size/large?v=v2&amp;amp;px=2000" role="button" title="7013c5178c0f38cdcd2f2f866514129075037e84.png" alt="7013c5178c0f38cdcd2f2f866514129075037e84.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;BR /&gt;
I have already selected json as result type but i see no information , where can i check the Result is published or not ?&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 16:36:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248794#M1968</guid>
      <dc:creator />
      <dc:date>2023-04-10T16:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Restapi task</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248795#M1969</link>
      <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hpe.com/u/paul_b"&gt;@Paul_B&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Here is an example I created similar to your code:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;import requests
api_url = "https://catfact.ninja/facts"
response = requests.get(api_url)
print(response.json())
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is the resulting data output:&lt;BR /&gt;
&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150138i43E3D4E4065BD062/image-size/large?v=v2&amp;amp;px=2000" role="button" title="4f061a5f8d9a454d484b3ea2b2eb32db84d689a3.png" alt="4f061a5f8d9a454d484b3ea2b2eb32db84d689a3.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Here is the configuration of the task I made:&lt;BR /&gt;
&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150056i94558AEB95A29914/image-size/large?v=v2&amp;amp;px=2000" role="button" title="bd3d0a1b49f88644bdb912d51b4158efbee8ea80.png" alt="bd3d0a1b49f88644bdb912d51b4158efbee8ea80.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;You should see the results in the output in Morpheus, otherwise, the data will most likely not be available to the &lt;CODE style="background : #f0f1f2;"&gt;results&lt;/CODE&gt; variable.&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 18:07:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248795#M1969</guid>
      <dc:creator>KoreyG</dc:creator>
      <dc:date>2023-04-10T18:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Restapi task</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248796#M1970</link>
      <description>&lt;P&gt;Are you defining your Additional packages on the task?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150238iAB860D2AB5922492/image-size/large?v=v2&amp;amp;px=2000" role="button" title="d7cf55d8708aa1c732dde83efb8f4ca737743acf.png" alt="d7cf55d8708aa1c732dde83efb8f4ca737743acf.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 15:54:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/restapi-task/m-p/7248796#M1970</guid>
      <dc:creator>cbunge</dc:creator>
      <dc:date>2023-04-10T15:54:39Z</dc:date>
    </item>
  </channel>
</rss>

