Question

Prism Central v3 Clone API Error

  • 9 October 2019
  • 1 reply
  • 1663 views

Hello,

I'm trying to clone from a known UUID (our template) but I keep getting a 400 code for "Bad request"

Ex :
(Using Postman for this example, but have also tried with POSH and had the same result)
POST https://1.1.1.1:9440/api/nutanix/v3/vms/{UUID}/clone
Basic Auth - admin/pw
Headers - Content-Type:application/json

Once I send the API call, this returns :
{
"api_version": "3.1",
"code": 400,
"message_list": [
{
"message": "Bad request.",
"reason": "BAD_REQUEST"
}
],
"state": "ERROR"
}

Any advice / help would be appreciated. This has been boggling me as to why it'd throw this error.

Thank you!

This topic has been closed for comments

1 reply

Userlevel 3
Badge +3

@Erik Ha   Hi Erik, I did try to apply a curl command from PC. I tried:

 

curl -k -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: Basic YWRtaW46U1JFczRldmEh" -d "{}" "https://w.x.y.z:9440/api/nutanix/v3/vms/"uuid string”/clone”

and I get:

{"task_uuid": "9a48cb4b-af3a-4e11-b82c-b072b06994e2"}

indicating things started working. I checked later, the clone has failed which could have many reasons. Still investigating it, but if you can try this and let me know how it worked for you, I appreciate it.

 

-Said