Chapter 16. Domains

The API provides the ability to access user and group information from the organization's directory service using the domains collection. Domain information is referenced with the rel="domains" link.

Table 16.1. Domain elements

Element Type Description
name string The domain name.
link rel="users" relationship A link to the sub-collection for users associated with this domain.
link rel="groups" relationship 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 7.2.3, “ Searching Collections with Queries ” for more information.

Example 16.1. An XML representation of a domain resource

<domain id="77696e32-6b38-7268-6576-2e656e676c61"
  href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61">
    <name>domain.example.com</name>
    <link rel="users"
      href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/users"/>
    <link rel="groups"
      href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/groups"/>
    <link rel="users/search"
      href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/
      users?search={query}"/>
    <link rel="groups/search"
      href="/api/domains/77696e32-6b38-7268-6576-2e656e676c61/
      groups?search={query}"/>
</domain>

Note

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

16.1. Domain Users Sub-Collection

The users sub-collection contains all users in the directory service. This information is used to add new users to the Red Hat Enterprise Virtualization environment as per Chapter 19, Users.

Table 16.2. Domain user elements

Element Type Description
name string The name of the user.
user_name string The username from directory service.
domain id GUID The containing directory service domain.
groups complex A list of directory service groups for this user.

Example 16.2. An XML representation of a user in the users sub-collection

<user id="225f15cd-e891-434d-8262-a66808fcb9b1"
  href="/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="/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>