Get One

Get One

Retrieve the current state of the task. The outcome (failure or success) is not available yet. NOTE: User A is not allowed to "see" user B's tasks. NOTE: Different tasks have different result types. NOTE: During the task execution, warnings may occur. Those indicate a failure, which is not considered critical. The execution will continue as if nothing happened.

Request
URI
GET
https://{api_host}//tasks/{taskId}
COPY
Path Parameters
string
taskId
Required

UUID of the task

taskId example
f61d60d2-698a-46dc-a266-88df27644956
Query Parameters
string
site
Optional

Optional site to retrieve the task from. Could be a remote site or the local one.

site example
site1
Header Parameters
string
Accept
Optional

Accept

string
operationID
Optional

Operation ID for correlating logs across multiple services


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns C4ApiTaskOfobject of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "endTime": 1499929558827,
    "error": {
        "args": [
            "string"
        ],
        "code": "string",
        "msg": "string",
        "stacktrace": "string"
    },
    "id": "f61d60d2-698a-46dc-a266-88df27644956",
    "lastUpdated": 1499929558827,
    "progress": 100,
    "resultType": "string",
    "site": "site2",
    "startTime": 1499929548951,
    "state": "SUCCEEDED",
    "user": "root",
    "warnings": [],
    "workflowInfo": {
        "resourceId": "C4VAPP-ccbe771e-b685-46c7-8c7a-4ed36915d963",
        "resourceName": "my vapp 1",
        "resourceType": "vappReplication",
        "type": "sync"
    }
}
integer As int64 As int64
endTime
Optional

Timestamp (in msec) of the task's completion time. -1 means the task hasn't completed.

error
Optional

error

string As uuid As uuid
id
Optional

The unique identifier of the long-running task. It is unique and can be used for monitoring.

integer As int64 As int64
lastUpdated
Optional

Timestamp (in msec) of the last task status update.

integer As int32 As int32
progress
Optional

Percentage-based progress of the task.

object
result
Optional

The result of the task. Populated only if the execution was successful.

string
resultType
Optional

Indicates the type of the task result. Populated only if the execution was successful.

string
site
Optional

Site on which the task runs.

integer As int64 As int64
startTime
Optional

Timestamp (in msec) of the task's creation time.

string
state
Optional

The current state of the task. States: [RUNNING, SUCCEEDED, FAILED]

Possible values are : RUNNING, SUCCEEDED, FAILED,
string
user
Optional

The user who started the task.

warnings
Optional

Warnings, which occurred during the task execution.

workflowInfo
Optional

workflowInfo


400

Returned error codes include (but are not limited to):

  • BadUserInput
Returns ApiError of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "args": [
        "string"
    ],
    "code": "string",
    "msg": "string",
    "stacktrace": "string"
}
array of string
args
Optional

Positional arguments.

string
code
Optional

Specific error code.

string
msg
Optional

Detailed error message.

string
stacktrace
Optional

Exception stacktrace.


401

Returned error codes include (but are not limited to):

  • NotAuthenticated
  • RemoteAuthenticationFailure
Returns ApiError of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "args": [
        "string"
    ],
    "code": "string",
    "msg": "string",
    "stacktrace": "string"
}
array of string
args
Optional

Positional arguments.

string
code
Optional

Specific error code.

string
msg
Optional

Detailed error message.

string
stacktrace
Optional

Exception stacktrace.


404

Returned error codes include (but are not limited to):

  • SiteNotFound
  • TaskNotFound
Returns ApiError of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "args": [
        "string"
    ],
    "code": "string",
    "msg": "string",
    "stacktrace": "string"
}
array of string
args
Optional

Positional arguments.

string
code
Optional

Specific error code.

string
msg
Optional

Detailed error message.

string
stacktrace
Optional

Exception stacktrace.


500

Returned error codes include (but are not limited to):

  • GeneralServerFailure
Returns ApiError of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "args": [
        "string"
    ],
    "code": "string",
    "msg": "string",
    "stacktrace": "string"
}
array of string
args
Optional

Positional arguments.

string
code
Optional

Specific error code.

string
msg
Optional

Detailed error message.

string
stacktrace
Optional

Exception stacktrace.