Snapservice. Tasks List

Snapservice. Tasks List

Returns information about at most 1000 visible (subject to permission checks) tasks matching the Snapservice.Tasks.FilterSpec.

This operation was added in vSphere API 8.0.3.0.

Returns an authorization error if you do not have all of the privileges described as follows:

  • Operation execution requires System.Read.
Request
URI
GET
https://{host}/api/snapservice/tasks
COPY
Query Parameters
string of array
tasks
Optional

Identifiers of tasks that can match the filter.

This property was added in vSphere API 8.0.3.0.

This property may be missing or null if other filters are specified. If missing or null or empty, tasks with any identifier will match the filter.

When clients pass a value of this schema as a parameter, the property must contain identifiers for the resource type: com.vmware.snapservice.task. When operations return a value of this schema as a response, the property will contain identifiers for the resource type: com.vmware.snapservice.task.

string of array
operations
Optional

Identifiers of operations. Tasks created by these operations match the filter (see Snapservice.Tasks.CommonInfo.operation).

This property was added in vSphere API 8.0.3.0.

If missing or null or empty, tasks associated with any operation will match the filter.

When clients pass a value of this schema as a parameter, the property must contain identifiers for the resource type: com.vmware.snapservice.operation. When operations return a value of this schema as a response, the property will contain identifiers for the resource type: com.vmware.snapservice.operation.

string of array
services
Optional

Identifiers of services. Tasks created by operations in these services match the filter (see Snapservice.Tasks.CommonInfo.service).

This property was added in vSphere API 8.0.3.0.

This property may be missing or null if tasks is specified. If this property is missing or null or empty, tasks for any service will match the filter.

When clients pass a value of this schema as a parameter, the property must contain identifiers for the resource type: com.vmware.snapservice.service. When operations return a value of this schema as a response, the property will contain identifiers for the resource type: com.vmware.snapservice.service.

string of array
status
Optional

Status that a task must have to match the filter (see Snapservice.Tasks.CommonInfo.status).

Possible values:

  • PENDING: The operation is in pending state.
  • RUNNING: The operation is in progress.
  • BLOCKED: The operation is blocked.

The operation could be blocked if the system is waiting for resources to be available to perform the operation.

  • SUCCEEDED: The operation completed successfully.
  • FAILED: The operation failed.

For more information see: Snapservice.Tasks.Status.

This property was added in vSphere API 8.0.3.0.

If missing or null or empty, tasks with any status match the filter.

string of array
users
Optional

Users who must have initiated the operation for the associated task to match the filter (see Snapservice.Tasks.CommonInfo.user).

This property was added in vSphere API 8.0.3.0.

If missing or null or empty, tasks associated with operations initiated by any user match the filter.


Authentication
This operation uses the following authentication methods.
Responses
200

ListResult including details of all the tasks.

Returns Snapservice.Tasks.ListResult of type(s) application/json
"Snapservice.Tasks.ListResult Object"

400

if any of the specified parameters are invalid.

Returns Vapi.Std.Errors.InvalidArgument of type(s) application/json
"Vapi.Std.Errors.InvalidArgument Object"

401

if the user can not be authenticated.

Returns Vapi.Std.Errors.Unauthenticated of type(s) application/json
"Vapi.Std.Errors.Unauthenticated Object"

403

if the user doesn't have the required privileges.

Returns Vapi.Std.Errors.Unauthorized of type(s) application/json
"Vapi.Std.Errors.Unauthorized Object"

500

Vapi.Std.Errors.Error if the system reports an error while responding to the request.

Vapi.Std.Errors.ResourceInaccessible if a task's state cannot be accessed or over 1000 tasks matching the Snapservice.Tasks.FilterSpec.

Returns Vapi.Std.Errors.Error of type(s) application/json
"Vapi.Std.Errors.Error 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
"Vapi.Std.Errors.ServiceUnavailable Object"

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/snapservice/tasks