Table of Contents

Description

You use the ListInquire tasks to retrieve the data for several or all objects of an object type. The returned lists contain less details for the individual objects than the results of single queries.

A list query always consists of 3 elements:

  • The Where (XML) or Filters (JSON) object defines search criteria. Details about the Where object for XML and Filters for JSON.
  • The View object defines the scope of the result. Details of the View object for XML and JSON.

  • The Order object determines the sorting of the result. Details of the Order object for XML and JSON.

For a list query of sld, subtld, tld the keywords must be inserted in a "Where" or "Filters" block. Only the complete domain names (e.g. example.com) are returned, but not the data of the individual keys (e.g. .com).

Tasks and routes for list queries

The list queries are executed in XML with the object-specific ListInquire requests and in JSON via the corresponding routes.

These are: (List not yet complete)

XML TaskXML CodeJSON RouteDescription
BackupMX List524POST /backupMX/_searchInquires data of BackupMX entries.
Certificate Job List400115JobLIstInquires data of zone requests.
Certificate List400105POST /certificate/_searchInquires data of certificates.
ContactList304POST /contact​/_searchInquires data of domain contacts.
Domain List105POST ​/domain​/_searchInquires data from domains that are in the user's inventory.
Domain Premium List165-Inquires data from premium domains that are in the user's inventory.
DomainMonitoringList155-Inquires data from multiple domain monitorings.
JobList

-

POST​/job​/_searchInquires data from multiple jobs. in XML object-specific job job types, e.g. DomainJobList, ZoneJobList, ContactJobList.
MailProxyList514POST /mailProxy/_searchInquires MailProxy data of multiple domains.
Redirect List504POST /redirect/_searchInquires data of the current redirects.
SSLContact List400205POST /sslcontaxt/{id}Inquires the data of SSL contacts.
TransferOutList106001POST /transferout/_searchInquires data from multiple running outgoing transfers.
ZoneList205POST/zone/_searchInquires zone data of several zones on the name servers managed by the system.
ZoneHistoryList225POST /zone/history/_searchInquires data from multiple zones.

Examples for simple queries see below.

Query further details

In XML, additional details can be determined with the <key> keyword.  For this, a <key> tag must be added below the <task> tag. In the description of the various list queries, the keywords that can be queried with <key> are specified in each case.

XML
<task>
       <key>created</key>
</task>

Similarly, further details in JSON can be queried using query parameters. Depending on the queried object specific parameters can be used. The parameters valid for the respective list query are stored in the JSON Technical Documentation.

JSON
POST /domain/_search?keys[]=$key1&keys[]=$key2

Permitted operators for a list query

Value JSON

Value XML

Meaning

EQUAL

eq

direct comparison (=)

NOT_EQUAL

ne

is not  (!=)

LIKE

like

Wildcard search “*”, case-sensitive

GREATER

gt

greater then (>)

LESS

lt

lower then (<)

GREATER_EQUAL

ge

greater or equal (>=)

LESS_EQUAL

le

lower or equal (<=)

NOT_LIKEnot_likeWildcard search with "*", is not like, case-sensitive
ILIKEilikeWildcard search with "*", case-insensitive

Complex queries

More complex queries are possible using the Where element. Several conditions can be linked with and/or. To link several conditions, e.g. with and, an and tag must be opened below the where tag. Under this tag further and-tags are opened for each condition and the condition is defined below with key, operator and value, like in  Example 3 for JSON and for XML The same is valid for pure or operations Example 4 for for JSON and for XML Both operations can be combined.

Examples for complex queries in JSON and XML


Example 1: Simple query with only one condition.

Request
{
    "filters": [
        {
            "key": "name",
            "operator": "LIKE",
            "value": "%json-test%"
        }
    ],
    "view": {
        "children": 1,
        "limit": 10
    },
    "orders": [
        {
            "key": "created",
            "type": "ASC"
        }
    ]
}

Example 2: Complex query with multiple conditions linked with "And".

Request
{
    "filters": [
        {
            "key": "name",
            "operator": "LIKE",
            "value": "%json-test%"
        },
        {
            "key": "trustee",
            "operator": "EQUAL",
            "value": false
        }
    ],
    "view": {
        "children": 1,
        "limit": 10
    },
    "orders": [
        {
            "key": "created",
            "type": "ASC"
        }
    ]
}

