<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-regext-rdap-sorting-and-paging-20" indexInclude="true" ipr="trust200902" number="8977" prepTime="2021-01-22T16:21:23" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="4" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-regext-rdap-sorting-and-paging-20" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8977" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="RDAP Sorting and Paging">Registration Data Access Protocol (RDAP) Query Parameters for Result Sorting and Paging</title>
    <seriesInfo name="RFC" value="8977" stream="IETF"/>
    <author fullname="Mario Loffredo" initials="M." surname="Loffredo">
      <organization showOnFrontPage="true">IIT-CNR/Registro.it</organization>
      <address>
        <postal>
          <street>Via Moruzzi,1</street>
          <city>Pisa</city>
          <country>Italy</country>
          <code>56124</code>
        </postal>
        <email>mario.loffredo@iit.cnr.it</email>
        <uri>https://www.iit.cnr.it</uri>
      </address>
    </author>
    <author fullname="Maurizio Martinelli" initials="M." surname="Martinelli">
      <organization showOnFrontPage="true">IIT-CNR/Registro.it</organization>
      <address>
        <postal>
          <street>Via Moruzzi,1</street>
          <city>Pisa</city>
          <country>Italy</country>
          <code>56124</code>
        </postal>
        <email>maurizio.martinelli@iit.cnr.it</email>
        <uri>https://www.iit.cnr.it</uri>
      </address>
    </author>
    <author initials="S." surname="Hollenbeck" fullname="Scott Hollenbeck">
      <organization showOnFrontPage="true">Verisign Labs</organization>
      <address>
        <postal>
          <street>12061 Bluemont Way</street>
          <city>Reston</city>
          <region>VA</region>
          <code>20190</code>
          <country>United States of America</country>
        </postal>
        <email>shollenbeck@verisign.com</email>
        <uri>https://www.verisignlabs.com/</uri>
      </address>
    </author>
    <date month="01" year="2021"/>
    <area>Applications and Real-Time</area>
    <workgroup>Registration Protocols Extensions</workgroup>
    <keyword>RDAP</keyword>
    <keyword>Sorting</keyword>
    <keyword>Paging</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">The Registration Data Access Protocol (RDAP) does not include core functionality for clients to provide sorting and paging parameters for control of large result sets.  This omission can lead to unpredictable server processing of queries and client processing of responses.  This unpredictability can be greatly reduced if clients can provide servers with their preferences for managing large responses.  This document describes RDAP query extensions that allow clients to specify their preferences for sorting and paging result sets.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8977" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2021 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conventions-used-in-this-do">Conventions Used in This Document</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rdap-query-parameter-specif">RDAP Query Parameter Specification</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sorting-and-paging-metadata">Sorting and Paging Metadata</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.1.2">
                  <li pn="section-toc.1-1.2.2.1.2.1">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.2.1.2.1.1"><xref derivedContent="2.1.1" format="counter" sectionFormat="of" target="section-2.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rdap-conformance">RDAP Conformance</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-count-parameter">"count" Parameter</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sort-parameter">"sort" Parameter</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.3.2">
                  <li pn="section-toc.1-1.2.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.3.2.1.1"><xref derivedContent="2.3.1" format="counter" sectionFormat="of" target="section-2.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sorting-properties-declarat">Sorting Properties Declaration</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.2.2.3.2.2.1"><xref derivedContent="2.3.2" format="counter" sectionFormat="of" target="section-2.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-representing-sorting-links">Representing Sorting Links</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.2.2.4">
                <t indent="0" pn="section-toc.1-1.2.2.4.1"><xref derivedContent="2.4" format="counter" sectionFormat="of" target="section-2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cursor-parameter">"cursor" Parameter</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.4.2">
                  <li pn="section-toc.1-1.2.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.4.2.1.1"><xref derivedContent="2.4.1" format="counter" sectionFormat="of" target="section-2.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-representing-paging-links">Representing Paging Links</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-negative-answers">Negative Answers</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-implementation-consideratio">Implementation Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-jsonpath-operators">JSONPath Operators</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="Appendix B" format="default" sectionFormat="of" target="section-appendix.b"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-approaches-to-result-pagina">Approaches to Result Pagination</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="B.1" format="counter" sectionFormat="of" target="section-b.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-specific-issues-raised-by-r">Specific Issues Raised by RDAP</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="Appendix C" format="default" sectionFormat="of" target="section-appendix.c"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-implementation-notes">Implementation Notes</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2">
              <li pn="section-toc.1-1.10.2.1">
                <t indent="0" pn="section-toc.1-1.10.2.1.1"><xref derivedContent="C.1" format="counter" sectionFormat="of" target="section-c.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sorting">Sorting</xref></t>
              </li>
              <li pn="section-toc.1-1.10.2.2">
                <t indent="0" pn="section-toc.1-1.10.2.2.1"><xref derivedContent="C.2" format="counter" sectionFormat="of" target="section-c.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-counting">Counting</xref></t>
              </li>
              <li pn="section-toc.1-1.10.2.3">
                <t indent="0" pn="section-toc.1-1.10.2.3.1"><xref derivedContent="C.3" format="counter" sectionFormat="of" target="section-c.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-paging">Paging</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.d"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.e"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The availability of functionality for result sorting and paging provides benefits to both clients and servers in the implementation of RESTful services <xref target="REST" format="default" sectionFormat="of" derivedContent="REST"/>.  These benefits include:</t>
      <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-1-2">
        <li pn="section-1-2.1">reducing the server response bandwidth requirements</li>
        <li pn="section-1-2.2">improving server response time</li>
        <li pn="section-1-2.3">improving query precision and, consequently, obtaining more relevant results</li>
        <li pn="section-1-2.4">decreasing server query processing load</li>
        <li pn="section-1-2.5">reducing client response processing time</li>
      </ul>
      <t indent="0" pn="section-1-3">Approaches to implementing features for result sorting and paging can be grouped into two main categories:</t>
      <ol type="1" indent="adaptive" spacing="normal" start="1" pn="section-1-4"><li pn="section-1-4.1" derivedCounter="1.">
          <t indent="0" pn="section-1-4.1.1">Sorting and paging are implemented through the introduction of additional parameters in the query string (e.g., the Open Data Protocol (ODATA) <xref target="ODATA-PART1" format="default" sectionFormat="of" derivedContent="ODATA-PART1"/>).</t>
        </li>
        <li pn="section-1-4.2" derivedCounter="2.">Information related to the number of results and the specific portion of the result set to be returned, in addition to a set of ready-made links for the result set scrolling, are inserted in the HTTP header of the request/response <xref target="RFC7231" format="default" sectionFormat="of" derivedContent="RFC7231"/>.</li>
      </ol>
      <t indent="0" pn="section-1-5">However, there are some drawbacks associated with the use of the HTTP header.  First, the header properties cannot be set directly from a web browser.  Moreover, in an HTTP session, the information on the status (i.e., the session identifier) is usually inserted in the header or a cookie, while the information on the resource identification or the search type is included in the query string.  Finally, providing custom information through HTTP headers assumes the client has prior knowledge of the server implementation, which is widely considered a Representational State Transfer (REST) design anti-pattern.  As a result, this document describes a specification based on the use of query parameters.</t>
      <t indent="0" pn="section-1-6">Currently, RDAP <xref target="RFC7482" format="default" sectionFormat="of" derivedContent="RFC7482"/> defines two query types:</t>
      <dl indent="3" newline="false" spacing="normal" pn="section-1-7">
        <dt pn="section-1-7.1">lookup:
</dt>
        <dd pn="section-1-7.2">the server returns only one object
</dd>
        <dt pn="section-1-7.3">search:
</dt>
        <dd pn="section-1-7.4">the server returns a collection of objects
</dd>
      </dl>
      <t indent="0" pn="section-1-8">While the lookup query does not raise issues regarding response size management, the search query can potentially generate a large result set that is often truncated according to server limits.  Besides, it is not possible to obtain the total number of objects found that might be returned in a search query response <xref target="RFC7483" format="default" sectionFormat="of" derivedContent="RFC7483"/>.  Lastly, there is no way to specify sort criteria to return the most relevant objects at the beginning of the result set.  Therefore, the client might traverse the whole result set to find the relevant objects or, due to truncation, might not find them at all.</t>
      <t indent="0" pn="section-1-9">The specification described in this document extends RDAP query capabilities to enable result sorting and paging by adding new query parameters that can be applied to RDAP search path segments.  The service is implemented using the Hypertext Transfer Protocol (HTTP) <xref target="RFC7230" format="default" sectionFormat="of" derivedContent="RFC7230"/> and the conventions described in <xref target="RFC7480" format="default" sectionFormat="of" derivedContent="RFC7480"/>.</t>
      <t indent="0" pn="section-1-10">The implementation of the new parameters is technically feasible, as operators for counting, sorting, and paging rows are currently supported by the major relational database management systems.</t>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-conventions-used-in-this-do">Conventions Used in This Document</name>
        <t indent="0" pn="section-1.1-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/>
          <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals,
    as shown here.
        </t>
      </section>
    </section>
    <section anchor="rdap-query-parameter-specification" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-rdap-query-parameter-specif">RDAP Query Parameter Specification</name>
      <t indent="0" pn="section-2-1">The new query parameters are <bcp14>OPTIONAL</bcp14> extensions of path segments defined in <xref target="RFC7482" format="default" sectionFormat="of" derivedContent="RFC7482"/>.  They are as follows:</t>
      <dl indent="3" newline="false" spacing="normal" pn="section-2-2">
        <dt pn="section-2-2.1">"count":
</dt>
        <dd pn="section-2-2.2">a boolean value that allows a client to request the return of the total number of objects found
</dd>
        <dt pn="section-2-2.3">"sort":
</dt>
        <dd pn="section-2-2.4">a string value that allows a client to request a specific sort order for the result set
</dd>
        <dt pn="section-2-2.5">"cursor":
</dt>
        <dd pn="section-2-2.6">a string value representing a pointer to a specific fixed-size portion of the result set
