Cis Tasks list

Cis Tasks list

Returns information about at most 1000 visible (subject to permission checks) tasks matching the Cis Tasks FilterSpec. All tasks must be in the same provider.

This operation was added in vSphere API 6.7.1.

Request
URI
POST
https://{api_host}/api/cis/tasks?action=list
COPY
Request Body

Request body for invoking operation: list

{
    "filter_spec": {
        "tasks": [
            "string"
        ],
        "services": [
            "string"
        ],
        "operations": [
            "string"
        ],
        "status": [
            "string"
        ],
        "targets": [
            {
                "type": "string",
                "id": "string"
            }
        ],
        "users": [
            "string"
        ]
    },
    "result_spec": "Cis Tasks GetSpec Object"
}
filter_spec
Optional

The Cis Tasks FilterSpec schema contains properties used to filter the results when listing tasks (see POST /cis/tasks?action=list). If multiple properties are specified, only tasks matching all of the properties match the filter.

Currently at least one of Cis Tasks FilterSpec.tasks or Cis Tasks FilterSpec.services must be specified and not empty.

This schema was added in vSphere API 6.7.1.

result_spec
Optional

The Cis Tasks GetSpec schema describes what data should be included when retrieving information about a task.

This schema was added in vSphere API 6.7.1.

Authentication
This operation uses the following authentication methods.
Responses
200

Map of task identifier to information about the task.

The key in the response map will be an identifier for the resource type: com.vmware.cis.task.

{
    "0": "C",
    "1": "i",
    "2": "s",
    "3": " ",
    "4": "T",
    "5": "a",
    "6": "s",
    "7": "k",
    "8": " ",
    "9": "I",
    "10": "n",
    "11": "f",
    "12": "o",
    "13": " ",
    "14": "O",
    "15": "b",
    "16": "j",
    "17": "e",
    "18": "c",
    "19": "t"
}

400

if any of the specified parameters are invalid.

Returns Vapi Std Errors InvalidArgument of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors InvalidArgument0
"Vapi Std Errors InvalidArgument Object"

401

if the user can not be authenticated.

Returns Vapi Std Errors Unauthenticated of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors Unauthenticated0
"Vapi Std Errors Unauthenticated Object"
string
challenge
Optional

Indicates the authentication challenges applicable to the target API provider. It can be used by a client to discover the correct authentication scheme to use. The exact syntax of the value is defined by the specific provider, the protocol and authentication schemes used.

For example, a provider using REST may adhere to the WWW-Authenticate HTTP header specification, RFC7235, section 4.1. In this case an example challenge value may be: SIGN realm="27da1358-2ba4-11e9-b210-d663bd873d93",sts="http://vcenter/sso?vsphere.local", Basic realm="vCenter"

This property was added in vSphere API 7.0.0.0.

This property is optional because it was added in a newer version than its parent node.


403

if the user doesn't have the required privileges.

Returns Vapi Std Errors Unauthorized of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors Unauthorized0
"Vapi Std Errors Unauthorized Object"

500

if a task's state cannot be accessed or over 1000 tasks matching the Cis Tasks FilterSpec.

Returns Vapi Std Errors ResourceInaccessible of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors ResourceInaccessible0
"Vapi Std Errors ResourceInaccessible Object"

503

if the system is unable to communicate with a service to complete the request.

Returns Vapi Std Errors ServiceUnavailable of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors ServiceUnavailable0
"Vapi Std Errors ServiceUnavailable Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/cis/tasks?action=list