Ce contenu n'est pas disponible dans la langue sélectionnée.
3.17. Example: Check System Events
The
start action for the vm1 creates several entries in the events collection. This example lists the events collection and identifies events specific to the API starting a virtual machine.
Example 3.20. List the events collection
Request:
GET /api/events HTTP/1.1 Accept: application/xml
GET /api/events HTTP/1.1
Accept: application/xml
cURL command:
curl -X GET -H "Accept: application/xml" -u [USER:PASS] \
--cacert [CERT] \
https://[RHEVM Host]:443/api/events
# curl -X GET -H "Accept: application/xml" -u [USER:PASS] \
--cacert [CERT] \
https://[RHEVM Host]:443/api/events
Result:
The following events occur:
id="101"- The API authenticates with theadminuser's user name and password.id="102"- The API, acting as theadminuser, startsvm1on thehypervisorhost.id="103"- The API logs out of theadminuser account.