Tasks APIs

Tasks APIs

APIs for managing Tasks

Table of Contents

1. Get the Tasks

1.1. Prerequisites API

None

1.2. Steps API

  • 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" : "70fbc3ac-edcc-417d-8681-1c8d0ae6736a",
    "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" : "285e8117-8f79-4625-a929-2a8df61c73be",
      "type" : "HOST"
    } ],
    "resolutionStatus" : "UNRESOLVED",
    "isCancellable" : false,
    "isRetryable" : false
  }, {
    "id" : "63372274-1121-430b-9ce8-cbc762b11337",
    "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" : "c220685b-a84f-4bea-aa5c-6ebd3a4393d5",
      "type" : "HOST"
    } ],
    "resolutionStatus" : "UNRESOLVED",
    "isCancellable" : false,
    "isRetryable" : false
  } ],
  "pageMetadata" : {
    "pageNumber" : 1,
    "pageSize" : 10,
    "totalElements" : 2,
    "totalPages" : 1
  }
}

[_gettasks] API [_gettask] API

2. Get a Task

2.1. Prerequisites API

The following data is required

  • ID of the task

2.2. Steps API

  • Invoke the API by providing the ID of the task as input.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/tasks/1c915048-0c67-4c49-8690-b18549071381' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/tasks/1c915048-0c67-4c49-8690-b18549071381 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" : "1c915048-0c67-4c49-8690-b18549071381",
  "name" : "Vi workload Domain Creation",
  "status" : "FAILED",
  "creationTimestamp" : "1970-01-21T06:52:48.075Z",
  "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" : "cd4732c2-6541-444f-94ff-d6449db6502e",
    "type" : "HOST"
  } ],
  "resolutionStatus" : "UNRESOLVED",
  "isCancellable" : false,
  "isRetryable" : false
}

[_gettasks] API [_gettask] API

3. Retry a Task

Used to retry a failed task/workflow.

3.1. Prerequisites API

The following data is required

  • ID of the failed task

3.2. Steps API

  • Invoke the API by providing the ID of the task as input.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/tasks/3ee54a9a-d814-47c3-8690-fa80e58b8938' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

PATCH /v1/tasks/3ee54a9a-d814-47c3-8690-fa80e58b8938 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.

[_gettasks] API [_gettask] API
Last updated 2025-07-17 07:18:23 -0700

Operations
GET
Get Task
Retrieve a task by its ID
DELETE
Cancel Task
Cancel a Task
PATCH
Retry Task
Retry a Task
GET
Get Tasks
Retrieve a list of all tasks