How Do I Retrieve the ID of My Organization

You can retrieve the ID (URN) of your VMware Cloud services platform 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.

Procedure

  • Run a GET request.
    GET https://operatorUrl/organization

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

Results

The response returns the ID of the organization associated with your token. You need the ID of your organization, so that you can run requests against the organization. For example, to retrieve a list of the environments associated with it.

Example: Retrieve the ID of Your Organization

This example retrieves the ID of the organization associated with your token. Run a GET request with the bearer token that you generated in the Authorization header of the request.

GET https://vcdc-operator-prod-us-west-2.vdp.vmware.com/organization/
Use the bearer token in the Authorization header of the request.
Authorization: 
Bearer eyJh…I1NiIs

The response returns the ID (URN) of the organization associated with your token.

{
  "id": "urn:vcdc:organization:12345678-1234-1234-1234-123456789abc"
}

What to do next

Retrieve the list of environments in your organization.