Tasks APIs
APIs for managing Tasks
Table of Contents
1. Get the Tasks
1.1. Prerequisites
None
1.2. Steps
- Invoke the API
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/tasks' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/tasks HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2106
{
"elements" : [ {
"id" : "300ac702-0f7b-49a5-8906-46cc6c29a6f6",
"name" : "Commissioning host(s) sfo01-w01-esx05.rainpole.io to VMware Cloud Foundation",
"status" : "Failed",
"creationTimestamp" : "2019-06-20T12:03:18.890Z",
"subTasks" : [ {
"name" : "HostVibValidationAction",
"description" : "Validate the hosts for any disallowed VIBS",
"status" : "SUCCESSFUL",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
}, {
"name" : "HostMaintenanceModeValidationAction",
"description" : "Verifies that none of the hosts are in maintenance mode",
"status" : "FAILED",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
}, {
"name" : "FetchDnsAndNtpAction",
"description" : "Fetches DNS \\u0026 NTP IPs",
"status" : "PENDING",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
} ],
"errors" : [ {
"errorCode" : "COMMISION_HOST_FAILED",
"errorType" : "ERROR",
"message" : "Failed to Commissioning host(s) sfo01-w01-esx05.rainpole.io to VMware Cloud Foundation",
"causes" : [ ]
} ],
"resources" : [ {
"resourceId" : "870d83cd-1685-483e-b797-fdda206da680",
"type" : "HOST"
} ],
"resolutionStatus" : "UNRESOLVED",
"isCancellable" : false,
"isRetryable" : false
}, {
"id" : "5c005243-260a-4f08-b4cd-55a151b510b0",
"name" : "Credentials rotate operation",
"status" : "Successful",
"creationTimestamp" : "2019-06-20T12:03:18.890Z",
"subTasks" : [ {
"name" : "sfo-vcf01.rainpole.io:FTP",
"description" : "Password rotate for sfo-vcf01.rainpole.io and credential type FTP",
"status" : "SUCCESSFUL",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
} ],
"errors" : [ ],
"resources" : [ {
"resourceId" : "44930e92-e020-4faa-8476-d02b653a6df4",
"type" : "HOST"
} ],
"resolutionStatus" : "UNRESOLVED",
"isCancellable" : false,
"isRetryable" : false
} ],
"pageMetadata" : {
"pageNumber" : 1,
"pageSize" : 10,
"totalElements" : 2,
"totalPages" : 1
}
}
1.3. Related APIs
[_gettasks] API [_gettask] API
2. Get a Task
2.1. Prerequisites
The following data is required
- ID of the task
2.2. Steps
- Invoke the API by providing the ID of the task as input.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/tasks/06a882ba-616e-46e6-a8f3-a26e9ad6ecf2' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/tasks/06a882ba-616e-46e6-a8f3-a26e9ad6ecf2 HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 985
{
"id" : "06a882ba-616e-46e6-a8f3-a26e9ad6ecf2",
"name" : "Vi workload Domain Creation",
"status" : "FAILED",
"creationTimestamp" : "1970-01-21T04:02:30.172Z",
"subTasks" : [ {
"name" : "HostVibValidationAction",
"description" : "Validate the hosts for any disallowed VIBS",
"status" : "SUCCESSFUL",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
}, {
"name" : "HostMaintenanceModeValidationAction",
"description" : "Verifies that none of the hosts are in maintenance mode",
"status" : "FAILED",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
}, {
"name" : "FetchDnsAndNtpAction",
"description" : "Fetches DNS \\u0026 NTP IPs",
"status" : "PENDING",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
} ],
"errors" : [ ],
"resources" : [ {
"resourceId" : "9c2abafc-7ba0-42e7-81dc-c216de332018",
"type" : "HOST"
} ],
"resolutionStatus" : "UNRESOLVED",
"isCancellable" : false,
"isRetryable" : false
}
2.3. Related APIs
[_gettasks] API [_gettask] API
3. Retry a Task
Used to retry a failed task/workflow.
3.1. Prerequisites
The following data is required
- ID of the failed task
3.2. Steps
- Invoke the API by providing the ID of the task as input.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/tasks/a69c232c-5ddb-46c2-8384-56d62434de44' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
PATCH /v1/tasks/a69c232c-5ddb-46c2-8384-56d62434de44 HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Note : The credentials' update/rotate password tasks cannot be retried using this API. Refer to Retry a failed credentials task for a given ID API section.
3.3. Related APIs
[_gettasks] API
[_gettask] API
Last updated 2025-03-21 15:13:04 +0530