Hi,
We created virtial machine using VRA rest api, once the task is done we want to remove the machine.
Is there rest api to delete the VM.
Yes, by default in the Library folder there is a native workflow under the vCenter folder that will delete a vm.
Hi, in vRA 7 you would do something like this...
Get the Id of the resource you want to destroy:
Then get the Id of the destroy action (assuming it has been entitled):
Then you can grab the template for the resource action:
{
"type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
"resourceId": "a3577bc9-17e4-461d-ac7e-345a0563e855",
"actionId": "1253cc68-5292-452f-b27e-f896dc82e8cd",
"description": null,
"data": {
"description": null,
"reasons": null
}
}
And finally you would request the day two action to destroy the resource. The body of the POST will be the template you got from above
Further resources can be found here: