Event Manager Query Events

Event Manager Query Events

Returns events based on the specified EventFilterSpec and EventManagerEventViewSpec parameters.

Returns an empty array when there are no events matching the filtering parameters.

Required privileges: System.View

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/EventManager/{moId}/QueryEvents
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case EventManager/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.


Request Body
QueryEventsRequestType of type(s) application/json
Required
"QueryEventsRequestType Object"
filter
Required

Defines a filtering criteria for the event query.

eventViewSpec
Optional

Defines the view parameters for the event query.

To retrieve the newest events in the system, use 2147480000 (or the value of "config.vpxd.event.maxEventId" advanced vCenter configuration option) as EventManagerViewByStartId.startEventId and set EventManagerViewByStartId.isForward to false. To retrieve subsequent pages of results with older events, use the smallest event ID from the previous response as the EventManagerViewByStartId.startEventId and setEventManagerViewByStartId.isForward to false in the next query. To retrieve subsequent pages of results with newer events, use the biggest event ID from the previous page as the EventManagerViewByStartId.startEventId and set EventManagerViewByStartId.isForward to true in the next query.

Since: vSphere API Release 9.0.0.0

Authentication
This operation uses the following authentication methods.
Responses
200

The events matching the filters.

[
    "Event Object"
]
array of Event
Optional

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/EventManager/{moId}/QueryEvents