Get Tasks
Returns information about a task.
Request
URLURL
Path Parameters
Path Parameters
Task identifier. The parameter must be an identifier for the resource type: com.vmware.cis.task.
Query Parameters
Query Parameters
If true, the result will not be included in the task information, otherwise it will be included. If unset, the result of the operation will be included in the task information.
If true, all data, including operation-specific data, will be returned, otherwise only the data described in Info will be returned. If unset, only the data described in Info will be returned.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Authentication
Response
Response BodyResponse Body
Information about the specified 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.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.resource_inaccessible : if the task’s state cannot be accessed.
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
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: get
x-vmw-doc-deprecated-path: /rest/cis/tasks/{task}
x-vmw-doc-operation: get