[{"label":"Latest (4.4.0)","version":"latest"},{"version":"4.3.1"},{"link":"https://developer.vmware.com/apis/1126/vmware-cloud-foundation","version":"4.3"},{"link":"https://developer.vmware.com/apis/1077/vmware-cloud-foundation","version":"4.2"},{"link":"https://developer.vmware.com/apis/1032/vmware-cloud-foundation","version":"4.1"},{"link":"https://developer.vmware.com/apis/1002/vmware-cloud-foundation","version":"4.0.1"},{"link":"https://developer.vmware.com/apis/921/vmware-cloud-foundation","version":"4.0"},{"link":"https://developer.vmware.com/apis/925/vmware-cloud-foundation","version":"3.10"},{"link":"https://developer.vmware.com/apis/891/vmware-cloud-foundation","version":"3.9.1"},{"link":"https://developer.vmware.com/apis/723/vmware-cloud-foundation","version":"3.9.0"},{"link":"https://developer.vmware.com/apis/711/vmware-cloud-foundation","version":"3.8.1"},{"link":"https://developer.vmware.com/apis/685/vmware-cloud-foundation","version":"3.8"}]
vcf
VMware Cloud Foundation API Reference Guide
Tasks
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: 1937
{
"elements" : [ {
"id" : "9d63e8b9-fa17-4465-912a-69aa1f2a2840",
"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" : "2478efd9-9882-469f-9d74-629dddf760a0",
"type" : "HOST"
} ],
"resolutionStatus" : "UNRESOLVED",
"isCancellable" : false
}, {
"id" : "4d3736c1-7345-4c20-a778-5e46f9715036",
"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" : "d8c1f4a4-bfdf-4889-a2dc-e486cf598337",
"type" : "HOST"
} ],
"resolutionStatus" : "UNRESOLVED",
"isCancellable" : false
} ]
}
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/55831ff0-76fe-4944-9682-d73d9612a02e' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/tasks/55831ff0-76fe-4944-9682-d73d9612a02e 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: 960
{
"id" : "55831ff0-76fe-4944-9682-d73d9612a02e",
"name" : "Vi workload Domain Creation",
"status" : "FAILED",
"creationTimestamp" : "1970-01-20T01:47:10.561Z",
"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" : "3ed1aedb-6f54-4d38-93d4-fb4d16a7c6f5",
"type" : "HOST"
} ],
"resolutionStatus" : "UNRESOLVED",
"isCancellable" : false
}
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/67536cfe-d379-44cd-809e-6a4b9590e32c' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
PATCH /v1/tasks/67536cfe-d379-44cd-809e-6a4b9590e32c 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.
Last updated 2022-05-10 11:15:18 PDT
Operations
delete
get
get
patch
[{"label":"Latest (4.4.0)","version":"latest"},{"version":"4.3.1"},{"link":"https://developer.vmware.com/apis/1126/vmware-cloud-foundation","version":"4.3"},{"link":"https://developer.vmware.com/apis/1077/vmware-cloud-foundation","version":"4.2"},{"link":"https://developer.vmware.com/apis/1032/vmware-cloud-foundation","version":"4.1"},{"link":"https://developer.vmware.com/apis/1002/vmware-cloud-foundation","version":"4.0.1"},{"link":"https://developer.vmware.com/apis/921/vmware-cloud-foundation","version":"4.0"},{"link":"https://developer.vmware.com/apis/925/vmware-cloud-foundation","version":"3.10"},{"link":"https://developer.vmware.com/apis/891/vmware-cloud-foundation","version":"3.9.1"},{"link":"https://developer.vmware.com/apis/723/vmware-cloud-foundation","version":"3.9.0"},{"link":"https://developer.vmware.com/apis/711/vmware-cloud-foundation","version":"3.8.1"},{"link":"https://developer.vmware.com/apis/685/vmware-cloud-foundation","version":"3.8"}]
vcf