<?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: API curl error in HPE Morpheus Enterprise</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/api-curl-error/m-p/7247799#M973</link>
    <description>&lt;P&gt;Could be a bug for your version but support would be able to confirm that if you put in a support case. Unfortunately I don’t have v6.2.6 in my lab. But I was able to get this working on v7.0.2.&lt;/P&gt;
&lt;P&gt;This below worked for me and I got back Success: true&lt;/P&gt;
&lt;P&gt;curl --request POST &lt;BR /&gt;
–url &lt;A href="https://FQDN/api/apps"&gt;https://FQDN/api/apps&lt;/A&gt; &lt;BR /&gt;
–header ‘accept: application/json’ &lt;BR /&gt;
–header ‘authorization: Bearer token’ &lt;BR /&gt;
–header ‘content-type: application/json’ &lt;BR /&gt;
–data ’&lt;BR /&gt;
{&lt;BR /&gt;
“group”: {&lt;BR /&gt;
“id”: 1&lt;BR /&gt;
},&lt;BR /&gt;
“defaultCloud”: {&lt;BR /&gt;
“id”: 19&lt;BR /&gt;
},&lt;BR /&gt;
“blueprintId”: 4,&lt;BR /&gt;
“name”: “bp-test”&lt;BR /&gt;
}&lt;BR /&gt;
’  --insecure &lt;SPAN class="hashtag-raw"&gt;#I&lt;/SPAN&gt; don’t have a valid cert currently but that shouldn’t change anything.&lt;/P&gt;
&lt;P&gt;This may be better as a support case if you still are hitting this issue.&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2024 16:40:26 GMT</pubDate>
    <dc:creator>tyboyd</dc:creator>
    <dc:date>2024-05-29T16:40:26Z</dc:date>
    <item>
      <title>API curl error</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/api-curl-error/m-p/7247798#M972</link>
      <description>&lt;P&gt;Hello team&lt;BR /&gt;
By morpheus cli I received correct curl command and added only cacert to make secure curl request&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;curl --cacert ca.pem -XPOST "https://url.com/api/apps"   -H "Authorization: Bearer 12345678-1234-1234-1234-d57ccbb8c9e3"   -H "Content-Type: application/json"   -d '{
  "templateId": 144,
  "blueprintId": 144,
  "blueprintName": "Aws-Devops",
  "name": "ec2-aws-instance",
  "description": null,
  "group": {
    "id": 2,
    "name": "Public Clouds"
  },
  "defaultCloud": {
    "id": 7
  },
  "environment": "dev"
}'
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;after 1 min I received next message&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;405 Not Allowed&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;center&amp;gt;&amp;lt;h1&amp;gt;405 Not Allowed&amp;lt;/h1&amp;gt;&amp;lt;/center&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My account have max permission(admin under master tenant) and bearer morph-api I use to send request&lt;/P&gt;
&lt;P&gt;at the same time app start to create&lt;BR /&gt;
Why I dont receive status code success&lt;/P&gt;
&lt;P&gt;Morpheus 6.2.6&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 15:50:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/api-curl-error/m-p/7247798#M972</guid>
      <dc:creator />
      <dc:date>2024-05-29T15:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: API curl error</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/api-curl-error/m-p/7247799#M973</link>
      <description>&lt;P&gt;Could be a bug for your version but support would be able to confirm that if you put in a support case. Unfortunately I don’t have v6.2.6 in my lab. But I was able to get this working on v7.0.2.&lt;/P&gt;
&lt;P&gt;This below worked for me and I got back Success: true&lt;/P&gt;
&lt;P&gt;curl --request POST &lt;BR /&gt;
–url &lt;A href="https://FQDN/api/apps"&gt;https://FQDN/api/apps&lt;/A&gt; &lt;BR /&gt;
–header ‘accept: application/json’ &lt;BR /&gt;
–header ‘authorization: Bearer token’ &lt;BR /&gt;
–header ‘content-type: application/json’ &lt;BR /&gt;
–data ’&lt;BR /&gt;
{&lt;BR /&gt;
“group”: {&lt;BR /&gt;
“id”: 1&lt;BR /&gt;
},&lt;BR /&gt;
“defaultCloud”: {&lt;BR /&gt;
“id”: 19&lt;BR /&gt;
},&lt;BR /&gt;
“blueprintId”: 4,&lt;BR /&gt;
“name”: “bp-test”&lt;BR /&gt;
}&lt;BR /&gt;
’  --insecure &lt;SPAN class="hashtag-raw"&gt;#I&lt;/SPAN&gt; don’t have a valid cert currently but that shouldn’t change anything.&lt;/P&gt;
&lt;P&gt;This may be better as a support case if you still are hitting this issue.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 16:40:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/api-curl-error/m-p/7247799#M973</guid>
      <dc:creator>tyboyd</dc:creator>
      <dc:date>2024-05-29T16:40:26Z</dc:date>
    </item>
  </channel>
</rss>

