List Tasks
Returns information about at most 1000 visible (subject to permission checks) tasks matching the Tasks.FilterSpec. All tasks must be in the same provider.
Request
URLURL
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"filter_spec": {}
}
Specification of matching tasks. This is currently required. In the future, if it is unset, the behavior is equivalent to a Tasks.FilterSpec with all fields unset which means all tasks match the filter.
Specification of what to return for a task. If unset, the behavior is equivalent to a Tasks.GetSpec with all fields unset which means only the data describe in Info will be returned and the result of the operation will be return.
Authentication
Response
Response BodyResponse Body
map
of
TaskInfo
of type application/json
Map of task identifier to information about the task. The key in the result map will be an identifier for the resource type: com.vmware.cis.task.
{
"cancelable": false,
"description": {
"args": [
"string"
],
"default_message": "string",
"id": "string",
"localized": "string",
"params": {
"key": {
"d": 0,
"dt": "string",
"format": "SHORT_DATE",
"i": 0,
"l": {
"id": "string",
"params": "StdLocalizationParam Object"
},
"precision": 0,
"s": "string"
}
}
},
"end_time": "string",
"error": {},
"operation": "string",
"parent": "string",
"progress": {
"completed": 0,
"message": {
"args": [
"string"
],
"default_message": "string",
"id": "string",
"localized": "string",
"params": {
"key": {
"d": 0,
"dt": "string",
"format": "SHORT_DATE",
"i": 0,
"l": {
"id": "string",
"params": "StdLocalizationParam Object"
},
"precision": 0,
"s": "string"
}
}
},
"total": 0
},
"service": "string",
"start_time": "string",
"status": "PENDING",
"target": {
"id": "string",
"type": "string"
},
"user": "string"
}
Flag to indicate whether or not the operation can be cancelled. The value may change as the operation progresses.
The Status enumerated type defines the status values that can be reported for an operation.
PENDING : The operation is in pending state.
RUNNING : The operation is in progress.
BLOCKED : The operation is blocked.
SUCCEEDED : The operation completed successfully.
FAILED : The operation failed.
Possible values are: PENDING , RUNNING , BLOCKED , SUCCEEDED , FAILED
Identifier of the service containing the operation. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vapi.service. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vapi.service.
Identifier of the operation associated with the task. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vapi.operation. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vapi.operation.
Parent of the current task. This field will be unset if the task has no parent. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.cis.task. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.cis.task.
Progress of the operation. This field is optional and it is only relevant when the value of CommonInfo.status is one of RUNNING, BLOCKED, SUCCEEDED, or FAILED.
Result of the operation. If an operation reports partial results before it completes, this field could be set before the CommonInfo.status has the value SUCCEEDED. The value could change as the operation progresses.
This field will be unset if the operation does not return a result or if the result is not available at the current step of the operation.
Description of the error if the operation status is “FAILED”. If unset the description of why the operation failed will be included in the result of the operation (see Info.result).
Time when the operation is started. This field is optional and it is only relevant when the value of CommonInfo.status is one of RUNNING, BLOCKED, SUCCEEDED, or FAILED.
Time when the operation is completed. This field is optional and it is only relevant when the value of CommonInfo.status is one of SUCCEEDED or FAILED.
Identifier of the target created by the operation or an existing one the operation performed on. This field will be unset if the operation has no target or multiple targets.
Name of the user who performed the operation. This field will be unset if the operation is performed by the system.
Errors
com.vmware.vapi.std.errors.invalid_argument : if any of the specified parameters are invalid.
com.vmware.vapi.std.errors.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.resource_inaccessible : if a task’s state cannot be accessed or over 1000 tasks matching the Tasks.FilterSpec.
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: get
x-vmw-doc-deprecated-path: /rest/cis/tasks
x-vmw-doc-operation: list