The get-domain-list operation is used to retrieve the list of customer’s domains, subdomains, and domain aliases.

Request Packet Structure

A request XML packet includes the get-domain-list node:

<packet>
  <customer>
    <get-domain-list>
      ...
    </get-domain-list>
  </customer>
</packet>

The get-domain-list node is nested within the ClientTypeRequest complex type (client_input.xsd). Its graphical representation is as follows:

image 75312

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is required. It specifies the filtering rule. Data type: clientSelectionFilterType. For more information on filters, refer to the Available Filters section.

Response Packet Structure

The get-domain-list node of the response packet is structured as follows:

image 75307

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

The result node wraps the response retrieved from the server. Data type: resultFilterType (common.xsd).

  • result, required. It wraps the response got from the server. Data type: resultFilterType (common.xsd).
  • status, required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
  • errcode, optional. It returns the error code when the operation fails. Data type: unsignedInt.
  • errtext, optional. It returns the error message if the operation fails. Data type: string.
  • filter-id, optional. It returns the parameter by which the reseller account was filtered by in the request packet. Data type: anySimple.
  • id, optional. It returns the identifier of the reseller account for which the applications filter was turned on. Data type: id_type (common.xsd).

The information about the domains is held by the domain node, which is presented by complex type domainListOutputType (domain_list.xsd). The node is structured as follows:

  • The id node is required. It holds the ID of the domain. Data type: id_type.
  • The name node is required. It holds the domain name. Data type: string.
  • The ascii-name node is required. It holds the domain name in ASCII characters. Data type: string.
  • The type node is required. It holds the domain type (domain, subdomain, alias). Data type: string.
  • The main node is required. It indicates whether the domain is the main domain under a subscription. Data type: boolean.
  • The guid node is required. It holds the unique identifier of the domain. Data type: string.
  • The external-id node is required. It holds the identifier of the domain in an external system. Data type: string.
  • The parent-id node is optional. It holds the ID of the parent domain to which the subdomain belongs. Data type: id_type.
  • The domain-id node is optional. It holds the ID of the domain to which the domain alias is related. Data type: id_type.

Samples

The request packet that retrieves information about customer’s domains can look as follows:

<packet>
  <customer>
    <get-domain-list>
      <filter>
        <id>1</id>
      </filter>
    </get-domain-list>
  </customer>
</packet>

Response:

<packet>
  <customer>
    <get-domain-list>
      <result>
        <status>ok</status>
        <filter-id>31</filter-id>
        <id>31</id>
        <domains>
          <domain>
            <id>37</id>
            <name>jsmith111.com</name>
            <ascii-name>jsmith111.com</ascii-name>
            <type>domain</type>
            <main>true</main>
            <guid>9a82a132-601a-4cd0-9f81-4b4321eedfed</guid>
            <external-id/>
          </domain>
          <domain>
            <id>39</id>
            <name>sub1.jsmith111.com</name>
            <ascii-name>sub1.jsmith111.com</ascii-name>
            <type>subdomain</type>
            <main>false</main>
            <guid>6d4624ef-3acb-42da-89db-be18d3d72aa8</guid>
            <external-id/>
            <parent-id>37</parent-id>
          </domain>
          <domain>
            <id>40</id>
            <name>sub2.jsmith111.com</name>
            <ascii-name>sub2.jsmith111.com</ascii-name>
            <type>subdomain</type>
            <main>false</main>
            <guid>f827f280-c850-4737-8029-16a4ba2a732b</guid>
            <external-id/>
            <parent-id>37</parent-id>
          </domain>
          <domain>
            <id>6</id>
            <name>aliassmith.com</name>
            <ascii-name>aliassmith.com</ascii-name>
            <type>alias</type>
            <main>false</main>
            <guid>9a82a132-601a-4cd0-9f81-4b4321eedfed</guid>
            <external-id/>
            <domain-id>37</domain-id>
          </domain>
          <domain>
            <id>38</id>
            <name>adddom1.com</name>
            <ascii-name>adddom1.com</ascii-name>
            <type>domain</type>
            <main>false</main>
            <guid>49344458-75c7-4dad-8439-d74e01ce6bb8</guid>
            <external-id/>
          </domain>
        </domains>
      </result>
    </get-domain-list>
  </customer>
</packet>