</dd>
      </dl>
      <t indent="0" pn="section-2-3">Augmented Backus-Naur Form (ABNF) <xref target="RFC5234" format="default" sectionFormat="of" derivedContent="RFC5234"/> is used in the following sections to describe the formal syntax of these new parameters.</t>
      <section anchor="sorting_and_paging_metadata" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-sorting-and-paging-metadata">Sorting and Paging Metadata</name>
        <t indent="0" pn="section-2.1-1">According to most advanced principles in REST design, collectively
        known as HATEOAS (Hypermedia as the Engine of Application State)
        <xref target="HATEOAS" format="default" sectionFormat="of" derivedContent="HATEOAS"/>, a client entering a REST application through
        an initial URI should use server-provided links to dynamically
        discover available actions and access the resources it needs.  In this
        way, the client is neither required to have prior knowledge of the
        service nor, consequently, to hard code the URIs of different
        resources.  This allows the server to make URI changes as the API
        evolves without breaking clients.  Definitively, a REST service should
        be as self-descriptive as possible.</t>
        <t indent="0" pn="section-2.1-2">Therefore, servers implementing the query parameters described in this specification <bcp14>SHOULD</bcp14> provide additional information in their responses about both the available sorting criteria and possible pagination.  Such information is collected in two <bcp14>OPTIONAL</bcp14> response elements named "sorting_metadata" and "paging_metadata".</t>
        <t indent="0" pn="section-2.1-3">The "sorting_metadata" element contains the following properties:</t>
        <dl newline="true" indent="3" spacing="normal" pn="section-2.1-4">
          <dt pn="section-2.1-4.1">"currentSort": "String" (<bcp14>OPTIONAL</bcp14>)
</dt>
          <dd pn="section-2.1-4.2">Either the value of the "sort" parameter as specified in the query string or
the sort applied by default, if any.
</dd>
          <dt pn="section-2.1-4.3">"availableSorts": "AvailableSort[]" (<bcp14>OPTIONAL</bcp14>)
</dt>
          <dd pn="section-2.1-4.4">
            <t indent="0" pn="section-2.1-4.4.1">An array of objects, with each element describing an available sort criterion. The AvailableSort object includes the following members:</t>
            <dl newline="true" indent="3" spacing="normal" pn="section-2.1-4.4.2">
              <dt pn="section-2.1-4.4.2.1">"property": "String" (<bcp14>REQUIRED</bcp14>)
</dt>
              <dd pn="section-2.1-4.4.2.2">The name that can be used by the client to request the sort criterion.
</dd>
              <dt pn="section-2.1-4.4.2.3">"default": "Boolean" (<bcp14>REQUIRED</bcp14>)
</dt>
              <dd pn="section-2.1-4.4.2.4">Indicator of whether the sort criterion is applied by default. An RDAP server <bcp14>MUST</bcp14> define only one default sorting property for each object class.
</dd>
              <dt pn="section-2.1-4.4.2.5">"jsonPath": "String" (<bcp14>OPTIONAL</bcp14>)
</dt>
              <dd pn="section-2.1-4.4.2.6">The JSONPath expression of the RDAP field corresponding to the property.
</dd>
              <dt pn="section-2.1-4.4.2.7">"links": "Link[]" (<bcp14>OPTIONAL</bcp14>)
</dt>
              <dd pn="section-2.1-4.4.2.8">An array of links as described in <xref target="RFC8288" format="default" sectionFormat="of" derivedContent="RFC8288"/> containing the
query string that applies the sort criterion.
</dd>
            </dl>
          </dd>
        </dl>
        <t indent="0" pn="section-2.1-5">At least one of the "currentSort" and "availableSorts" properties
        <bcp14>MUST</bcp14> be present.</t>
        <t indent="0" pn="section-2.1-6">The "paging_metadata" element contains the following fields:</t>
        <dl newline="true" indent="3" spacing="normal" pn="section-2.1-7">
          <dt pn="section-2.1-7.1">"totalCount": "Numeric" (<bcp14>OPTIONAL</bcp14>)
</dt>
          <dd pn="section-2.1-7.2">A numeric value representing the total number of objects found.  It
<bcp14>MUST</bcp14> be provided if and only if the query string contains the
"count" parameter.
</dd>
          <dt pn="section-2.1-7.3">"pageSize": "Numeric" (<bcp14>OPTIONAL</bcp14>)
</dt>
          <dd pn="section-2.1-7.4">A numeric value representing the number of objects that should have been
returned in the current page.  It <bcp14>MUST</bcp14> be provided if and only
if the total number of objects exceeds the page size.  This property is
redundant for RDAP clients because the page size can be derived from the
length of the search results array, but it can be helpful if the end user
interacts with the server through a web browser.
</dd>
          <dt pn="section-2.1-7.5">"pageNumber": "Numeric" (<bcp14>OPTIONAL</bcp14>)
</dt>
          <dd pn="section-2.1-7.6">A numeric value representing the number of the current page in the result
set.  It <bcp14>MUST</bcp14> be provided if and only if the total number of
objects found exceeds the page size.
</dd>
          <dt pn="section-2.1-7.7">"links": "Link[]" (<bcp14>OPTIONAL</bcp14>)
</dt>
          <dd pn="section-2.1-7.8">An array of links as described in <xref target="RFC8288" format="default" sectionFormat="of" derivedContent="RFC8288"/> containing the
reference to the next page.  In this specification, only forward pagination is
described because it is all that is necessary to traverse the result set.
</dd>
        </dl>
        <section anchor="rdap-conformance" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.1">
          <name slugifiedName="name-rdap-conformance">RDAP Conformance</name>
          <t indent="0" pn="section-2.1.1-1">Servers returning the "paging_metadata" element in their response
          <bcp14>MUST</bcp14> include the string literal "paging" in the
          rdapConformance array.  Servers returning the "sorting_metadata"
          element <bcp14>MUST</bcp14> include the string literal
          "sorting".</t>
        </section>
      </section>
      <section anchor="count-parameter" numbered="true" removeInRFC="false" toc="include" pn="section-2.2">
        <name slugifiedName="name-count-parameter">"count" Parameter</name>
        <t indent="0" pn="section-2.2-1">Currently, RDAP does not allow a client to determine
        the total number of results in a query response when the result
        set is truncated.  This is inefficient because the user cannot
        determine if the result set is complete.</t>
        <t indent="0" pn="section-2.2-2">The "count" parameter provides additional functionality that allows
        a client to request information from the server that specifies the
        total number of objects matching the search pattern.</t>
        <t indent="0" pn="section-2.2-3">The following is an example of an RDAP query including the "count" parameter:</t>
        <t indent="0" pn="section-2.2-4">https://example.com/rdap/domains?name=example*.com&amp;count=true
        </t>
        <t indent="0" pn="section-2.2-5">The ABNF syntax is the following:</t>
        <sourcecode type="abnf" markers="false" pn="section-2.2-6">
   count = "count=" ( trueValue / falseValue )
   trueValue = ("true" / "yes" / "1")
   falseValue = ("false" / "no" / "0")
</sourcecode>
        <t indent="0" pn="section-2.2-7">A trueValue means that the server <bcp14>MUST</bcp14> provide the
        total number of objects in the "totalCount" field of the
        "paging_metadata" element (<xref target="count-in-response-example" format="default" sectionFormat="of" derivedContent="Figure 1"/>).  A falseValue means that the
        server <bcp14>MUST NOT</bcp14> provide this number.</t>
        <figure anchor="count-in-response-example" align="left" suppress-title="false" pn="figure-1">
          <name slugifiedName="name-example-of-rdap-response-wi">Example of RDAP Response with "paging_metadata" Element Containing the "totalCount" Field</name>
          <sourcecode type="json" markers="false" pn="section-2.2-8.1">
{
  "rdapConformance": [
        "rdap_level_0",
        "paging"
  ],
  ...
  "paging_metadata": {
    "totalCount": 43
  },
  "domainSearchResults": [
    ...
  ]
}
</sourcecode>
        </figure>
      </section>
      <section anchor="sort-parameter" numbered="true" removeInRFC="false" toc="include" pn="section-2.3">
        <name slugifiedName="name-sort-parameter">"sort" Parameter</name>
        <t indent="0" pn="section-2.3-1">RDAP does not provide any capability to specify the result set sort criteria.  A server could implement a default sorting scheme according to the object class, but this feature is not mandatory and might not meet user requirements.  Sorting can be addressed by the client, but this solution is rather inefficient.  Sorting features provided by the RDAP server could help avoid truncation of relevant results.</t>
        <t indent="0" pn="section-2.3-2">The "sort" parameter allows the client to ask the server to sort the results according to the values of one or more properties and according to the sort direction of each property.  The ABNF syntax is the following:</t>
        <sourcecode type="abnf" markers="false" pn="section-2.3-3">
   sort = "sort=" sortItem *( "," sortItem )
   sortItem = property-ref [":" ( "a" / "d" ) ]
   property-ref = ALPHA *( ALPHA / DIGIT / "_" )
</sourcecode>
        <t indent="0" pn="section-2.3-4">"a" means that an ascending sort <bcp14>MUST</bcp14> be applied; "d" means that a descending sort <bcp14>MUST</bcp14> be applied.  If the sort direction is absent, an ascending sort <bcp14>MUST</bcp14> be applied.</t>
        <t indent="0" pn="section-2.3-5">The following are examples of RDAP queries that include the "sort" parameter:</t>
        <t indent="0" pn="section-2.3-6">
https://example.com/rdap/domains?name=example*.com&amp;sort=name
</t>
        <t indent="0" pn="section-2.3-7">
https://example.com/rdap/
domains?name=example*.com&amp;sort=registrationDate:d
</t>
        <t indent="0" pn="section-2.3-8">
