API curl error

Hello team
By morpheus cli I received correct curl command and added only cacert to make secure curl request

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"
}'

after 1 min I received next message

<html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>

</body>
</html>

My account have max permission(admin under master tenant) and bearer morph-api I use to send request

at the same time app start to create
Why I dont receive status code success

Morpheus 6.2.6

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.

This below worked for me and I got back Success: true

curl --request POST
–url https://FQDN/api/apps
–header ‘accept: application/json’
–header ‘authorization: Bearer token’
–header ‘content-type: application/json’
–data ’
{
“group”: {
“id”: 1
},
“defaultCloud”: {
“id”: 19
},
“blueprintId”: 4,
“name”: “bp-test”
}
’ --insecure #I don’t have a valid cert currently but that shouldn’t change anything.

This may be better as a support case if you still are hitting this issue.

1 Like