How Do I Retrieve Information About All Tasks

You can retrieve details about all tasks in an environment of your organization by using the VMware Cloud Director service API.

Prerequisites

Procedure

  • Run a GET request.
    GET https://operatorUrl/environment/environmentUrn/organization/organizationUrn/tasks

    Here operatorUrl is the operator URL, for example vcdc-operator-prod-us-west-2.vdp.vmware.com.

Results

The response returns information about the tasks in the environment.

Example: Retrieve Details About All Tasks

This example retrieves information about all tasks in an environment.
GET https://vcdc-operator-prod-us-west-2.vdp.vmware.com/environments/urn:vcdc:environment:00000000-0000-0000-0000-0000000000/organization/urn:vcdc:organization:12345678-1234-1234-1234-123456789abc/tasks
Use the bearer token in the Authorization header of the request.
Authorization: 
Bearer eyJh…I1NiIs

The response returns information about the tasks in the environment.

{
    "resultTotal": 14225,
    "pageCount": 475,
    "page": 1,
    "pageSize": 30,
    "valueType": "Tasks",
    "values": [
        {
            "id": "urn:vcdc:task:22222222-2222-2222-2222-222222222222",
            "entityId": "urn:vcdc:entity:5100ac23-6de7-4baf-97c4-4be53def8210",
            "entityName": null,
            "percentComplete": 0,
            "status": "IN_PROGRESS",
            "startTime": null,
            "endTime": null,
            "message": "Reset provider admin password",
            "output": {}
        },
        {
            "id": "urn:vcdc:task:44444444-4444-4444-4444-44444444444,
            "entityId": "urn:vcdc:entity:5100ac23-6de7-4baf-97c4-4be53def8210",
            "entityName": null,
            "percentComplete": 0,
            "status": "FAILED",
            "startTime": "2019-10-11T10:25:12.680109-04:00",
            "endTime": "2019-10-11T00:00:00-04:00",
            "message": "java.lang.IllegalStateException: System setup encountered an error",
            "output": {}
        },
        {
            "id": "urn:vcdc:task:55555555-5555-5555-5555-55555555555",
            "entityId": "urn:vcdc:entity:5100ac23-6de7-4baf-97c4-4be53def8210",
            "entityName": null,
            "percentComplete": 100,
            "status": "SUCCESS",
            "startTime": "2019-09-26T13:47:30.656977-04:00",
            "endTime": "2019-09-26T00:00:00-04:00",
            "message": "",
            "output": {}