Task Manager Create Collector For Tasks

Task Manager Create Collector For Tasks

Creates a TaskHistoryCollector, a specialized HistoryCollector that gathers TaskInfo data objects.

A TaskHistoryCollector does not persist beyond the current client session.

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/TaskManager/{moId}/CreateCollectorForTasks
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 TaskManager/{moId}.

string
release
Required

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


Request Body
CreateCollectorForTasksRequestType of type(s) application/json
Required
{
    "filter": {
        "_typeName": "string",
        "entity": {
            "_typeName": "string",
            "entity": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            },
            "recursion": "string"
        },
        "time": {
            "_typeName": "string",
            "timeType": "string",
            "beginTime": "string",
            "endTime": "string"
        },
        "userName": {
            "_typeName": "string",
            "systemUser": false,
            "userList": [
                "string"
            ]
        },
        "activationId": [
            "string"
        ],
        "state": [
            "string"
        ],
        "alarm": {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        },
        "scheduledTask": {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        },
        "eventChainId": [
            0
        ],
        "tag": [
            "string"
        ],
        "parentTaskKey": [
            "string"
        ],
        "rootTaskKey": [
            "string"
        ]
    }
}
filter
Required

This data object type defines the specification for the task filter used to query tasks in the history collector database.

The client creates a task history collector with a filter specification, then retrieves the tasks from the task history collector.

Authentication
This operation uses the following authentication methods.
Responses
200

The task collector based on the filter.

Returns MoRefTaskHistoryCollector 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 unknown.

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

NotSupported: if called directly on a host.

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