A.4. Examples
A.4.1. GET Request with cURL
Example A.1. GET request
The following
GET request lists the virtual machines in the vms collection. Note that a GET request does not contain a body.
GET /api/vms HTTP/1.1 Accept: application/xml
Adapt the method (
GET), header (Accept: application/xml) and URI (https://[RHEVM-Host]:443/api/vms) into the following cURL command:
$ curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHEVM-Host]:443/api/vms
An XML representation of the
vms collection displays.