https://example.com/rdap/
domains?name=example*.com&amp;sort=lockedDate,name
</t>
        <t indent="0" pn="section-2.3-9">Except for sorting IP addresses and values denoting dates and times, servers <bcp14>MUST</bcp14> implement sorting according to the JSON value type of the RDAP field the sorting property refers to.  That is, JSON strings <bcp14>MUST</bcp14> be sorted lexicographically, and JSON numbers <bcp14>MUST</bcp14> be sorted numerically.  Values denoting dates and times <bcp14>MUST</bcp14> be sorted in chronological order.  If IP addresses are represented as JSON strings, they <bcp14>MUST</bcp14> be sorted based on their numeric conversion.</t>
        <t indent="0" pn="section-2.3-10">The conversion of an IPv4 address to a number is possible since each dotted format IPv4 address is a representation of a number written in a 256-based manner; for example, 192.168.0.1 means 1*256^0 + 0*256^1 + 168*256^2 + 192*256^3 = 3232235521.  Similarly,  an IPv6 address can be converted into a number by applying the base 65536.  Therefore, the numerical representation of the IPv6 address 2001:0db8:85a3:0:0:8a2e:0370:7334 is 42540766452641154071740215577757643572.  Built-in functions and libraries for converting IP addresses into numbers are available in most known programming languages and relational database management systems.</t>
        <t indent="0" pn="section-2.3-11">If the "sort" parameter presents an allowed sorting property, it <bcp14>MUST</bcp14> be provided in the "currentSort" field of the "sorting_metadata" element.</t>
        <section anchor="sorting_properties" numbered="true" removeInRFC="false" toc="include" pn="section-2.3.1">
          <name slugifiedName="name-sorting-properties-declarat">Sorting Properties Declaration</name>
          <t indent="0" pn="section-2.3.1-1">In the "sort" parameter ABNF syntax, the element named "property-ref" represents a reference to a property of an RDAP object.  Such a reference could be expressed by using a JSONPath expression (named "jsonpath" in the following).</t>
          <t indent="0" pn="section-2.3.1-2">JSONPath is a syntax, originally based on the XML XPath notation <xref target="W3C.CR-xpath-31-20170321" format="default" sectionFormat="of" derivedContent="W3C.CR-xpath-31-20170321"/>, which represents a path to select an element (or a set of elements) in a JSON document <xref target="RFC8259" format="default" sectionFormat="of" derivedContent="RFC8259"/>.  For example, the jsonpath to select the value of the ASCII name inside an RDAP domain lookup response is "$.ldhName", where $ identifies the root of the document object model (DOM).  Another way to select a value inside a JSON document is the JSON Pointer <xref target="RFC6901" format="default" sectionFormat="of" derivedContent="RFC6901"/>.</t>
          <t indent="0" pn="section-2.3.1-3">While JSONPath and JSON Pointer are both commonly adopted
          notations to select any value inside JSON data, neither is
          particularly concise and easy to use
          (e.g., "$.domainSearchResults[*].events[?(@.eventAction='registration')].eventDate"
          is the jsonpath of the registration date in an RDAP domain search
          response).</t>
          <t indent="0" pn="section-2.3.1-4">Therefore, this specification defines the "property-ref" element in terms of names identifying RDAP properties.  However, not all the RDAP properties are suitable to be used in sort criteria. These properties include:</t>
          <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.3.1-5">
            <li pn="section-2.3.1-5.1">
              <t indent="0" pn="section-2.3.1-5.1.1">properties providing service information (e.g., links, notices, and remarks)</t>
            </li>
            <li pn="section-2.3.1-5.2">
              <t indent="0" pn="section-2.3.1-5.2.1">multivalued properties (e.g., status, roles, and variants)</t>
            </li>
            <li pn="section-2.3.1-5.3">properties representing relationships to other objects (e.g., entities)</li>
          </ul>
          <t indent="0" pn="section-2.3.1-6">On the contrary, properties expressed as values of other
          properties (e.g., registration date) could be used in such a
          context.</t>
          <t indent="0" pn="section-2.3.1-7">A list of properties an RDAP server <bcp14>MAY</bcp14> implement
          is defined.  The properties are divided into two groups:
          object-common properties and object-specific properties.</t>
          <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.3.1-8">
            <li pn="section-2.3.1-8.1">
              <t indent="0" pn="section-2.3.1-8.1.1">Object-common properties. Object-common properties are derived from merging the "eventAction" and the "eventDate" properties. The following values of the "sort" parameter are defined:</t>
              <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.3.1-8.1.2">
                <li pn="section-2.3.1-8.1.2.1">registrationDate
</li>
                <li pn="section-2.3.1-8.1.2.2">reregistrationDate
</li>
                <li pn="section-2.3.1-8.1.2.3">lastChangedDate
</li>
                <li pn="section-2.3.1-8.1.2.4">expirationDate
</li>
                <li pn="section-2.3.1-8.1.2.5">deletionDate
</li>
                <li pn="section-2.3.1-8.1.2.6">reinstantiationDate
</li>
                <li pn="section-2.3.1-8.1.2.7">transferDate
</li>
                <li pn="section-2.3.1-8.1.2.8">lockedDate
</li>
                <li pn="section-2.3.1-8.1.2.9">unlockedDate
</li>
              </ul>
            </li>
            <li pn="section-2.3.1-8.2">
              <t indent="0" pn="section-2.3.1-8.2.1">Object-specific properties. Note that some of these properties are also defined as query path segments. These properties include:</t>
              <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.3.1-8.2.2">
                <li pn="section-2.3.1-8.2.2.1">Domain: name
</li>
                <li pn="section-2.3.1-8.2.2.2">Nameserver: name, ipv4, ipv6
</li>
                <li pn="section-2.3.1-8.2.2.3">Entity: fn, handle, org, email, voice, country, cc, city
