Search in this section

Child pages
  • Running List Inquiries
Skip to end of metadata
Go to start of metadata


Table of contents

Description

A list inquiry allows you to obtain the details for a list of objects with a similar object type. The returned lists contain fewer details than when inquiring single objects with a single inquire. With the keyword <key> additional details can be inquired.

List inquiries always consist of 3 elements:

  • The View element determines the scope of the result.

  • The Where element defines search criteria.

  • The Order element determines the sorting of the result.

An example of a simple query is example 1.

If no limit is specified in the View element, the number of queried objects is limited to 100.

The keyword <key>

Using the keyword <key>, additional details can be inquired. Add the desired key inside of the <task> tag. In the description of the list queries for the individual objects, the keywords are specified, which you can query with <key>, for example, for contacts (400205) and certificates (400105).

Operators

The available search operators

ValueExplanation
eqis equal to (=).
neis not (!=).
likewildcard search with *
gtgreater than (>).
ltless than (<).
gegreater or equal (>=).
lesmaller or equal (<=).

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, additional and tags are opened for each condition and the condition is defined below with key, operator and value, as in example 2.  The same is true for pure or combinations like example 3. Both linking types can also be combined, like example 4.

XML Examples

Example 1: Simple query with "where"

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

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

CertificateList Request
<request>
    <auth>
        <user>USER</user>
        <password>PASSWORD</password>
        <context>CONTEXT</context>
    </auth>
    <task>
        <code>400105</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 3: Complex query with "where" and "or"

CertificateList Request
<request>
    <auth>
        <user>USER</user>
        <password>PASSWORD</password>
        <context>CONTEXT</context>
    </auth>
    <task>
        <code>400105</code>
        <view>
            <limit>10</limit>
            <offset>0</offset>
            <children>0</children>
        </view>
        <where>
            <or>
                <or>
                    <key>name</key>
                    <operator>eq</operator>
                    <value>domain.com</value>
                </or>
                <or>
                    <key>name</key>
                    <operator>eq</operator>
                    <value>domain.de</value>
                </or>
            </or>
        </where>
        <order>
            <key>expire</key>
            <mode>asc</mode>
        </order>
    </task>
</request>

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

CertificateList Request
<request>
    <auth>
        <user>USER</user>
        <password>PASSWORD</password>
        <context>CONTEXT</context>
    </auth>
    <task>
        <code>400105</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>domain.com</value>
                    </and>
                </and>
                <or>
                    <key>name</key>
                    <operator>eq</operator>
                    <value>domain.de</value>
                </or>
            </or>
        </where>
        <order>
            <key>expire</key>
            <mode>asc</mode>
        </order>
    </task>
</request>