A.4.5. DELETE 请求包含带有 cURL 的 Body
例 A.5. 使用正文的 DELETE
请求
以下
DELETE
请求强制删除虚拟机资源,如可选正文所示。
DELETE /ovirt-engine/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399 HTTP/1.1 Accept: application/xml Content-type: application/xml <action> <force>true</force> </action>
调整方法(
DELETE
)、标头(Accept: application/xml
and Content-type: application/xml
), URI (https://[RHEVM-Host]:443/ovirt-engine/api/vms/082c794b-771f-452f-83c9-b2b5a19c0399
),请求正文到以下 cURL 命令中:
$ curl -X DELETE -H "Accept: application/xml" -H "Content-type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<action><force>true</force></action>" https://[RHEVM-Host]:443//ovirt-engine/api/vms/082c794b-771f-452f-83c9-b2b5a19c039
REST API 强制删除虚拟机。