Search in this section

Skip to end of metadata
Go to start of metadata


Table of Contents

Description

You use the List Inquire 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 View element defines the scope of the result.
  • The Where element defines search criteria.
  • The Order element defines the sorting of the result.
For a list query of sld, subtld, tld, the keywords must be inserted in a "Where" block. Only the complete domain names (e.g. example.com) are returned, but not the data of the individual keys (e.g..com).

An example for a simple query are  Example 1 for JSON and Example 2 for XML and Example 2 for JSON and Example 2 for XML.

KeyOccursTypeFormatDescription

code

1

task


E.g. Domain Inquire 0105

view

1



Contains the objects to be displayed

view / offset

0 - 1

int


Specifies the number of objects from which the list is to be displayed.

view / limit

0 - 1

int


Maximum number of objects to be displayed

view / children

0 - 1

enum


Query subuser.

  •  1 = Subusers are queried
  •  0 = Subusers are not queried

where

0 - 1

string


Contains the description of the object to be queried. In the where-element several keywords can be nested with where/*/and and where/*/or. Here "and" before "or" applies.

where / key

1

string


Type of key

where / operator

0 - 1

enum


Relational operator

All operators are listed below.

where / value

1

string


Value of the key

key

0 - n

string


Inquires the values of a specific keyword. These vary depending on the type of order, e.g.:

  •     owner
  •     name
  •     id
  •     created

order




Sorting

order / key

0 - n

string


Keyword to sort by

order / mode

0 - 1

enum


Sorting sequence

  • asc = ascending
  • desc = descending
  • Default value = asc

Query further Details

Additional details can be requested with the keyword "key". Which these are in detail is described in the chapters for the respective object queries.

In XML  you have to add a tag <key> below the tag <task>.

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

In JSON you can use the query parameter keys to determine additional details. Depending on the type of objects queried, different keys can be used. The keys valid for the respective list query can be found in the 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 Example 3 for XML The same is valid for pure or operations Example 4 for Example 4 for JSON and Example 4 for XML Both operations can be combined. See  Example 5 for JSON and Example 5 for XML and Example 6 for Example 6 for JSON and Example 6 for XML.

JSON Examples

Route: POST /contact

Example 1: Simple query with only one condition.

List 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".

List 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".

List 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"
        }
    ]
}

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

List 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 5: Complex query with "where", "and" and "or"

List Request
Coming soon ...

Example 6: Complex query with  „"where", "and" and "or"

List Request
Coming soon ...

XML Examples

Example 1: Simple query with "where"

DomainInfo 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>
       <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"

DomainInfo 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

DomainInfo 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>
            <or>
                <or>
                    <key>name</key>
                    <operator>eq</operator>
                    <value>example.com</value>
                </or>
                <or>
                    <key>name</key>
                    <operator>eq</operator>
                    <value>example.de</value>
                </or>
            </or>
        </where>
        <order>
            <key>expire</key>
            <mode>asc</mode>
        </order>
    </task>
</request>

Example 5: Complex query with "where", "and" and "or"

DomainInfo Request
<request>
    <auth>
        <user>USER</user>
        <password>PASSWORD</password>
        <context>CONTEXT</context>
    </auth>
    <task>
        <code>0105</code>
        <view>
            <limit>20</limit>
            <offset>0</offset>
            <children>1</children>
        </view>
        <where>
            <or>
                <and>
                    <and>
                        <key>expire</key>
                        <operator>gt</operator>
                        <value>2018-06-01 00:00:00</value>
                    </and>
                    <and>
                        <key>name</key>
                        <operator>eq</operator>
                        <value>example.com</value>
                    </and>
                </and>
                <or>
                    <key>name</key>
                    <operator>eq</operator>
                    <value>example.de</value>
                </or>
            </or>
        </where>
        <order>
            <key>expire</key>
            <mode>asc</mode>
        </order>
    </task>
</request>

Example 6: Complex query with "where", "and" and "or"

The following example queries all domains that begin with "test" and belong to the top-level domains .de or .com.

 <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>
             <where>
                    <and>
                           <key>name</key>
                           <operator>like</operator>
                           <value>test*</value>
                    </and>
                    <and>
                           <or>
                                  <key>name</key>
                                  <operator>like</operator>
                                  <value>*.de</value>
                           </or>
                           <or>
                                  <key>name</key>
                                  <operator>like</operator>
                                  <value>*.com</value>
                           </or>
                    </and>
             </where>
       </task>
 </request>