Product SiteDocumentation Site

Chapter 19. Domains

19.1. Domain Users Sub-Collection
19.2. Domain Groups Sub-Collection
The API provides the ability to access user and group information from the organization's Active Directory Service using the domains collection. Domain information is referenced with the rel="domains" link.
Each domain contains the following elements:
Element Type Description Properties
name string The domain name
link rel="users" string A link to the sub-collection for users associated with this domain
link rel="groups" string A link to the sub-collection for groups associated with this domain
The links to users and groups sub-collections also accept search queries. See Section 8.2.3, “ Search Queries ” for more information.
Example 19.1. An XML representation of a domain resource
<domain id="77696e32-6b38-7268-6576-2e656e676c61"
  href="/rhevm-api/domains/77696e32-6b38-7268-6576-2e656e676c61">
    <name>domain.example.com</name>
    <link rel="users"
      href="/rhevm-api/domains/77696e32-6b38-7268-6576-2e656e676c61/users"/>
    <link rel="groups"
      href="/rhevm-api/domains/77696e32-6b38-7268-6576-2e656e676c61/groups"/>
    <link rel="users/search"
      href="/rhevm-api/domains/77696e32-6b38-7268-6576-2e656e676c61/
      users?search={query}"/>
    <link rel="groups/search"
      href="/rhevm-api/domains/77696e32-6b38-7268-6576-2e656e676c61/
      groups?search={query}"/>
</domain>

Note

The domains collection and its sub-collections are read-only.

19.1. Domain Users Sub-Collection

The users sub-collection contains all users in Active Directory. This information is used to add new users to the Red Hat Enterprise Virtualization environment as per Chapter 18, Users.
A domain user resource contains these main properties:
Element Type Description
id GUID Globally unique identifier for this user
name string The name of the user
user_name string The username from Active Directory
domain id GUID The containing Active Directory domain
groups complex A list of Active Directory groups for this user
For example:
<users>
    <user id="225f15cd-e891-434d-8262-a66808fcb9b1"
      href="/rhevm-api/domains/77696e32-6b38-7268-6576-2e656e676c61/users/
      d3b4e7be-5f57-4dac-b937-21e1771a501f">
        <name>RHEV-M Admin</name>
        <user_name>rhevmadmin@domain.example.com</user_name>
        <domain id="77696e32-6b38-7268-6576-2e656e676c61"
          href="/rhevm-api/domains/77696e32-6b38-7268-6576-2e656e676c61"/>
        <groups>
            <group>
                <name>domain.example.com/Users/Enterprise Admins</name>
            </group>
            <group>
                <name>domain.example.com/Users/Domain Admins</name>
            </group>
            ...
        </groups>
    </user>
    ...
</users>