You can use the REST API identity service to list all available identity stores for a named vRealize Automation tenant, such as the default tenant vsphere.local.

Input

Use the supported input parameters to control the command output.

Parameter

Description

URL

https://$host/identity/api/tenants/$tenantId/directories

$host

Specifies the host name and fully qualified domain name or IP address of the vRealize Automation identity server.

$token

Specifies a valid HTTP bearer token with necessary credentials.

$tenantId

Specifies the ID of the tenant.

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.

curl Command

The following example command lists the identity stores by using variables, instead of the full token and host name.domain name.


curl --insecure -H "Accept: application/json" -H 'Content-Type: application/json' 
-H "Authorization: Bearer $token” https://$host/identity/api/tenants/MYCOMPANY/directories

JSON Output

The following JSON output is returned based on the command input.

HTTP/1.1 200 OK
  Server: Apache-Beach/1.1
  Cache-Control: no-cache, no-store
  Pragma: no-cache
  Expires: Wed, 31 Dec 1969 23:59:59 GMT
  Content-Type: application/json;charset=UTF-8
  Content-Length: 830
  Date: Sat, 01 Feb 2014 13:07:54 GMT
{"links":[],
 "content":[
    {"@type":"IdentityStore",
     "domain":"vcac.mycompany.com",
     "name":"openLDAPPromocom",
     "description":null,
     "alias":"promocom.com",
     "type":"LDAP",
     "userNameDn":"cn=promocomadmin,ou=promocom,dc=vcac,dc=mycompany,dc=com",
     "password":null,
     "url":"ldap://10.000.00.000:389",
     "groupBaseSearchDn":"ou=promocom,dc=vcac,dc=mycompany,dc=com",
     "userBaseSearchDn":"ou=promocom,dc=vcac,dc=mycompany,dc=com"
    },
    {"@type":"IdentityStore",
     "domain":"example.mycompany.com",
     "name":"openLDAPDemo",
     "description":null,
     "alias":"example.com",
     "type":"LDAP",
     "userNameDn":"cn=demoadmin,ou=demo,dc=example,dc=mycompany,dc=com",
     "password":null,
     "url":"ldap://10.000.00.000:389",
     "groupBaseSearchDn":"ou=demo,dc=example,dc=mycompany,dc=com",
     "userBaseSearchDn":"ou=demo,dc=example,dc=mycompany,dc=com"
    }],
   "metadata":{
        "size":20,
        "totalElements":2,
        "totalPages":1,
         "number":1,
         "offset":0
    }
}