Example 3: Complex query with multiple conditions linked with "OR".

Request
{
    "filters": [
        {
			"link": "OR"
            "filters": [
        		{
            		"key": "name",
            		"operator": "LIKE",
            		"value": "%json-test%"
        		},
	        	{
            		"key": "trustee",
            		"operator": "EQUAL",
            		"value": false
        		}
			]
        }
    ],
    "view": {
        "children": 1,
        "limit": 10
    },
    "orders": [
        {
            "key": "created",
            "type": "ASC"
        }
    ]
}

JSON Example 4: Complex query with multiple conditions linked with "And" and "OR"

Request
{
    "filters": [
        {
            "link": "OR",
            "filters": [
                {
                    "key": "name",
                    "operator": "LIKE",
                    "value": "%json-test%"
                },
                {
					"link": "AND",
					"filters": [
						{
                      		"key": "comment",
                    		"operator": "LIKE",
                    		"value": "%on2%"
						},
						{
                      		"key": "create",
                    		"operator": "gt",
                    		"value": "2018-01-01 00:00:00"
						}
					]
                }
            ]
        },
        {
            "key": "trustee",
            "operator": "EQUAL",
            "value": false
        }
    ],
    "view": {
        "children": 1,
        "limit": 10
    },
    "orders": [
        {
            "key": "created",
            "type": "ASC"
        }
    ]
}

Example 1: Simple query with "where"

Request
<request>
    <auth>
        <user>USER</user>
        <password>PASSWORD</password>
        <context>CONTEXT</context>
    </auth>
    <task>
        <code>0105</code>
        <view>
            <limit>10</limit>
            <offset>0</offset>
            <children>0</children>
        </view>
        <where>
            <key>name</key>
            <operator>eq</operator>
            <value>example.com</value>
        </where>
        <order>
            <key>created</key>
            <mode>desc</mode>
        </order>
        <key>comment</key>
    </task>
</request>

Example 2: Query with "where", limiting results with "limit" and sorting with "order"

The list should show the first 30 domains (offset = 0, limit = 30) beginning with "a" (name like a*). Additionally the field created is requested (key = created).

Request
 <request>
       <auth>
             <user>customer</user>
             <password>password</password>
             <context>4</context>
       </auth>
       <task>
             <code>0105</code>
             <view>
                    <offset>0</offset>
                    <limit>30</limit>
                    <children>1</children>
             </view>
             <key>created</key>
             <where>
                    <key>name</key>
                    <operator>like</operator>
                    <value>a*</value>
             </where>
             <order>
                    <key>created</key>
                    <mode>asc</mode>
             </order>
       </task>
 </request>

Example 3: Complex query with "where" and "and"

Request
<request>
    <auth>
        <user>USER</user>
        <password>PASSWORD</password>
        <context>CONTEXT</context>
    </auth>
    <task>
        <code>0105</code>
        <view>
            <limit>10</limit>
            <offset>0</offset>
            <children>0</children>
        </view>
        <where>
            <and>
                <and>
                    <key>expire</key>
                    <operator>gt</operator>
                    <value>2018-06-01 00:00:00</value>
                </and>
                <and>
                    <key>expire</key>
                    <operator>lt</operator>
                    <value>2018-12-31 00:00:00</value>
                </and>
            </and>
        </where>
        <order>
            <key>expire</key>
            <mode>asc</mode>
        </order>
    </task>
</request>

Example 4: Complex query with "where" and "and"

Request
<request>
    <auth>
        <user>USER</user>
        <password>PASSWORD</password>
        <context>CONTEXT</context>
    </auth>
    <task>
        <code>0105</code>
        <where>
         <or>
            <key>name</key>
            <operator>LIKE</operator>
            <value>json-test</value>
    
         </or>
         <or>
            <and>
                <key>comment</key>
                <operator>LIKE</operator>
                <value>on2</value>
            </and>
            <and>
                <key>created</key>
                <operator>gt</operator>
                <value>2020-05-01 00:00:00</value>
            </and>
         </or>
        </where>

        <order>
            <key>expire</key>
            <mode>asc</mode>
        </order>
    </task>
<request>