Description
This example worked for me using REST API Docs "try it" for import of a specific export location
curl -X POST "https://10.205.15.70/rest/v1/VirDomain/import" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"source\":{\"pathURI\":\"smb://t4lab.local;administrator:[email protected]/exports/win2003legacy-emptydisk\",\"definitionFileName\":\"win2003legacy-emptydisk.xml\"},\"template\":{\"name\":\"rest-api-import\"}}"
the json body used which specifies the smb path and credentials used to access the exported VM. Note that for import to work - the folder /export-example here must match the definition file name base. Generally this would be the VM name for both if the export was triggered from the HC3 UI but that is not required. As shown here the imported vm name can be anything.
{
"source": {
"pathURI": "smb://t4lab.local;administrator:[email protected]/exports/win2003legacy-emptydisk",
"definitionFileName": "win2003legacy-emptydisk.xml"
},
"template": {
"name": "rest-api-import"
}
}