Syntax for Displaying Your Current Tenants

GET /api/tenants lists all the vRealize Automation tenants in your system.

Input

Use the supported input parameters to control the command output.

Parameter Description
URL https://$vRA/identity/api/tenants
$vRA

Specifies the appliance name and fully qualified domain name, or IP address of the vRealize Automation server.

$token

Specifies a valid HTTP bearer token with necessary credentials.

Output

The command output contains property names and values based on the command input parameters.

Parameter Description

Links

Specifies an array of link objects, each of which contains the following parts:

  • rel: Specifies the name of the link.
    • Self refers to the object that was returned or requested. This parameter does not appear when you query a single profile.
    • First, Previous, Next, and Last refer to corresponding pages of pageable lists.
    • Specifies the application or service that determines the other names.
  • href: Specifies the URL that produces the result.

Content

Specifies an array of data rows, each of which represents one of the tenant objects returned in a pageable list. Each tenant object can contain the following information:

  • Id: Specifies the unique tenant identifier.
  • urlName: Specifies the name of the tenant as it appears in URLs.
  • Name: Specifies the name of the tenant for display purposes.
  • description: Specifies the long description of the tenant.
  • contactEmail: Specifies the primary contact email address.
  • Password: Unused
  • defaultTenant: Is set to True if the corresponding tenant is the default tenant (vsphere.local).

Metadata

Specifies the following paging-related data:
  • Size: Specifies the maximum number of rows per page.
  • totalElement: Specifies the number of rows returned. This parameter is not output when you query for a single profile.
  • totalPages: Specifies the total number of pages of data available.
  • Number: Specifies the current page number.
  • Offset: Specifies the number of rows skipped.
  • Size: Specifies the maximum number of rows per page.
  • totalElement: Specifies the number of rows returned. This parameter is not output when you query for a single profile.
  • totalPages: Specifies the total number of pages of data available.
  • Number: Specifies the current page number.
  • Offset: Specifies the number of rows skipped.

curl Command to Display Current Tenants

The following example command displays all available tenants.

curl --insecure -H "Accept:application/json" -H "Authorization: Bearer $token" https://$vRA/identity/api/tenants
The response in JSON lists the current tenants. Format the output to improve its readability. For information about formatting output, see Filtering and Formatting REST API Information.
{
   "links":[],
   "content"[
      {
         "@type":"Tenant",
         "id":"vsphere.local",
         "urlName":"vsphere.local",
         "name":"vsphere.local",
         "description":null,
         "contactEmail":null,
         "password":"",
         "defaultTenant":true
      },
      {
         "@type":"Tenant",
         "id":"qe",
         "urlName":"qe",
         "name":"QETenant",
         "description":"Precreated test tenant",
         "contactEmail":null,
         "password":"",
         "defaultTenant":false
      }
      {
         "@type":"Tenant",
         "id":"management",
         "urlName":"management",
         "name":"Management-ITTenant",
         "description":"Precreated test tenant",
         "contactEmail":null,
         "password":"",
         "defaultTenant":false
      }
   ],
   "metadata":{
      "size":20,
      "totalElements":3,
      "totalPages":1,
      "number":1,
      "offset":0
   }
}