</li>
              </ul>
            </li>
          </ul>
          <t indent="0" pn="section-2.3.1-9">The correspondence between these sorting properties and the RDAP
          object classes is shown in <xref target="table_sorting_properties_definition" format="default" sectionFormat="of" derivedContent="Table 1"/>.  Some of the sorting
          properties defined for the RDAP entity class are related to jCard
          elements <xref target="RFC7095" format="default" sectionFormat="of" derivedContent="RFC7095"/>, but because jCard is the JSON format
          for vCard, the corresponding definitions
          are included in the vCard specification <xref target="RFC6350" format="default" sectionFormat="of" derivedContent="RFC6350"/>.</t>
          <t indent="0" pn="section-2.3.1-10">An RDAP server <bcp14>MUST NOT</bcp14> use the defined sorting
          properties with a meaning other than that described in <xref target="table_sorting_properties_definition" format="default" sectionFormat="of" derivedContent="Table 1"/>.</t>
          <table anchor="table_sorting_properties_definition" align="center" pn="table-1">
            <name slugifiedName="name-definitions-of-sorting-prop">Definitions of Sorting Properties</name>
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Object class</th>
                <th align="left" colspan="1" rowspan="1">Sorting property</th>
                <th align="left" colspan="1" rowspan="1">RDAP property</th>
                <th align="left" colspan="1" rowspan="1">RFC 7483</th>
                <th align="left" colspan="1" rowspan="1">RFC 6350</th>
                <th align="left" colspan="1" rowspan="1">RFC 8605</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">Searchable objects</td>
                <td align="left" colspan="1" rowspan="1">Common properties</td>
                <td align="left" colspan="1" rowspan="1">eventAction values suffixed by "Date"</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="4.5" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-4.5" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">Domain</td>
                <td align="left" colspan="1" rowspan="1">name</td>
                <td align="left" colspan="1" rowspan="1">unicodeName/ ldhName</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.3" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.3" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">Nameserver</td>
                <td align="left" colspan="1" rowspan="1">name</td>
                <td align="left" colspan="1" rowspan="1">unicodeName/ ldhName</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.2" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.2" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">ipv4</td>
                <td align="left" colspan="1" rowspan="1">v4 ipAddress</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.2" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.2" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">ipv6</td>
                <td align="left" colspan="1" rowspan="1">v6 ipAddress</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.2" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.2" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">Entity</td>
                <td align="left" colspan="1" rowspan="1">handle</td>
                <td align="left" colspan="1" rowspan="1">handle</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.1" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">fn</td>
                <td align="left" colspan="1" rowspan="1">jCard fn</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.1" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC6350" section="6.2.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6350#section-6.2.1" derivedContent="RFC6350"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">org</td>
                <td align="left" colspan="1" rowspan="1">jCard org</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.1" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC6350" section="6.6.4" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6350#section-6.6.4" derivedContent="RFC6350"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">voice</td>
                <td align="left" colspan="1" rowspan="1">jCard tel with type="voice"</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.1" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC6350" section="6.4.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6350#section-6.4.1" derivedContent="RFC6350"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">email</td>
                <td align="left" colspan="1" rowspan="1">jCard email</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.1" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC6350" section="6.4.2" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6350#section-6.4.2" derivedContent="RFC6350"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">country</td>
                <td align="left" colspan="1" rowspan="1">country name in jCard adr</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.1" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC6350" section="6.3.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6350#section-6.3.1" derivedContent="RFC6350"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">cc</td>
                <td align="left" colspan="1" rowspan="1">country code in jCard adr</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.1" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC8605" section="3.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8605#section-3.1" derivedContent="RFC8605"/></td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">city</td>
                <td align="left" colspan="1" rowspan="1">locality in jCard adr</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC7483" section="5.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7483#section-5.1" derivedContent="RFC7483"/></td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="RFC6350" section="6.3.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6350#section-6.3.1" derivedContent="RFC6350"/></td>
                <td align="left" colspan="1" rowspan="1"/>
              </tr>
            </tbody>
          </table>
          <t indent="0" pn="section-2.3.1-12">Regarding the definitions in <xref target="table_sorting_properties_definition" format="default" sectionFormat="of" derivedContent="Table 1"/>, some further considerations are needed to disambiguate some cases:</t>
          <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.3.1-13">
            <li pn="section-2.3.1-13.1">
              <t indent="0" pn="section-2.3.1-13.1.1">Since the response to a search on either domains or nameservers might include both A-labels and U-labels <xref target="RFC5890" format="default" sectionFormat="of" derivedContent="RFC5890"/> in general, a consistent sorting policy <bcp14>MUST</bcp14> treat the unicodeName and ldhName as two representations of the same value.  The unicodeName value <bcp14>MUST</bcp14> be used while sorting if it is present; when the unicodeName is unavailable, the value of the ldhName <bcp14>MUST</bcp14> be used instead.</t>
            </li>
            <li pn="section-2.3.1-13.2">
              <t indent="0" pn="section-2.3.1-13.2.1">The jCard "sort-as" parameter <bcp14>MUST</bcp14> be ignored for the sorting capability described in this document.</t>
            </li>
            <li pn="section-2.3.1-13.3">
              <t indent="0" pn="section-2.3.1-13.3.1">Even if a nameserver can have multiple IPv4 and IPv6 addresses, the most common configuration includes one address for each IP version.  Therefore, this specification makes the assumption that nameservers have a single IPv4 and/or IPv6 value.  When more than one address per IP version is presented, sorting <bcp14>MUST</bcp14> be applied to the first value.</t>
            </li>
            <li pn="section-2.3.1-13.4">
              <t indent="0" pn="section-2.3.1-13.4.1">Multiple events with a given action on an object might be returned.  If this occurs, sorting <bcp14>MUST</bcp14> be applied to the most recent event.</t>
            </li>
            <li pn="section-2.3.1-13.5">Except for handle values, all the sorting properties defined for entity objects can be multivalued according to the definition of vCard as given in <xref target="RFC6350" format="default" sectionFormat="of" derivedContent="RFC6350"/>.  When more than one value is presented, sorting <bcp14>MUST</bcp14> be applied to the preferred value identified by the parameter pref="1".  If the "pref" parameter is missing, sorting <bcp14>MUST</bcp14> be applied to the first value.</li>
          </ul>
          <t indent="0" pn="section-2.3.1-14">The "jsonPath" field in the "sorting_metadata" element is used to clarify the RDAP response field the sorting property refers to.  The mapping between the sorting properties and the jsonpaths of the RDAP response fields is shown below.  The JSONPath operators used herein are described in <xref target="jsonpath-operators" format="default" sectionFormat="of" derivedContent="Appendix A"/>.</t>
          <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.3.1-15">
            <li pn="section-2.3.1-15.1">
              <t indent="0" pn="section-2.3.1-15.1.1">Searchable objects
              </t>
              <dl newline="true" indent="3" spacing="normal" pn="section-2.3.1-15.1.2">
                <dt pn="section-2.3.1-15.1.2.1">registrationDate</dt>
                <dd pn="section-2.3.1-15.1.2.2">
                  <t indent="0" pn="section-2.3.1-15.1.2.2.1">$.domainSearchResults[*].events[?(@.eventAction=="registration")].eventDate</t>
                </dd>
                <dt pn="section-2.3.1-15.1.2.3">reregistrationDate</dt>
                <dd pn="section-2.3.1-15.1.2.4">
                  <t indent="0" pn="section-2.3.1-15.1.2.4.1">$.domainSearchResults[*].events[?(@.eventAction=="reregistration")].eventDate</t>
                </dd>
                <dt pn="section-2.3.1-15.1.2.5">lastChangedDate</dt>
                <dd pn="section-2.3.1-15.1.2.6">
                  <t indent="0" pn="section-2.3.1-15.1.2.6.1">$.domainSearchResults[*].events[?(@.eventAction=="last changed")].eventDate</t>
                </dd>
                <dt pn="section-2.3.1-15.1.2.7">expirationDate</dt>
                <dd pn="section-2.3.1-15.1.2.8">
                  <t indent="0" pn="section-2.3.1-15.1.2.8.1">$.domainSearchResults[*].events[?(@.eventAction=="expiration")].eventDate</t>
                </dd>
                <dt pn="section-2.3.1-15.1.2.9">deletionDate</dt>
                <dd pn="section-2.3.1-15.1.2.10">
                  <t indent="0" pn="section-2.3.1-15.1.2.10.1">$.domainSearchResults[*].events[?(@.eventAction=="deletion")].eventDate</t>
                </dd>
                <dt pn="section-2.3.1-15.1.2.11">reinstantiationDate</dt>
                <dd pn="section-2.3.1-15.1.2.12">
                  <t indent="0" pn="section-2.3.1-15.1.2.12.1">$.domainSearchResults[*].events[?(@.eventAction=="reinstantiation")].eventDate</t>
                </dd>
                <dt pn="section-2.3.1-15.1.2.13">transferDate</dt>
                <dd pn="section-2.3.1-15.1.2.14">
                  <t indent="0" pn="section-2.3.1-15.1.2.14.1">$.domainSearchResults[*].events[?(@.eventAction=="transfer")].eventDate</t>
                </dd>
                <dt pn="section-2.3.1-15.1.2.15">lockedDate</dt>
                <dd pn="section-2.3.1-15.1.2.16">
                  <t indent="0" pn="section-2.3.1-15.1.2.16.1">$.domainSearchResults[*].events[?(@.eventAction=="locked")].eventDate</t>
                </dd>
                <dt pn="section-2.3.1-15.1.2.17">unlockedDate</dt>
                <dd pn="section-2.3.1-15.1.2.18">
                  <t indent="0" pn="section-2.3.1-15.1.2.18.1">$.domainSearchResults[*].events[?(@.eventAction=="unlocked")].eventDate</t>
                </dd>
              </dl>
            </li>
            <li pn="section-2.3.1-15.2">
              <t indent="0" pn="section-2.3.1-15.2.1">Domain
              </t>
              <dl newline="true" indent="3" spacing="normal" pn="section-2.3.1-15.2.2">
                <dt pn="section-2.3.1-15.2.2.1">name</dt>
                <dd pn="section-2.3.1-15.2.2.2">
                  <t indent="0" pn="section-2.3.1-15.2.2.2.1">$.domainSearchResults[*].[unicodeName,ldhName]</t>
                </dd>
              </dl>
            </li>
            <li pn="section-2.3.1-15.3">
              <t indent="0" pn="section-2.3.1-15.3.1">Nameserver
              </t>
              <dl newline="true" indent="3" spacing="normal" pn="section-2.3.1-15.3.2">
                <dt pn="section-2.3.1-15.3.2.1">name</dt>
                <dd pn="section-2.3.1-15.3.2.2">
                  <t indent="0" pn="section-2.3.1-15.3.2.2.1">$.nameserverSearchResults[*].[unicodeName,ldhName]</t>
                </dd>
                <dt pn="section-2.3.1-15.3.2.3">ipv4</dt>
                <dd pn="section-2.3.1-15.3.2.4">
                  <t indent="0" pn="section-2.3.1-15.3.2.4.1">$.nameserverSearchResults[*].ipAddresses.v4[0]</t>
                </dd>
                <dt pn="section-2.3.1-15.3.2.5">ipv6</dt>
                <dd pn="section-2.3.1-15.3.2.6">
                  <t indent="0" pn="section-2.3.1-15.3.2.6.1">$.nameserverSearchResults[*].ipAddresses.v6[0]</t>
                </dd>
              </dl>
            </li>
            <li pn="section-2.3.1-15.4">
              <t indent="0" pn="section-2.3.1-15.4.1">Entity
              </t>
              <dl newline="true" indent="3" spacing="normal" pn="section-2.3.1-15.4.2">
                <dt pn="section-2.3.1-15.4.2.1">handle</dt>
                <dd pn="section-2.3.1-15.4.2.2">
                  <t indent="0" pn="section-2.3.1-15.4.2.2.1">$.entitySearchResults[*].handle</t>
                </dd>
                <dt pn="section-2.3.1-15.4.2.3">fn</dt>
                <dd pn="section-2.3.1-15.4.2.4">
                  <t indent="0" pn="section-2.3.1-15.4.2.4.1">$.entitySearchResults[*].vcardArray[1][?(@[0]=="fn")][3]</t>
                </dd>
                <dt pn="section-2.3.1-15.4.2.5">org</dt>
                <dd pn="section-2.3.1-15.4.2.6">
                  <t indent="0" pn="section-2.3.1-15.4.2.6.1">$.entitySearchResults[*].vcardArray[1][?(@[0]=="org")][3]</t>
                </dd>
                <dt pn="section-2.3.1-15.4.2.7">voice</dt>
                <dd pn="section-2.3.1-15.4.2.8">
                  <t indent="0" pn="section-2.3.1-15.4.2.8.1">$.entitySearchResults[*].vcardArray[1][?(@[0]=="tel" &amp;&amp; @[1].type=="voice")][3]</t>
                </dd>
                <dt pn="section-2.3.1-15.4.2.9">email</dt>
                <dd pn="section-2.3.1-15.4.2.10">
                  <t indent="0" pn="section-2.3.1-15.4.2.10.1">$.entitySearchResults[*].vcardArray[1][?(@[0]=="email")][3]</t>
                </dd>
                <dt pn="section-2.3.1-15.4.2.11">country</dt>
                <dd pn="section-2.3.1-15.4.2.12">
                  <t indent="0" pn="section-2.3.1-15.4.2.12.1">$.entitySearchResults[*].vcardArray[1][?(@[0]=="adr")][3][6]</t>
                </dd>
                <dt pn="section-2.3.1-15.4.2.13">cc</dt>
                <dd pn="section-2.3.1-15.4.2.14">
                  <t indent="0" pn="section-2.3.1-15.4.2.14.1">$.entitySearchResults[*].vcardArray[1][?(@[0]=="adr")][1].cc</t>
                </dd>
                <dt pn="section-2.3.1-15.4.2.15">city</dt>
                <dd pn="section-2.3.1-15.4.2.16">
                  <t indent="0" pn="section-2.3.1-15.4.2.16.1">$.entitySearchResults[*].vcardArray[1][?(@[0]=="adr")][3][3]</t>
                </dd>
              </dl>
            </li>
          </ul>
          <t indent="0" pn="section-2.3.1-16">Additional notes on the provided jsonpaths:</t>
          <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.3.1-17">
            <li pn="section-2.3.1-17.1">
              <t indent="0" pn="section-2.3.1-17.1.1">Those related to the event dates are defined only for the
              "domain" object.  To obtain the equivalent jsonpaths for
              "entity" and "nameserver", the path segment
              "domainSearchResults" must be replaced with
              "entitySearchResults" and "nameserverSearchResults",
              respectively.</t>
            </li>
            <li pn="section-2.3.1-17.2">Those related to jCard elements are specified without taking
            into account the "pref" parameter.  Servers that sort those values
            identified by the "pref" parameter <bcp14>SHOULD</bcp14> update a
            jsonpath by adding an appropriate filter.  For example, if the
            email values identified by pref="1" are considered for sorting,
            the jsonpath of the "email" sorting property should be
            $.entitySearchResults[*].vcardArray[1][?(@[0]=="email" &amp;&amp;
            @[1].pref=="1")][3].</li>
          </ul>
        </section>
        <section anchor="sorting_links" numbered="true" removeInRFC="false" toc="include" pn="section-2.3.2">
          <name slugifiedName="name-representing-sorting-links">Representing Sorting Links</name>
          <t indent="0" pn="section-2.3.2-1">An RDAP server <bcp14>MAY</bcp14> use the "links" array of the "sorting_metadata" element to provide ready-made references <xref target="RFC8288" format="default" sectionFormat="of" derivedContent="RFC8288"/> to the available sort criteria (<xref target="sort-link-in-response-example" format="default" sectionFormat="of" derivedContent="Figure 2"/>).  Each link represents a reference to an alternate view of the results.</t>
          <t indent="0" pn="section-2.3.2-2">The "value", "rel", and "href" JSON values <bcp14>MUST</bcp14> be specified.  All other JSON values are <bcp14>OPTIONAL</bcp14>.</t>
          <figure anchor="sort-link-in-response-example" align="left" suppress-title="false" pn="figure-2">
            <name slugifiedName="name-example-of-a-sorting_metada">Example of a "sorting_metadata" Instance to Implement Result Sorting</name>
            <sourcecode type="json" markers="false" pn="section-2.3.2-3.1">
{
  "rdapConformance": [
    "rdap_level_0",
    "sorting"
  ],
  ...
  "sorting_metadata": {
     "currentSort": "name",
     "availableSorts": [
       {
       "property": "registrationDate",
       "jsonPath": "$.domainSearchResults[*]
          .events[?(@.eventAction==\"registration\")].eventDate",
       "default": false,
       "links": [
         {
         "value": "https://example.com/rdap/domains?name=example*.com
                   &amp;sort=name",
         "rel": "alternate",
         "href": "https://example.com/rdap/domains?name=example*.com
                  &amp;sort=registrationDate",
         "title": "Result Ascending Sort Link",
         "type": "application/rdap+json"
         },
         {
         "value": "https://example.com/rdap/domains?name=example*.com
                   &amp;sort=name",
         "rel": "alternate",
         "href": "https://example.com/rdap/domains?name=example*.com
                  &amp;sort=registrationDate:d",
         "title": "Result Descending Sort Link",
         "type": "application/rdap+json"
         }
       ]
       },
       ...
     ]
  },
  "domainSearchResults": [
    ...
  ]
}
</sourcecode>
          </figure>
        </section>
      </section>
      <section anchor="cursor-parameter" numbered="true" removeInRFC="false" toc="include" pn="section-2.4">
        <name slugifiedName="name-cursor-parameter">"cursor" Parameter</name>
        <t indent="0" pn="section-2.4-1">The "cursor" parameter defined in this specification can be used to
        encode information about any pagination method.  For example, in the
        case of a simple implementation of the "cursor" parameter to represent
        offset pagination information, the "cursor" value
        "b2Zmc2V0PTEwMCxsaW1pdD01MA==" is the base64 encoding of
        "offset=100,limit=50".  Likewise, in a simple implementation to
        represent keyset pagination information, the "cursor" value
        "ZXhhbXBsZS1OLmNvbQ==" represents the base64 encoding of
        "key=example-N.com" whereby the key value identifies the last row of
        the current page.</t>
        <t indent="0" pn="section-2.4-2">Note that this specification uses a base64 encoding for cursor
        obfuscation just for example.  RDAP servers are <bcp14>NOT RECOMMENDED</bcp14> to obfuscate the "cursor" value through a mere
        base64 encoding.</t>
        <t indent="0" pn="section-2.4-3">This solution lets RDAP providers implement a pagination method
        according to their needs, a user's access level, and the submitted
        query.  Besides, servers can change the method over time without
        announcing anything to clients.  The considerations that have led to
        this solution are described in more detail in <xref target="approaches-to-result-pagination" format="default" sectionFormat="of" derivedContent="Appendix B"/>.</t>
        <t indent="0" pn="section-2.4-4">The ABNF syntax of the "cursor" parameter is the following:</t>
        <sourcecode type="abnf" markers="false" pn="section-2.4-5">
   cursor = "cursor=" 1*( ALPHA / DIGIT / "/" / "=" / "-" / "_" )
</sourcecode>
        <t indent="0" pn="section-2.4-6">The following is an example of an RDAP query including the "cursor" parameter:</t>
        <t indent="0" pn="section-2.4-7">https://example.com/rdap/domains?name=example*.com
&amp;cursor=wJlCDLIl6KTWypN7T6vc6nWEmEYe99Hjf1XY1xmqV-M=
        </t>
        <section anchor="cursor_paging_links" numbered="true" removeInRFC="false" toc="include" pn="section-2.4.1">
          <name slugifiedName="name-representing-paging-links">Representing Paging Links</name>
          <t indent="0" pn="section-2.4.1-1">An RDAP server <bcp14>SHOULD</bcp14> use the "links" array of the "paging_metadata" element to provide a ready-made reference <xref target="RFC8288" format="default" sectionFormat="of" derivedContent="RFC8288"/> to the next page of the result set (<xref target="cursor-pagination-link-in-response-example" format="default" sectionFormat="of" derivedContent="Figure 3"/>).  Examples of additional "rel" values a server <bcp14>MAY</bcp14> implement are "first", "last", and "prev".</t>
          <figure anchor="cursor-pagination-link-in-response-example" align="left" suppress-title="false" pn="figure-3">
            <name slugifiedName="name-example-of-a-paging_metadat">Example of a "paging_metadata" Instance to Implement Cursor Pagination</name>
            <sourcecode type="json" markers="false" pn="section-2.4.1-2.1">
{
  "rdapConformance": [
    "rdap_level_0",
    "paging"
  ],
  ...
  "notices": [
    {
      "title": "Search query limits",
      "type": "result set truncated due to excessive load",
      "description": [
      "search results for domains are limited to 50"
      ]
    }
  ],
  "paging_metadata": {
    "totalCount": 73,
    "pageSize": 50,
    "pageNumber": 1,
    "links": [
      {
      "value": "https://example.com/rdap/domains?name=example*.com",
      "rel": "next",
      "href": "https://example.com/rdap/domains?name=example*.com
              &amp;cursor=wJlCDLIl6KTWypN7T6vc6nWEmEYe99Hjf1XY1xmqV-M=",
      "title": "Result Pagination Link",
      "type": "application/rdap+json"
      }
    ]
  },
  "domainSearchResults": [
    ...
  ]
}
</sourcecode>
          </figure>
        </section>
      </section>
    </section>
    <section anchor="negative-answers" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-negative-answers">Negative Answers</name>
      <t indent="0" pn="section-3-1">The constraints for the values of parameters are defined by their ABNF
      syntax.  Therefore, each request that includes an invalid value for a
      parameter <bcp14>SHOULD</bcp14> produce an HTTP 400 (Bad Request)
      response code.  The same response <bcp14>SHOULD</bcp14> be returned in
      the following cases:

</t>
      <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-3-2">
        <li pn="section-3-2.1">
          <t indent="0" pn="section-3-2.1.1">if sorting by either single or multiple properties, the client provides an
unsupported value for the "sort" parameter, as well as a value related to an
object property not included in the response
</t>
        </li>
        <li pn="section-3-2.2">if the client submits an invalid value for the "cursor" parameter</li>
      </ul>
      <t indent="0" pn="section-3-3">Optionally, the response <bcp14>MAY</bcp14> include additional information regarding either the supported sorting properties or the correct "cursor" value in the HTTP entity body (<xref target="sorting-property-error" format="default" sectionFormat="of" derivedContent="Figure 4"/>).</t>
      <figure anchor="sorting-property-error" align="left" suppress-title="false" pn="figure-4">
        <name slugifiedName="name-example-of-rdap-error-respo">Example of RDAP Error Response Due to an Invalid Domain Sorting Property Included in the Request</name>
        <sourcecode type="json" markers="false" pn="section-3-4.1">
{
    "errorCode": 400,
    "title": "Domain sorting property 'unknown' is not valid",
    "description": [
        "Supported domain sorting properties are:"
        "'aproperty', 'anotherproperty'"
    ]

}
</sourcecode>
      </figure>
    </section>
    <section anchor="implementation-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-implementation-consideratio">Implementation Considerations</name>
      <t indent="0" pn="section-4-1">Implementation of the new parameters is technically feasible, as
      operators for counting, sorting, and paging are currently supported by
      the major relational database management systems.  Similar operators are
      completely or partially supported by the most well-known NoSQL databases
      (e.g., MongoDB, CouchDB, HBase, Cassandra, Hadoop, etc.).  Additional
      implementation notes are included in <xref target="additional-implementation-notes" format="default" sectionFormat="of" derivedContent="Appendix C"/>.</t>
    </section>
    <section anchor="IANA-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-5-1">IANA has registered the following values in the "RDAP Extensions"
      registry:</t>
      <dl spacing="compact" indent="3" newline="false" pn="section-5-2">
        <dt pn="section-5-2.1">Extension identifier:
</dt>
        <dd pn="section-5-2.2">paging
</dd>
        <dt pn="section-5-2.3">Registry operator:
</dt>
        <dd pn="section-5-2.4">Any
</dd>
        <dt pn="section-5-2.5">Published specification:
</dt>
        <dd pn="section-5-2.6">RFC 8977
</dd>
        <dt pn="section-5-2.7">Contact:
</dt>
        <dd pn="section-5-2.8">IETF &lt;iesg@ietf.org&gt;
</dd>
        <dt pn="section-5-2.9">Intended usage:
</dt>
        <dd pn="section-5-2.10">This extension describes a best practice for result set paging.
</dd>
      </dl>
      <dl spacing="compact" indent="3" newline="false" pn="section-5-3">
        <dt pn="section-5-3.1">Extension identifier:
</dt>
        <dd pn="section-5-3.2">sorting
</dd>
        <dt pn="section-5-3.3">Registry operator:
</dt>
        <dd pn="section-5-3.4">Any
</dd>
        <dt pn="section-5-3.5">Published specification:
</dt>
        <dd pn="section-5-3.6">RFC 8977
</dd>
        <dt pn="section-5-3.7">Contact:
</dt>
        <dd pn="section-5-3.8">IETF &lt;iesg@ietf.org&gt;
</dd>
        <dt pn="section-5-3.9">Intended usage: 
</dt>
        <dd pn="section-5-3.10">This extension describes a best practice for result set sorting.
</dd>
      </dl>
    </section>
    <section anchor="security-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-6-1">Security services for the operations specified in this document are described in <xref target="RFC7481" format="default" sectionFormat="of" derivedContent="RFC7481"/>.</t>
      <t indent="0" pn="section-6-2">A search query typically requires more server resources (such as memory, CPU cycles, and network bandwidth) when compared to a lookup query.  This increases the risk of server resource exhaustion and subsequent denial of service.  This risk can be mitigated by either restricting search functionality or limiting the rate of search requests.  Servers can also reduce their load by truncating the results in a response.  However, this last security policy can result in a higher inefficiency or risk due to acting on incomplete information if the RDAP server does not provide any functionality to return the truncated results.</t>
      <t indent="0" pn="section-6-3">The new parameters presented in this document provide RDAP operators with a way to implement a server that reduces inefficiency risks.  The "count" parameter gives the client the ability to evaluate the completeness of a response.  The "sort" parameter allows the client to obtain the most relevant information at the beginning of the result set.  This can reduce the number of unnecessary search requests.  Finally, the "cursor" parameter enables the user to scroll the result set by submitting a sequence of sustainable queries within server-acceptable limits.</t>
    </section>
  </middle>
  <back>
    <references pn="section-7">
      <name slugifiedName="name-references">References</name>
      <references pn="section-7.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t indent="0">In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC5234" target="https://www.rfc-editor.org/info/rfc5234" quoteTitle="true" derivedAnchor="RFC5234">
          <front>
            <title>Augmented BNF for Syntax Specifications: ABNF</title>
            <author initials="D." surname="Crocker" fullname="D. Crocker" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Overell" fullname="P. Overell">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="January"/>
            <abstract>
              <t indent="0">Internet technical specifications often need to define a formal syntax.  Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications.  The current specification documents ABNF. It balances compactness and simplicity with reasonable representational power.  The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges.  This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="68"/>
          <seriesInfo name="RFC" value="5234"/>
          <seriesInfo name="DOI" value="10.17487/RFC5234"/>
        </reference>
        <reference anchor="RFC5890" target="https://www.rfc-editor.org/info/rfc5890" quoteTitle="true" derivedAnchor="RFC5890">
          <front>
            <title>Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework</title>
            <author initials="J." surname="Klensin" fullname="J. Klensin">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="August"/>
            <abstract>
              <t indent="0">This document is one of a collection that, together, describe the protocol and usage context for a revision of Internationalized Domain Names for Applications (IDNA), superseding the earlier version.  It describes the document collection and provides definitions and other material that are common to the set.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5890"/>
          <seriesInfo name="DOI" value="10.17487/RFC5890"/>
        </reference>
        <reference anchor="RFC6350" target="https://www.rfc-editor.org/info/rfc6350" quoteTitle="true" derivedAnchor="RFC6350">
          <front>
            <title>vCard Format Specification</title>
            <author initials="S." surname="Perreault" fullname="S. Perreault">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="August"/>
            <abstract>
              <t indent="0">This document defines the vCard data format for representing and exchanging a variety of information about individuals and other entities (e.g., formatted and structured name and delivery addresses, email address, multiple telephone numbers, photograph, logo, audio clips, etc.).  This document obsoletes RFCs 2425, 2426, and 4770, and updates RFC 2739.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6350"/>
          <seriesInfo name="DOI" value="10.17487/RFC6350"/>
        </reference>
        <reference anchor="RFC7095" target="https://www.rfc-editor.org/info/rfc7095" quoteTitle="true" derivedAnchor="RFC7095">
          <front>
            <title>jCard: The JSON Format for vCard</title>
            <author initials="P." surname="Kewisch" fullname="P. Kewisch">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="January"/>
            <abstract>
              <t indent="0">This specification defines "jCard", a JSON format for vCard data. The vCard data format is a text format for representing and exchanging information about individuals and other entities, for example, telephone numbers, email addresses, structured names, and delivery addresses.  JSON is a lightweight, text-based, language- independent data interchange format commonly used in Internet applications.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7095"/>
          <seriesInfo name="DOI" value="10.17487/RFC7095"/>
        </reference>
        <reference anchor="RFC7230" target="https://www.rfc-editor.org/info/rfc7230" quoteTitle="true" derivedAnchor="RFC7230">
          <front>
            <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
            <author initials="R." surname="Fielding" fullname="R. Fielding" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Reschke" fullname="J. Reschke" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="June"/>
            <abstract>
              <t indent="0">The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems.  This document provides an overview of HTTP architecture and its associated terminology, defines the "http" and "https" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7230"/>
          <seriesInfo name="DOI" value="10.17487/RFC7230"/>
        </reference>
        <reference anchor="RFC7231" target="https://www.rfc-editor.org/info/rfc7231" quoteTitle="true" derivedAnchor="RFC7231">
          <front>
            <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
            <author initials="R." surname="Fielding" fullname="R. Fielding" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Reschke" fullname="J. Reschke" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="June"/>
            <abstract>
              <t indent="0">The Hypertext Transfer Protocol (HTTP) is a stateless \%application- level protocol for distributed, collaborative, hypertext information systems.  This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7231"/>
          <seriesInfo name="DOI" value="10.17487/RFC7231"/>
        </reference>
        <reference anchor="RFC7480" target="https://www.rfc-editor.org/info/rfc7480" quoteTitle="true" derivedAnchor="RFC7480">
          <front>
            <title>HTTP Usage in the Registration Data Access Protocol (RDAP)</title>
            <author initials="A." surname="Newton" fullname="A. Newton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="Ellacott" fullname="B. Ellacott">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Kong" fullname="N. Kong">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">This document is one of a collection that together describes the Registration Data Access Protocol (RDAP).  It describes how RDAP is transported using the Hypertext Transfer Protocol (HTTP).  RDAP is a successor protocol to the very old WHOIS protocol.  The purpose of this document is to clarify the use of standard HTTP mechanisms for this application.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7480"/>
          <seriesInfo name="DOI" value="10.17487/RFC7480"/>
        </reference>
        <reference anchor="RFC7481" target="https://www.rfc-editor.org/info/rfc7481" quoteTitle="true" derivedAnchor="RFC7481">
          <front>
            <title>Security Services for the Registration Data Access Protocol (RDAP)</title>
            <author initials="S." surname="Hollenbeck" fullname="S. Hollenbeck">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Kong" fullname="N. Kong">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">The Registration Data Access Protocol (RDAP) provides "RESTful" web services to retrieve registration metadata from Domain Name and Regional Internet Registries.  This document describes information security services, including access control, authentication, authorization, availability, data confidentiality, and data integrity for RDAP.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7481"/>
          <seriesInfo name="DOI" value="10.17487/RFC7481"/>
        </reference>
        <reference anchor="RFC7482" target="https://www.rfc-editor.org/info/rfc7482" quoteTitle="true" derivedAnchor="RFC7482">
          <front>
            <title>Registration Data Access Protocol (RDAP) Query Format</title>
            <author initials="A." surname="Newton" fullname="A. Newton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Hollenbeck" fullname="S. Hollenbeck">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">This document describes uniform patterns to construct HTTP URLs that may be used to retrieve registration information from registries (including both Regional Internet Registries (RIRs) and Domain Name Registries (DNRs)) using "RESTful" web access patterns.  These uniform patterns define the query syntax for the Registration Data Access Protocol (RDAP).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7482"/>
          <seriesInfo name="DOI" value="10.17487/RFC7482"/>
        </reference>
        <reference anchor="RFC7483" target="https://www.rfc-editor.org/info/rfc7483" quoteTitle="true" derivedAnchor="RFC7483">
          <front>
            <title>JSON Responses for the Registration Data Access Protocol (RDAP)</title>
            <author initials="A." surname="Newton" fullname="A. Newton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Hollenbeck" fullname="S. Hollenbeck">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">This document describes JSON data structures representing registration information maintained by Regional Internet Registries (RIRs) and Domain Name Registries (DNRs).  These data structures are used to form Registration Data Access Protocol (RDAP) query responses.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7483"/>
          <seriesInfo name="DOI" value="10.17487/RFC7483"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t indent="0">RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8259" target="https://www.rfc-editor.org/info/rfc8259" quoteTitle="true" derivedAnchor="RFC8259">
          <front>
            <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
            <author initials="T." surname="Bray" fullname="T. Bray" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="December"/>
            <abstract>
              <t indent="0">JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format.  It was derived from the ECMAScript Programming Language Standard.  JSON defines a small set of formatting rules for the portable representation of structured data.</t>
              <t indent="0">This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="90"/>
          <seriesInfo name="RFC" value="8259"/>
          <seriesInfo name="DOI" value="10.17487/RFC8259"/>
        </reference>
        <reference anchor="RFC8288" target="https://www.rfc-editor.org/info/rfc8288" quoteTitle="true" derivedAnchor="RFC8288">
          <front>
            <title>Web Linking</title>
            <author initials="M." surname="Nottingham" fullname="M. Nottingham">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="October"/>
            <abstract>
              <t indent="0">This specification defines a model for the relationships between resources on the Web ("links") and the type of those relationships ("link relation types").</t>
              <t indent="0">It also defines the serialisation of such links in HTTP headers with the Link header field.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8288"/>
          <seriesInfo name="DOI" value="10.17487/RFC8288"/>
        </reference>
        <reference anchor="RFC8605" target="https://www.rfc-editor.org/info/rfc8605" quoteTitle="true" derivedAnchor="RFC8605">
          <front>
            <title>vCard Format Extensions: ICANN Extensions for the Registration Data Access Protocol (RDAP)</title>
            <author initials="S." surname="Hollenbeck" fullname="S. Hollenbeck">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Carney" fullname="R. Carney">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019" month="May"/>
            <abstract>
              <t indent="0">This document defines extensions to the vCard data format for representing and exchanging contact information used to implement the Internet Corporation for Assigned Names and Numbers (ICANN) operational profile for the Registration Data Access Protocol (RDAP). The property and parameter defined here are used to add values to RDAP responses that are consistent with ICANN policies.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8605"/>
          <seriesInfo name="DOI" value="10.17487/RFC8605"/>
        </reference>
      </references>
      <references pn="section-7.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="CURSOR" target="https://www.sitepoint.com/paginating-real-time-data-cursor-based-pagination/" quoteTitle="true" derivedAnchor="CURSOR">
          <front>
            <title>Paginating Real-Time Data with Cursor Based Pagination</title>
            <author initials="R." surname="Nimesh" fullname="Rakhitha Nimesh">
		</author>
            <date year="2014" month="July"/>
          </front>
        </reference>
        <reference anchor="CURSOR-API1" target="https://developers.facebook.com/docs/graph-api/using-graph-api" quoteTitle="true" derivedAnchor="CURSOR-API1">
          <front>
            <title>Facebook for Developers -- Using the Graph API</title>
            <author>
              <organization showOnFrontPage="true">Facebook</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="CURSOR-API2" target="https://developer.twitter.com/en/docs/twitter-ads-api" quoteTitle="true" derivedAnchor="CURSOR-API2">
          <front>
            <title>Twitter Ads API</title>
            <author>
              <organization showOnFrontPage="true">Twitter</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="GOESSNER-JSON-PATH" target="https://goessner.net/articles/JsonPath/" quoteTitle="true" derivedAnchor="GOESSNER-JSON-PATH">
          <front>
            <title>JSONPath - XPath for JSON</title>
            <author initials="S." surname="Goessner" fullname="Stefan Goessner">
                </author>
            <date year="2007" month="February"/>
          </front>
        </reference>
        <reference anchor="HATEOAS" target="https://www.e4developer.com/2018/02/16/hateoas-simple-explanation/" quoteTitle="true" derivedAnchor="HATEOAS">
          <front>
            <title>HATEOAS - a simple explanation</title>
            <author initials="B." surname="Jedrzejewski" fullname="Bartosz Jedrzejewski">
		</author>
            <date year="2018" month="February"/>
          </front>
        </reference>
        <reference anchor="JSONPATH-COMPARISON" target="https://cburgmer.github.io/json-path-comparison/" quoteTitle="true" derivedAnchor="JSONPATH-COMPARISON">
          <front>
            <title>JSONPath Comparison</title>
            <author/>
            <date/>
          </front>
        </reference>
        <reference anchor="JSONPATH-WG" target="https://datatracker.ietf.org/wg/jsonpath/about/" quoteTitle="true" derivedAnchor="JSONPATH-WG">
          <front>
            <title>JSON Path (jsonpath)</title>
            <author>
              <organization showOnFrontPage="true">IETF</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="ODATA-PART1" target="https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-os-part1-protocol-complete.pdf" quoteTitle="true" derivedAnchor="ODATA-PART1">
          <front>
            <title>OData Version 4.0. Part 1: Protocol Plus Errata 03</title>
            <author initials="M." surname="Pizzo" fullname="Michael Pizzo">
		</author>
            <author initials="R." surname="Handl" fullname="Ralf Handl">
		</author>
            <author initials="M." surname="Zurmuehl" fullname="Martin Zurmuehl">
		</author>
            <date year="2016" month="June"/>
          </front>
        </reference>
        <reference anchor="REST" target="https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf" quoteTitle="true" derivedAnchor="REST">
          <front>
            <title>Architectural Styles and the Design of Network-based Software Architectures</title>
            <author initials="R." surname="Fielding" fullname="Roy Thomas Fielding">
              <organization showOnFrontPage="true">PH.D. DISSERTATION, UNIVERSITY OF CALIFORNIA, IRVINE</organization>
            </author>
            <date year="2000"/>
          </front>
        </reference>
        <reference anchor="RFC6901" target="https://www.rfc-editor.org/info/rfc6901" quoteTitle="true" derivedAnchor="RFC6901">
          <front>
            <title>JavaScript Object Notation (JSON) Pointer</title>
            <author initials="P." surname="Bryan" fullname="P. Bryan" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Zyp" fullname="K. Zyp">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Nottingham" fullname="M. Nottingham" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2013" month="April"/>
            <abstract>
              <t indent="0">JSON Pointer defines a string syntax for identifying a specific value within a JavaScript Object Notation (JSON) document.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6901"/>
          <seriesInfo name="DOI" value="10.17487/RFC6901"/>
        </reference>
        <reference anchor="SEEK" target="https://www.eversql.com/faster-pagination-in-mysql-why-order-by-with-limit-and-offset-is-slow/" quoteTitle="true" derivedAnchor="SEEK">
          <front>
            <title>Faster Pagination in Mysql - Why Order By With Limit and Offset is Slow?</title>
            <author>
              <organization showOnFrontPage="true">EverSQL</organization>
            </author>
            <date year="2017" month="July"/>
          </front>
        </reference>
        <reference anchor="W3C.CR-xpath-31-20170321" target="https://www.w3.org/TR/2017/REC-xpath-31-20170321/" quoteTitle="true" derivedAnchor="W3C.CR-xpath-31-20170321">
          <front>
            <title>XML Path Language (XPath) 3.1</title>
            <author initials="J." surname="Robie" fullname="Jonathan Robie">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Dyck" fullname="Michael Dyck">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Spiegel" fullname="Josh Spiegel">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="March" year="2017"/>
          </front>
          <refcontent>World Wide Web Consortium Recommendation REC-xpath-31-20170321</refcontent>
        </reference>
      </references>
    </references>
    <section anchor="jsonpath-operators" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-jsonpath-operators">JSONPath Operators</name>
      <t indent="0" pn="section-appendix.a-1">The jsonpaths used in this document are provided according to the Goessner proposal <xref target="GOESSNER-JSON-PATH" format="default" sectionFormat="of" derivedContent="GOESSNER-JSON-PATH"/>.</t>
      <t indent="0" pn="section-appendix.a-2">Such specification requires that implementations support a set of
      "basic operators".  These operators are used to access the elements of a
      JSON structure like objects and arrays, as well as their subelements
      (object members and array items, respectively).  No operations are
      defined for retrieving parent or sibling elements of a given element.
      The root element is always referred to as $ regardless of it being an
      object or array.</t>
      <t indent="0" pn="section-appendix.a-3">Additionally, the specification permits implementations to support
      arbitrary script expressions.  These can be used to index into an object
      or array, or to filter elements from an array.  While script expression
      behavior is implementation-defined, most implementations support the
      basic relational and logical operators as well as both object member and
      array item access, sufficiently similar for the purpose of this
      document.  Commonly supported operators/functions divided into
      "top-level operators" and "filter operators" are documented in Tables <xref target="table_json_path_top_level_operators" format="counter" sectionFormat="of" derivedContent="2"/> and <xref target="table_json_path_filter_operators" format="counter" sectionFormat="of" derivedContent="3"/>, respectively.</t>
      <t indent="0" pn="section-appendix.a-4">For more information on implementation interoperability issues, see
      <xref target="JSONPATH-COMPARISON" format="default" sectionFormat="of" derivedContent="JSONPATH-COMPARISON"/>.  At the time
      of writing, work is beginning on a standardization effort too (see
      <xref target="JSONPATH-WG" format="default" sectionFormat="of" derivedContent="JSONPATH-WG"/>).</t>
      <table anchor="table_json_path_top_level_operators" align="center" pn="table-2">
        <name slugifiedName="name-jsonpath-top-level-operator">JSONPath Top-Level Operators</name>
        <thead>
          <tr>
            <th align="left" colspan="1" rowspan="1">Operator</th>
            <th align="left" colspan="1" rowspan="1">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">$</td>
            <td align="left" colspan="1" rowspan="1">Root element</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">.&lt;name&gt;</td>
            <td align="left" colspan="1" rowspan="1">Object member access (dot-notation)</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">['&lt;name&gt;']</td>
            <td align="left" colspan="1" rowspan="1">Object member access (bracket-notation)</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">[&lt;number&gt;]</td>
            <td align="left" colspan="1" rowspan="1">Array item access</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">*</td>
            <td align="left" colspan="1" rowspan="1">All elements within the specified scope</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">[?(&lt;expression&gt;)]</td>
            <td align="left" colspan="1" rowspan="1">Filter expression</td>
          </tr>
        </tbody>
      </table>
      <table anchor="table_json_path_filter_operators" align="center" pn="table-3">
        <name slugifiedName="name-jsonpath-filter-operators">JSONPath Filter Operators</name>
        <thead>
          <tr>
            <th align="left" colspan="1" rowspan="1">Operator</th>
            <th align="left" colspan="1" rowspan="1">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">@</td>
            <td align="left" colspan="1" rowspan="1">Current element being processed</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">.&lt;name&gt;</td>
            <td align="left" colspan="1" rowspan="1">Object member access</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">.[&lt;name1&gt;,&lt;name2&gt;]</td>
            <td align="left" colspan="1" rowspan="1">Union of object members</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">[&lt;number&gt;]</td>
            <td align="left" colspan="1" rowspan="1">Array item access</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">==</td>
            <td align="left" colspan="1" rowspan="1">Left is equal to right</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">!=</td>
            <td align="left" colspan="1" rowspan="1">Left is not equal to right</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">&lt;</td>
            <td align="left" colspan="1" rowspan="1">Left is less than right</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">&lt;=</td>
            <td align="left" colspan="1" rowspan="1">Left is less than or equal to right</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">&gt;</td>
            <td align="left" colspan="1" rowspan="1">Left is greater than right</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">&gt;=</td>
            <td align="left" colspan="1" rowspan="1">Left is greater than or equal to right</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">&amp;&amp;</td>
            <td align="left" colspan="1" rowspan="1">Logical conjunction</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">||</td>
            <td align="left" colspan="1" rowspan="1">Logical disjunction</td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="approaches-to-result-pagination" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-approaches-to-result-pagina">Approaches to Result Pagination</name>
      <t indent="0" pn="section-appendix.b-1">An RDAP query could return a response with hundreds, even thousands, of objects, especially when partial matching is used.  For this reason, the "cursor" parameter addressing result pagination is defined to make responses easier to handle.</t>
      <t indent="0" pn="section-appendix.b-2">Presently, the most popular methods to implement pagination in a REST API include offset pagination and keyset pagination.  Neither pagination method requires the server to handle the result set in a storage area across multiple requests since a new result set is generated each time a request is submitted.  Therefore, they are preferred to any other method requiring the management of a REST session.</t>
      <t indent="0" pn="section-appendix.b-3">Using limit and offset operators represents the traditionally used method to implement result pagination.  Both of them can be used individually: 
      </t>
      <dl indent="3" newline="false" spacing="normal" pn="section-appendix.b-4">
        <dt pn="section-appendix.b-4.1">"limit=N":
</dt>
        <dd pn="section-appendix.b-4.2">means that the server returns the first N objects of the result set
</dd>
        <dt pn="section-appendix.b-4.3">"offset=N": 
</dt>
        <dd pn="section-appendix.b-4.4">means that the server skips the first N objects and returns objects starting from position N+1
</dd>
      </dl>
      <t indent="0" pn="section-appendix.b-5">When limit and offset are used together, they provide the ability to identify a specific portion of the result set.  For example, the pair "offset=100,limit=50" returns the first 50 objects starting from position 101 of the result set.</t>
      <t indent="0" pn="section-appendix.b-6">Though easy to implement, offset pagination also includes drawbacks:
      </t>
      <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-appendix.b-7">
        <li pn="section-appendix.b-7.1">
          <t indent="0" pn="section-appendix.b-7.1.1">When offset has a very high value, scrolling the result set could take some time.</t>
        </li>
        <li pn="section-appendix.b-7.2">
          <t indent="0" pn="section-appendix.b-7.2.1">It always requires fetching all rows before dropping as many rows as specified by offset.</t>
        </li>
        <li pn="section-appendix.b-7.3">It may return inconsistent pages when data are frequently updated (i.e., real-time data).</li>
      </ul>
      <t indent="0" pn="section-appendix.b-8">Keyset pagination <xref target="SEEK" format="default" sectionFormat="of" derivedContent="SEEK"/> adds a query condition that enables the selection of the only data not yet returned.  This method has been taken as the basis for the implementation of a "cursor" parameter <xref target="CURSOR" format="default" sectionFormat="of" derivedContent="CURSOR"/> by some REST API providers <xref target="CURSOR-API1" format="default" sectionFormat="of" derivedContent="CURSOR-API1"/> <xref target="CURSOR-API2" format="default" sectionFormat="of" derivedContent="CURSOR-API2"/>.  The cursor is a URL-safe string opaque to the client and representing a logical pointer to the first result of the next page.</t>
      <t indent="0" pn="section-appendix.b-9">Nevertheless, even keyset pagination can be troublesome:
      </t>
      <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-appendix.b-10">
        <li pn="section-appendix.b-10.1">
          <t indent="0" pn="section-appendix.b-10.1.1">It needs at least one key field.</t>
        </li>
        <li pn="section-appendix.b-10.2">
          <t indent="0" pn="section-appendix.b-10.2.1">It does not allow sorting simply by any field because the sorting
          criterion must contain a key.</t>
        </li>
        <li pn="section-appendix.b-10.3">
          <t indent="0" pn="section-appendix.b-10.3.1">It works best with full composite values supported by database
          management systems (i.e., [x,y]&gt;[a,b]); emulation is possible but
          inelegant and less efficient.</t>
        </li>
        <li pn="section-appendix.b-10.4">
          <t indent="0" pn="section-appendix.b-10.4.1">It does not allow direct navigation to arbitrary pages because
          the result set must be scrolled in sequential order starting from
          the initial page.</t>
        </li>
        <li pn="section-appendix.b-10.5">Implementing bidirectional navigation is tedious because all
        comparison and sort operations have to be reversed.</li>
      </ul>
      <section anchor="pagination-in-rdap" numbered="true" removeInRFC="false" toc="include" pn="section-b.1">
        <name slugifiedName="name-specific-issues-raised-by-r">Specific Issues Raised by RDAP</name>
        <t indent="0" pn="section-b.1-1">Some additional considerations can be made in the RDAP context:
        </t>
        <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-b.1-2">
          <li pn="section-b.1-2.1">
            <t indent="0" pn="section-b.1-2.1.1">An RDAP object is a conceptual aggregation of information
            generally collected from more than one data structure (e.g.,
            table), and this makes it even harder to implement keyset
            pagination, a task that is already quite difficult.  For example,
            the entity object can include information from different data
            structures (registrars, registrants, contacts, resellers), each
            one with its key field mapping the RDAP entity handle.</t>
          </li>
          <li pn="section-b.1-2.2">
            <t indent="0" pn="section-b.1-2.2.1">Depending on the number of page results as well as the number
            and the complexity of the properties of each RDAP object in the
            response, the time required by offset pagination to skip the
            previous pages could be much faster than the processing time
            needed to build the current page.  In fact, RDAP objects are
            usually formed by information belonging to multiple data
            structures and containing multivalued properties (i.e., arrays);
            therefore, data selection might be a time-consuming
            process.  This situation occurs even though the selection is
            supported by indexes.</t>
          </li>
          <li pn="section-b.1-2.3">Depending on the access levels defined by each RDAP operator,
          the increase in complexity and the decrease in flexibility of keyset
          pagination in comparison to offset pagination could be considered
          impractical.</li>
        </ul>
        <t indent="0" pn="section-b.1-3">Ultimately, both pagination methods have benefits and
        drawbacks.</t>
      </section>
    </section>
    <section anchor="additional-implementation-notes" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-implementation-notes">Implementation Notes</name>
      <t indent="0" pn="section-appendix.c-1">This section contains an overview of the main choices made during the
      implementation of the capabilities defined in this document in the RDAP public test
      server of Registro.it at the Institute of Informatics and Telematics of
      the National Research Council (IIT-CNR).  The content of this section
      can represent guidance for implementers who plan to provide RDAP
      users with those capabilities.  The RDAP public test server can be
      accessed at <eref target="https://rdap.pubtest.nic.it/" brackets="angle"/>.  Further documentation about the server features is
      available at <eref target="https://rdap.pubtest.nic.it/doc/README.html" brackets="angle"/>.</t>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-c.1">
        <name slugifiedName="name-sorting">Sorting</name>
        <t indent="0" pn="section-c.1-1">If no sort criterion is specified in the query string, the results are sorted by a default property: "name" for domains and nameservers, and "handle" for entities.  The server supports multiple property sorting but the "sorting_metadata" object includes only the links to alternative result set views sorted by a single property just to show the list of sorting properties allowed for each searchable object.  The server supports all the object-specific sorting properties described in the specification except for nameserver sorting based on unicodeName, that is, the "name" sorting property is mapped onto the "ldhName" response field.  Regarding the object-common properties, sorting by registrationDate, expirationDate, lastChangedDate, and transferDate is supported.</t>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-c.2">
        <name slugifiedName="name-counting">Counting</name>
        <t indent="0" pn="section-c.2-1">The counting operation is implemented through a separate query.  Some relational database management systems support custom operators to get the total count together with the rows, but the resulting query can be considerably more expensive than that performed without the total count.  Therefore, as "totalCount" is an optional response information, always fetching the total number of rows has been considered an inefficient solution.  Furthermore, to avoid the processing of unnecessary queries, when the "count" parameter is included in the submitted query, it is not also repeated in the query strings of the "links" array provided in both "paging_metadata" and "sorting_metadata" objects.</t>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-c.3">
        <name slugifiedName="name-paging">Paging</name>
        <t indent="0" pn="section-c.3-1">The server implements the cursor pagination through the keyset
        pagination when sorting by a unique property is requested or the
        default sort is applied. Otherwise, it implements the cursor
        pagination through the offset pagination.  As most relational database
        management systems don't support the comparison of full composite
        values natively, the implementation of full keyset pagination seem to
        be troublesome so, at least initially, a selective applicability of
        keyset pagination is advisable.  Moreover, the "cursor" value encodes
        not only information about pagination but also about the search
        pattern and the other query parameters in order to check the
        consistency of the entire query string.  If the "cursor" value is
        inconsistent with the rest of the query string, the server returns an
        error response.</t>
      </section>
    </section>
    <section numbered="false" removeInRFC="false" toc="include" pn="section-appendix.d">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.d-1">The authors would like to acknowledge <contact fullname="Brian Mountford"/>, <contact fullname="Tom Harrison"/>, <contact fullname="Karl Heinz Wolf"/>, <contact fullname="Jasdip Singh"/>, <contact fullname="Erik Kline"/>, <contact fullname="Éric Vyncke"/>, <contact fullname="Benjamin Kaduk"/>, and <contact fullname="Roman Danyliw"/> for their contributions to the development of this document.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.e">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author fullname="Mario Loffredo" initials="M." surname="Loffredo">
        <organization showOnFrontPage="true">IIT-CNR/Registro.it</organization>
        <address>
          <postal>
            <street>Via Moruzzi,1</street>
            <city>Pisa</city>
            <country>Italy</country>
            <code>56124</code>
          </postal>
          <email>mario.loffredo@iit.cnr.it</email>
          <uri>https://www.iit.cnr.it</uri>
        </address>
      </author>
      <author fullname="Maurizio Martinelli" initials="M." surname="Martinelli">
        <organization showOnFrontPage="true">IIT-CNR/Registro.it</organization>
        <address>
          <postal>
            <street>Via Moruzzi,1</street>
            <city>Pisa</city>
            <country>Italy</country>
            <code>56124</code>
          </postal>
          <email>maurizio.martinelli@iit.cnr.it</email>
          <uri>https://www.iit.cnr.it</uri>
        </address>
      </author>
      <author initials="S." surname="Hollenbeck" fullname="Scott Hollenbeck">
        <organization showOnFrontPage="true">Verisign Labs</organization>
        <address>
          <postal>
            <street>12061 Bluemont Way</street>
            <city>Reston</city>
            <region>VA</region>
            <code>20190</code>
            <country>United States of America</country>
          </postal>
          <email>shollenbeck@verisign.com</email>
          <uri>https://www.verisignlabs.com/</uri>
        </address>
      </author>
    </section>
  </back>
</rfc>
