Product SiteDocumentation Site

2.16. 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 2.19. List the events collection
GET /rhevm-api/events HTTP/1.1
Accept: application/xml
The API returns a representation that includes the following:
<events>
    ...
    <event id="103" href="/rhevm-api/events/103">
        <description>User admin logged out.</description>
        <code>31</code>
        <severity>NORMAL</severity>
        <time>2011-06-29T17:42:41.544+10:00</time>
        <user id="80b71bae-98a1-11e0-8f20-525400866c73" 
          href="/rhevm-api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
    </event>
    <event id="102" href="/rhevm-api/events/102">
        <description>vm1 was started by admin (Host: hypervisor).</description>
        <code>153</code>
        <severity>NORMAL</severity>
        <time>2011-06-29T17:42:41.499+10:00</time>
        <user id="80b71bae-98a1-11e0-8f20-525400866c73"
          href="/rhevm-api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
        <vm id="6efc0cfa-8495-4a96-93e5-ee490328cf48"
          href="/rhevm-api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48"/>
        <host id="0656f432-923a-11e0-ad20-5254004ac988"
          href="/rhevm-api/hosts/0656f432-923a-11e0-ad20-5254004ac988"/>
    </event>
    <event id="101" href="/rhevm-api/events/101">
        <description>User admin logged in.</description>
        <code>30</code>
        <severity>NORMAL</severity>
        <time>2011-06-29T17:42:40.505+10:00</time>
        <user id="80b71bae-98a1-11e0-8f20-525400866c73"
          href="/rhevm-api/users/80b71bae-98a1-11e0-8f20-525400866c73"/>
    </event>
    ...
</events>
The following events have occured:
  • id="101" - The API authenticates with the admin user's username and password.
  • id="102" - The API, acting as the admin user, starts vm1 on the hypervisor host.
  • id="103" - The API logs out of the admin user account.