Method: OvirtSDK4::EventsService#list
- Defined in:
- lib/ovirtsdk4/services.rb
#list(opts = {}) ⇒ Array<Event>
Get list of events.
GET /ovirt-engine/api/events
To the above request we get following response:
<events>
<event href="/ovirt-engine/api/events/2" id="2">
<description>User admin@internal-authz logged out.</description>
<code>31</code>
<correlation_id>1e892ea9</correlation_id>
<custom_id>-1</custom_id>
<flood_rate>30</flood_rate>
<origin>oVirt</origin>
<severity>normal</severity>
<time>2016-09-14T12:14:34.541+02:00</time>
<user href="/ovirt-engine/api/users/57d91d48-00da-0137-0138-000000000244" id="57d91d48-00da-0137-0138-000000000244"/>
</event>
<event href="/ovirt-engine/api/events/1" id="1">
<description>User admin logged in.</description>
<code>30</code>
<correlation_id>1fbd81f4</correlation_id>
<custom_id>-1</custom_id>
<flood_rate>30</flood_rate>
<origin>oVirt</origin>
<severity>normal</severity>
<time>2016-09-14T11:54:35.229+02:00</time>
<user href="/ovirt-engine/api/users/57d91d48-00da-0137-0138-000000000244" id="57d91d48-00da-0137-0138-000000000244"/>
</event>
</events>
The following events occur:
-
id="1" - The API logs in the admin user account.
-
id="2" - The API logs out of the admin user account.
The order of the returned list of events is always garanteed. If the sortby
clause is included in the
search
parameter, then the events will be ordered according to that clause. If the sortby
clause isn’t
included, then the events will be sorted by the numeric value of the id
attribute, starting with the
highest value. This, combined with the max
parameter, simplifies obtaining the most recent event:
GET /ovirt-engine/api/events?max=1
9166 9167 9168 |
# File 'lib/ovirtsdk4/services.rb', line 9166 def list(opts = {}) internal_get(LIST, opts) end |