How Do I Retrieve Details About a Single Task
You can retrieve details about a single task by using the VMware Cloud Director service API.
Prerequisites
- Verify that you are assigned the Provider Administrator or the Provider Support role.
- Obtain an API token from the organization you want to manage and exchange it
for an access bearer token. Use the bearer token in the
Authorization
header when you run API calls. See How Do I Generate an API Token. - Obtain the environment ID (URN). See How Do I Retrieve the List of Environments in My Organization.
- Obtain the task ID (URN). See How Do I Retrieve Information About All Tasks.
Procedure
- ♦
Run a GET request by using the
ID of the task you want to retrieve details about.
GET https://operatorUrl/environment/environmentUrn/tasks/taskUrn
Here operatorUrl is the operator URL, for example vcdc-operator-prod-us-west-2.vdp.vmware.com.
Results
The response returns information about the selected task.
Example: Retrieve Details About a Single Task
This example retrieves information about
a single
task.
GET https://vcdc-operator-prod-us-west-2.vdp.vmware.com/environments/urn:vcdc:environment:00000000-0000-0000-0000-0000000000/tasks/urn:vcdc:task:22222222-2222-2222-2222-22222222222
Use the bearer token in the
Authorization
header of the request.
Authorization: Bearer eyJh…I1NiIs
The response returns information about the task.
{ "id": "urn:vcdc:task:22222222-2222-2222-2222-22222222222", "entityId": "urn:vcdc:entity:33333333-3333-3333-3333-333333333333", "entityName": null, "percentComplete": 0, "status": "FAILED", "startTime": "2020-10-11T10:25:12.680109-04:00", "endTime": "2020-10-11T00:00:00-04:00", "message": "java.lang.IllegalStateException: System setup encountered an error", "output": {} }