Get Tasks

Get Tasks

Get the tasks

Request
URI
GET
https://{api_host}/v1/tasks
COPY
Query Parameters
integer
limit
Optional

The number of elements to be returned in the result

string
taskStatus
Optional

taskStatus

string
taskType
Optional

taskType

string
resourceId
Optional

resourceId

string
resourceType
Optional

resourceType

integer
completedAfter
Optional

A time based filter to get tasks which are completed after the given timestamp. A task is completed if its status is 'Successful' or 'Failed'. Time is in milliseconds.

integer
pageNumber
Optional

Page number.

integer
pageSize
Optional

Size of the page you want to retrieve. Max page size allowed is 100.

string
orderDirection
Optional

orderDirection

string
orderBy
Optional

orderBy

string
taskName
Optional

Search filter when task name contains text.


Responses
200

Returns the list of tasks.

Returns PageOfTask of type(s) application/json
{
    "elements": [
        {
            "id": "string",
            "name": "string",
            "localizableDescriptionPack": {
                "component": "string",
                "messageKey": "string",
                "arguments": [
                    "string"
                ],
                "message": "string",
                "bundle": "string"
            },
            "type": "Sample values: HOST_COMMISSION, HOST_DECOMMISSION",
            "status": "One among: PENDING, Pending, IN_PROGRESS, In Progress, SUCCESSFUL, Successful, FAILED, Failed, CANCELLED, Cancelled, COMPLETED_WITH_WARNING, SKIPPED",
            "creationTimestamp": "string",
            "completionTimestamp": "string",
            "subTasks": [
                {
                    "name": "string",
                    "type": "string",
                    "description": "string",
                    "status": "One among: PENDING, IN_PROGRESS, SUCCESSFUL, FAILED, NOT_APPLICABLE",
                    "creationTimestamp": "string",
                    "completionTimestamp": "string",
                    "stages": [
                        {
                            "name": "string",
                            "type": "string",
                            "description": "string",
                            "status": "One among: PENDING, IN_PROGRESS, SUCCESSFUL, FAILED",
                            "creationTimestamp": "string",
                            "completionTimestamp": "string",
                            "errors": [
                                {
                                    "errorCode": "string",
                                    "errorType": "string",
                                    "arguments": [
                                        "string"
                                    ],
                                    "context": {
                                        "context": "string"
                                    },
                                    "message": "string",
                                    "remediationMessage": "string",
                                    "causes": [
                                        {
                                            "type": "string",
                                            "message": "string"
                                        }
                                    ],
                                    "nestedErrors": [
                                        "Error Object"
                                    ],
                                    "referenceToken": "string"
                                }
                            ]
                        }
                    ],
                    "errors": [
                        {
                            "errorCode": "string",
                            "errorType": "string",
                            "arguments": [
                                "string"
                            ],
                            "context": {
                                "context": "string"
                            },
                            "message": "string",
                            "remediationMessage": "string",
                            "causes": [
                                {
                                    "type": "string",
                                    "message": "string"
                                }
                            ],
                            "nestedErrors": [
                                "Error Object"
                            ],
                            "referenceToken": "string"
                        }
                    ],
                    "resources": [
                        {
                            "resourceId": "BE8A5E04-92A0-43F6-A166-AA041F4327CC",
                            "fqdn": "sfo-vc01.rainpole.io",
                            "type": "One among: SDDC_MANAGER, PSC, VCENTER, NSX_MANAGER, NSXT_MANAGER, VRA, VRLI, VROPS, VRSLCM, VXRAIL_MANAGER, NSX_ALB, ESXI",
                            "name": "string",
                            "sans": [
                                "sfo-vc01.rainpole.io"
                            ]
                        }
                    ],
                    "subTasks": [
                        "SubTask Object"
                    ]
                }
            ],
            "errors": [
                {
                    "errorCode": "string",
                    "errorType": "string",
                    "arguments": [
                        "string"
                    ],
                    "context": {
                        "context": "string"
                    },
                    "message": "string",
                    "remediationMessage": "string",
                    "causes": [
                        {
                            "type": "string",
                            "message": "string"
                        }
                    ],
                    "nestedErrors": [
                        "Error Object"
                    ],
                    "referenceToken": "string"
                }
            ],
            "resources": [
                {
                    "resourceId": "BE8A5E04-92A0-43F6-A166-AA041F4327CC",
                    "fqdn": "sfo-vc01.rainpole.io",
                    "type": "One among: SDDC_MANAGER, PSC, VCENTER, NSX_MANAGER, NSXT_MANAGER, VRA, VRLI, VROPS, VRSLCM, VXRAIL_MANAGER, NSX_ALB, ESXI",
                    "name": "string",
                    "sans": [
                        "sfo-vc01.rainpole.io"
                    ]
                }
            ],
            "resolutionStatus": "Can have only one of the two values: RESOLVED or UNRESOLVED",
            "isCancellable": false,
            "isRetryable": false
        }
    ],
    "pageMetadata": {
        "pageNumber": 0,
        "pageSize": 0,
        "totalElements": 0,
        "totalPages": 0
    }
}
array of object
elements
Optional

The list of elements included in this page

object
pageMetadata
Optional

Represents pageable elements pagination metadata


500

Unexpected error

Returns Error of type(s) application/json
"Error Object"
string
errorCode
Optional

The minor error code

string
errorType
Optional

The error type

array of string
arguments
Optional

The arguments used to localize the message, Can be used by scripts to automate the error processing.

object
context
Optional

The error context (e.g. the component where it occurred).

string
message
Optional

The localized error message

string
remediationMessage
Optional

The localized remediation error message

array of object
causes
Optional

The underlying cause exceptions.

array of Error
nestedErrors
Optional

The nested errors when the error is a composite one

string
referenceToken
Optional

A reference token correlating the error with the relevant detailed error logs. Should be sent to the service provider when reporting issues.


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