Event Manager Create Collector For Events

Event Manager Create Collector For Events
Creates an event history collector, which is a specialized history collector that provides Event objects.

Creates an event history collector, which is a specialized history collector that provides Event objects.

Event collectors do not persist beyond the current client session.

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/EventManager/{moId}/CreateCollectorForEvents
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.1.0.0 APIs.


Request Body
CreateCollectorForEventsRequestType of type(s) application/json
Required

Show optional properties

{
    "filter": {}
}
{
    "filter": {
        "_typeName": "string",
        "entity": {
            "_typeName": "string",
            "entity": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            },
            "recursion": "string"
        },
        "time": {
            "_typeName": "string",
            "beginTime": "string",
            "endTime": "string"
        },
        "userName": {
            "_typeName": "string",
            "systemUser": false,
            "userList": [
                "string"
            ]
        },
        "eventChainId": 0,
        "alarm": {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        },
        "scheduledTask": {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        },
        "disableFullMessage": false,
        "category": [
            "string"
        ],
        "type": [
            "string"
        ],
        "tag": [
            "string"
        ],
        "eventTypeId": [
            "string"
        ],
        "maxCount": 0,
        "delayedInit": false,
        "auditable": false,
        "auditId": [
            "string"
        ]
    }
}
filter
Required

The event query filter.

Authentication
This operation uses the following authentication methods.
Responses
200

The event collector based on the filter.

Returns MoRefEventHistoryCollector of type(s) application/json
This response body class contains all of the following: MoRefHistoryCollector
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

InvalidArgument: if the filter is null or if any of its fields is invalid, such as an invalid reference to a managed object, alarm, or scheduled task, or an invalid event type or event chain id, etc.

InvalidState: if there are more than the maximum number of event collectors.

Returns InvalidState of type(s) application/json
This response body class contains all of the following: VimFault
{
    "_typeName": "string",
    "faultCause": {
        "_typeName": "string",
        "faultCause": "MethodFault Object",
        "faultMessage": [
            {
                "_typeName": "string",
                "key": "string",
                "arg": [
                    {
                        "_typeName": "string",
                        "key": "string",
                        "value": {
                            "_typeName": "string"
                        }
                    }
                ],
                "message": "string"
            }
        ]
    },
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}

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