How Do I Retrieve a List of All VMware Cloud Director Instances in Your Organization
You can fetch a list of all VMware Cloud Director instances deployed in your organization 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 organization ID (URN). See How Do I Retrieve the ID of My Organization.
- Obtain the environment ID (URN). See How Do I Retrieve the List of Environments in My Organization.
Procedure
- ♦
Run a GET request.
GET https://operatorUrl/environment/environmentUrn/organization/organizationUrn/instances
Here operatorUrl is the operator URL, for example vcdc-operator-prod-us-west-2.vdp.vmware.com.
Results
The response returns a list of all VMware Cloud Director instances deployed in the organization.
Example: Retrieve a List of the VMware Cloud Director Instances
This example retrieves a list of all
VMware Cloud
Director instances
deployed in a specific
environment.
GET https://vcdc-operator-prod-us-west-2.vdp.vmware.com/environment/urn:vcdc:environment:00000000-0000-0000-0000-000000000000/organization/urn:vcdc:organization:12345678-1234-1234-1234-123456789abc/instances
Use the bearer token in the
Authorization
header of the request.
Authorization: Bearer eyJh…I1NiIs
The response returns a list of the VMware Cloud Director instances.
{ "resultTotal": 2, "pageCount": 1, "page": 1, "pageSize": 10, "values": [ { "id": "urn:vcdc:vcdInstance:33333333-3333-3333-3333-33333333333", "name": "vcdInstance4", "environmentId": "urn:vcdc:environment:00000000-0000-0000-0000-00000000000", "domain": "defiant.us-west-2.vdp-prod-us-west-2.vmware.com", "instanceParams": { "parameter1": "value1", "parameter2": "value2", "parameter3": "value3" }, "activeTask": null, "environment": { "id": "urn:vcdc:environment:00000000-0000-0000-0000-000000000000", "name": "test-environment", "location": "us-west-2", "url": "" }, "environmentResources": [] }, { "id": "urn:vcdc:vcdInstance:44444444-4444-4444-4444-4444444444", "name": "st1", "environmentId": "urn:vcdc:environment:00000000-0000-0000-0000-000000000000", "domain": "st1.us-west-2.vdp-prod-us-west-2.vmware.com", "instanceParams": { "parameter4": "value4", "parameter5": "value5", }, "activeTask": null, "environment": { "id": "urn:vcdc:environment:00000000-0000-0000-0000-000000000000", "name": "test-environment", "location": "us-west-2", "url": "" }, "environmentResources": [] } ] }