<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-ietf-regext-rfc7482bis-03" number="9082" ipr="trust200902" 
obsoletes="7482" updates="" submissionType="IETF" category="std"
consensus="true" xml:lang="en" sortRefs="true" symRefs="true" tocInclude="true" tocDepth="3" version="3">

  <!-- xml2rfc v2v3 conversion 3.5.0 -->
  <!-- Generated by id2xml 1.5.0 on 2019-09-17T15:17:01Z -->
	<front>
    <title abbrev="RDAP Query Format">Registration Data Access Protocol (RDAP) Query Format</title>
    <seriesInfo name="RFC" value="9082"/>
    <seriesInfo name="STD" value="95"/>

    <author fullname="Scott Hollenbeck" initials="S." surname="Hollenbeck">
      <organization>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>
    <author fullname="Andy Newton" initials="A." surname="Newton">
      <organization abbrev="AWS">Amazon Web Services, Inc.</organization>
      <address>
        <postal>
          <street>13200 Woodland Park Road</street>
          <city>Herndon</city>
          <region>VA</region>
          <code>20171</code>
          <country>United States of America</country>
        </postal>
        <email>andy@hxr.us</email>
      </address>
    </author>
    <date year="2021" month="June" />
    <area>Applications and Real-Time</area>
    <workgroup>REGEXT Working Group</workgroup>

    <abstract>
      <t>
   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). This document obsoletes RFC 7482.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   This document describes a specification for querying registration
   data using a RESTful web service and uniform query patterns.  The
   service is implemented using the Hypertext Transfer Protocol (HTTP)
   <xref target="RFC7230" format="default"/> and the conventions described in <xref target="RFC7480" format="default"/>.  These uniform
   patterns define the query syntax for the Registration Data Access
   Protocol (RDAP). This document obsoletes RFC 7482.</t>
      <t>
   The protocol described in this specification is intended to address
   deficiencies with the WHOIS protocol <xref target="RFC3912" format="default"/> that have been
   identified over time, including:</t>
      <ul spacing="normal">
        <li>lack of standardized command structures;</li>
        <li>lack of standardized output and error structures;</li>
        <li>lack of support for internationalization and localization; and</li>
        <li>lack of support for user identification, authentication, and
      access control.</li>
      </ul>
      <t>
   The patterns described in this document purposefully do not encompass
   all of the methods employed in the WHOIS and other RESTful web
   services used by the RIRs and DNRs.  The intent of the patterns
   described here is to enable queries of:</t>
      <ul spacing="normal">
        <li>networks by IP address;</li>
        <li>Autonomous System (AS) numbers by number;</li>
        <li>reverse DNS metadata by domain;</li>
        <li>nameservers by name; and</li>
        <li>entities (such as registrars and contacts) by identifier.</li>
      </ul>
      <t>
   Server implementations are free to support only a subset of these
   features depending on local requirements.  Servers <bcp14>MUST</bcp14> return an
   HTTP 501 (Not Implemented) <xref target="RFC7231" format="default"/> response to inform clients of
   unsupported query types.  It is also envisioned that each registry
   will continue to maintain WHOIS and/or other RESTful web services
   specific to their needs and those of their constituencies, and the
   information retrieved through the patterns described here may
   reference such services.</t>
      <t>
   Likewise, future IETF specifications may add additional patterns for
   additional query types.  A simple pattern namespacing scheme is
   described in <xref target="sect-5" format="default"/> to accommodate custom extensions that will not
   interfere with the patterns defined in this document or patterns
   defined in future IETF specifications.</t>
      <t>
   WHOIS services, in general, are read-only services.  Accordingly, URL
   <xref target="RFC3986" format="default"/> patterns specified in this document are only applicable to
   the HTTP <xref target="RFC7231" format="default"/> GET and HEAD methods.</t>
      <t>
   This document does not describe the results or entities returned from
   issuing the described URLs with an HTTP GET.  The specification of
   these entities is described in <xref target="RFC9083" format="default"/>.</t>
      <t>
   Additionally, resource management, provisioning, and update functions
   are out of scope for this document.  Registries have various and
   divergent methods covering these functions, and it is unlikely a
   uniform approach is needed for interoperability.</t>
      <t>
   HTTP contains mechanisms for servers to authenticate clients and for
   clients to authenticate servers (from which authorization schemes may
   be built), so such mechanisms are not described in this document.
   Policy, provisioning, and processing of authentication and
   authorization are out of scope for this document as deployments will
   have to make choices based on local criteria.  Supported
   authentication mechanisms are described in <xref target="RFC7481" format="default"/>.</t>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Conventions Used in This Document</name>
      <t>
    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&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.</t>
      <section anchor="sect-2.1" numbered="true" toc="default">
        <name>Acronyms and Abbreviations</name>
        <dl newline="false" spacing="normal">
          <dt>IDN:</dt>
          <dd>
      Internationalized Domain Name, a fully-qualified domain name
      containing one or more labels that are intended to include one or more
      Unicode code points outside the ASCII range (cf. "domain name",
      "fully-qualified domain name", and "internationalized domain name" in
      RFC 8499 <xref target="RFC8499" format="default"/>).</dd>
          <dt>IDNA:</dt>
          <dd>
      Internationalized Domain Names in Applications, a protocol for
      the handling of IDNs.  In this document, "IDNA" refers specifically to
      the version of those specifications known as "IDNA2008" <xref target="RFC5890" format="default"/>.</dd>
          <dt>DNR:</dt>
          <dd>
      Domain Name Registry or Domain Name Registrar</dd>
          <dt>NFC:</dt>
          <dd>
      Unicode Normalization Form C <xref target="Unicode-UAX15" format="default"/></dd>
          <dt>NFKC:</dt>
          <dd>
      Unicode Normalization Form KC <xref target="Unicode-UAX15" format="default"/></dd>
          <dt>RDAP:</dt>
          <dd>
      Registration Data Access Protocol</dd>
          <dt>REST:</dt>
          <dd>
      Representational State Transfer.  The term was first
      described in a doctoral dissertation <xref target="REST" format="default"/>.</dd>
          <dt>RESTful:</dt>
          <dd>
      An adjective that describes a service using HTTP and the
      principles of REST.</dd>
          <dt>RIR:</dt>
          <dd>
      Regional Internet Registry</dd>
        </dl>
      </section>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>Path Segment Specification</name>
      <t>
   The base URLs used to construct RDAP queries are maintained in an
   IANA registry (the "bootstrap registry") described in <xref target="RFC7484" format="default"/>.  Queries are formed by
   retrieving an appropriate base URL from the registry and appending a
   path segment specified in either Sections <xref target="sect-3.1" format="counter"/> or <xref target="sect-3.2" format="counter"/>.  Generally, a
   registry or other service provider will provide a base URL that
   identifies the protocol, host, and port, and this will be used as a
   base URL that the complete URL is resolved against, as per Section <xref target="RFC3986" section="5" sectionFormat="bare" format="default"/>
   of RFC 3986 <xref target="RFC3986" format="default"/>.  For example, if the base URL is
   "https://example.com/rdap/", all RDAP query URLs will begin with
   "https://example.com/rdap/".</t>
      <t>
   The bootstrap registry does not contain information for query objects
   that are not part of a global namespace, including entities and help.
   A base URL for an associated object is required to construct a complete
   query. This limitation can be overcome for entities by using the practice
   described in RFC 8521 <xref target="RFC8521" format="default"/>.</t>
      <t>
   For entities, a base URL is retrieved for the service (domain,
   address, etc.) associated with a given entity.  The query URL is
   constructed by concatenating the base URL with the entity path segment
   specified in either Sections <xref target="sect-3.1.5" format="counter"/> or <xref target="sect-3.2.3" format="counter"/>.</t>
      <t>
   For help, a base URL is retrieved for any service (domain, address,
   etc.) for which additional information is required.  The query URL is
   constructed by concatenating the base URL with the help path segment
   specified in <xref target="sect-3.1.6" format="default"/>.</t>
      <section anchor="sect-3.1" numbered="true" toc="default">
        <name>Lookup Path Segment Specification</name>
        <t>
   A simple lookup to determine if an object exists (or not) without
   returning RDAP-encoded results can be performed using the HTTP HEAD
   method as described in <xref target="RFC7480" section="4.1" sectionFormat="of" format="default"/>.</t>
        <t>
   The resource type path segments for exact match lookup are:</t>
        <dl spacing="normal">
          <dt>'ip':</dt><dd> Used to identify IP networks and associated data referenced
      using either an IPv4 or IPv6 address.</dd>
          <dt>'autnum':</dt><dd> Used to identify Autonomous System number registrations
      and associated data referenced using an asplain Autonomous System
      number.</dd>
          <dt>'domain':</dt><dd> Used to identify reverse DNS (RIR) or domain name (DNR)
      information and associated data referenced using a fully qualified
      domain name.</dd>
          <dt>'nameserver':</dt><dd> Used to identify a nameserver information query
      using a host name.</dd>
          <dt>'entity':</dt><dd> Used to identify an entity information query using a
      string identifier.</dd>
        </dl>
        <section anchor="sect-3.1.1" numbered="true" toc="default">
          <name>IP Network Path Segment Specification</name>
          <dl>
   <dt>Syntax:</dt><dd>ip/&lt;IP address&gt; or ip/&lt;CIDR prefix&gt;/&lt;CIDR length&gt;</dd>
          </dl>
          <t>
   Queries for information about IP networks are of the form /ip/XXX
   or /ip/XXX/YY  where the path segment following 'ip' is either an
   IPv4 dotted decimal or IPv6 <xref target="RFC5952" format="default"/> address (i.e., XXX) or an IPv4
   or IPv6 Classless Inter-domain Routing (CIDR) <xref target="RFC4632" format="default"/> notation
   address block (i.e., XXX/YY).  Semantically, the simpler form using
   the address can be thought of as a CIDR block with a prefix length
   of 32 for IPv4 and a prefix length of 128 for IPv6.  A given
   specific address or CIDR may fall within multiple IP networks in a
   hierarchy of networks; therefore, this query targets the "most-specific" or smallest IP network that completely encompasses it in a
   hierarchy of IP networks.</t>
          <t>
   The IPv4 and IPv6 address formats supported in this query are
   described in Section <xref target="RFC3986" section="3.2.2" sectionFormat="bare" format="default"/> of RFC 3986 <xref target="RFC3986" format="default"/> as IPv4address and
   IPv6address ABNF definitions.  Any valid IPv6 text address format
   <xref target="RFC4291" format="default"/> can be used.  This includes IPv6 addresses written using
   with or without compressed zeros and IPv6 addresses containing
   embedded IPv4 addresses.  The rules to write a text representation of
   an IPv6 address <xref target="RFC5952" format="default"/> are <bcp14>RECOMMENDED</bcp14>.  However, the zone_id
   <xref target="RFC4007" format="default"/> is not appropriate in this context; therefore, the
   corresponding syntax extension in RFC 6874 <xref target="RFC6874" format="default"/> <bcp14>MUST NOT</bcp14> be
   used, and servers <bcp14>SHOULD</bcp14> ignore it.</t>
          <t>
   For example, the following URL would be used to find information for
   the most specific network containing 192.0.2.0:</t>
          <t>https://example.com/rdap/ip/192.0.2.0</t>
          <t>
   The following URL would be used to find information for the most
   specific network containing 192.0.2.0/24:</t>
          <t>https://example.com/rdap/ip/192.0.2.0/24</t>
          <t>
   The following URL would be used to find information for the most
   specific network containing 2001:db8::</t>
          <t>https://example.com/rdap/ip/2001:db8::</t>
        </section>
        <section anchor="sect-3.1.2" numbered="true" toc="default">
          <name>Autonomous System Path Segment Specification</name>
          <dl>
   <dt>Syntax:</dt><dd> autnum/&lt;autonomous system number&gt;</dd>
          </dl>
          <t>
   Queries for information regarding Autonomous System number
   registrations are of the form /autnum/XXX where XXX is an asplain
   Autonomous System number <xref target="RFC5396" format="default"/>.  In some registries, registration
   of Autonomous System numbers is done on an individual number basis,
   while other registries may register blocks of Autonomous System
   numbers.  The semantics of this query are such that if a number falls
   within a range of registered blocks, the target of the query is the
   block registration and that individual number registrations are
   considered a block of numbers with a size of 1.</t>
          <t>
   For example, the following URL would be used to find information
   describing Autonomous System number 12 (a number within a range of
   registered blocks):</t>
          <t>https://example.com/rdap/autnum/12</t>
          <t>
   The following URL would be used to find information describing 4-byte
   Autonomous System number 65538:</t>
          <t>https://example.com/rdap/autnum/65538</t>
        </section>
        <section anchor="sect-3.1.3" numbered="true" toc="default">
          <name>Domain Path Segment Specification</name>
          <dl>
   <dt>Syntax:</dt><dd> domain/&lt;domain name&gt;</dd>
          </dl>
          <t>
   Queries for domain information are of the form /domain/XXXX,
   where XXXX is a fully qualified (relative to the root) domain name
   (as specified in <xref target="RFC0952" format="default"/> and <xref target="RFC1123" format="default"/>) in either the in-addr.arpa
   or ip6.arpa zones (for RIRs) or a fully qualified domain name in a
   zone administered by the server operator (for DNRs).
   Internationalized Domain Names (IDNs) represented in either A-label
   or U-label format <xref target="RFC5890" format="default"/> are also valid domain names.  See
   <xref target="sect-6.1" format="default"/> for information on character encoding for the U-label
   format.</t>
          <t>
   IDNs <bcp14>SHOULD NOT</bcp14> be represented as a mixture of A-labels and U-labels;
   that is, internationalized labels in an IDN <bcp14>SHOULD</bcp14> be either all
   A-labels or all U-labels.  It is possible for an RDAP client to
   assemble a query string from multiple independent data sources.  Such
   a client might not be able to perform conversions between A-labels
   and U-labels.  An RDAP server that receives a query string with a
   mixture of A-labels and U-labels <bcp14>MAY</bcp14> convert all the U-labels to
   A-labels, perform IDNA processing, and proceed with exact-match
   lookup.  In such cases, the response to be returned to the query
   source may not match the input from the query source.  Alternatively,
   the server <bcp14>MAY</bcp14> refuse to process the query.</t>
          <t>
   The server <bcp14>MAY</bcp14> perform the match using either the A-label or U-label
   form.  Using one consistent form for matching every label is likely
   to be more reliable.</t>
          <t>
   The following URL would be used to find information describing the
   zone serving the network 192.0.2/24:</t>
          <t>https://example.com/rdap/domain/2.0.192.in-addr.arpa</t>
          <t>
   The following URL would be used to find information describing the
   zone serving the network 2001:db8:1::/48:</t>
          <t>https://example.com/rdap/domain/1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa</t>
          <t>
   The following URL would be used to find information for the
   blah.example.com domain name:</t>
          <t>https://example.com/rdap/domain/blah.example.com</t>
          <t>
   The following URL would be used to find information for the
   xn&nbhy;&nbhy;fo&nbhy;5ja.example IDN:</t>
          <t>https://example.com/rdap/domain/xn--fo-5ja.example</t>
        </section>
        <section anchor="sect-3.1.4" numbered="true" toc="default">
          <name>Nameserver Path Segment Specification</name>
          <dl>
   <dt>Syntax:</dt><dd>nameserver/&lt;nameserver name&gt;</dd>
          </dl>
          <t>
   The &lt;nameserver name&gt; parameter represents a fully qualified host
   name as specified in <xref target="RFC0952" format="default"/> and <xref target="RFC1123" format="default"/>.  Internationalized
   names represented in either A-label or U-label format <xref target="RFC5890" format="default"/> are
   also valid nameserver names.  IDN processing for nameserver names
   uses the domain name processing instructions specified in
   <xref target="sect-3.1.3" format="default"/>.  See <xref target="sect-6.1" format="default"/> for information on character encoding
   for the U-label format.</t>
          <t>
   The following URL would be used to find information for the
   ns1.example.com nameserver:</t>
          <t>https://example.com/rdap/nameserver/ns1.example.com</t>
          <t>
   The following URL would be used to find information for the
   ns1.xn&nbhy;&nbhy;fo-5ja.example nameserver:</t>
          <t>https://example.com/rdap/nameserver/ns1.xn--fo-5ja.example</t>
        </section>
        <section anchor="sect-3.1.5" numbered="true" toc="default">
          <name>Entity Path Segment Specification</name>
          <dl>
   <dt>Syntax:</dt><dd>entity/&lt;handle&gt;</dd>
          </dl>
          <t>
   The &lt;handle&gt; parameter represents an entity (such as a contact,
   registrant, or registrar) identifier whose syntax is specific to the
   registration provider.  For example, for some DNRs, contact
   identifiers are specified in <xref target="RFC5730" format="default"/> and <xref target="RFC5733" format="default"/>.</t>
          <t>
   The following URL would be used to find information for the entity
   associated with handle XXXX:</t>
          <t>https://example.com/rdap/entity/XXXX</t>
        </section>
        <section anchor="sect-3.1.6" numbered="true" toc="default">
          <name>Help Path Segment Specification</name>
          <dl>
   <dt>Syntax:</dt><dd> help</dd>
          </dl>
          <t>
   The help path segment can be used to request helpful information
   (command syntax, terms of service, privacy policy, rate-limiting
   policy, supported authentication methods, supported extensions,
   technical support contact, etc.) from an RDAP server.  The response
   to "help" should provide basic information that a client needs to
   successfully use the service.  The following URL would be used to
   return "help" information:</t>
          <t>https://example.com/rdap/help</t>
        </section>
      </section>
      <section anchor="sect-3.2" numbered="true" toc="default">
        <name>Search Path Segment Specification</name>
        <t>
   Pattern matching semantics are described in <xref target="sect-4.1" format="default"/>.  The
   resource type path segments for search are:</t>
        <dl spacing="normal">
          <dt>'domains':</dt><dd> Used to identify a domain name information search using
      a pattern to match a fully qualified domain name.</dd>
          <dt>'nameservers':</dt><dd> Used to identify a nameserver information search
      using a pattern to match a host name.</dd>
          <dt>'entities':</dt><dd> Used to identify an entity information search using a
      pattern to match a string identifier.</dd>
        </dl>
        <t>
   RDAP search path segments are formed using a concatenation of the
   plural form of the object being searched for and an HTTP query
   string.  The HTTP query string is formed using a concatenation of the
   question mark character ('?', US-ASCII value 0x003F), a noun
   representing the JSON object property associated with the object
   being searched for, the equal sign character ('=', US-ASCII value
   0x003D), and the search pattern (this is in contrast to the more
   generic HTTP query string that allows multiple simultaneous parameters).
   Search pattern query processing is
   described more fully in <xref target="sect-4" format="default"/>. For the domain,
   nameserver, and entity objects described in this document, the
   plural object forms are "domains", "nameservers", and "entities".</t>
        <t>
   Detailed results can be retrieved using the HTTP GET method and the
   path segments specified here.</t>
        <section anchor="sect-3.2.1" numbered="true" toc="default">
          <name>Domain Search</name>
          <dl>
   <dt>Syntax:</dt><dd> domains?name=&lt;domain search pattern&gt;</dd>
   <dt>Syntax:</dt><dd> domains?nsLdhName=&lt;nameserver search pattern&gt;</dd>
   <dt>Syntax:</dt><dd> domains?nsIp=&lt;nameserver IP address&gt;</dd>
          </dl>
          <t>
   Searches for domain information by name are specified using this
   form:</t>
          <t>
   domains?name=XXXX</t>
          <t>
   XXXX is a search pattern representing a domain name in "letters, digits,
   hyphen" (LDH) format <xref target="RFC5890" format="default"/>.  The following URL would be used to find
   DNR information for domain names matching the "example*.com" pattern:</t>
          <t>https://example.com/rdap/domains?name=example*.com</t>
          <t>
   IDNs in U-label format <xref target="RFC5890" format="default"/> can also be used as search patterns
   (see <xref target="sect-4" format="default"/>).  Searches for these names are of the form
   /domains?name=XXXX, where XXXX is a search pattern representing a
   domain name in U-label format <xref target="RFC5890" format="default"/>.  See <xref target="sect-6.1" format="default"/> for
   information on character encoding for the U-label format.</t>
          <t>
   Searches for domain information by nameserver name are specified
   using this form:</t>
          <t>
   domains?nsLdhName=YYYY</t>
          <t>
   YYYY is a search pattern representing a host name in "letters, digits,
   hyphen" format <xref target="RFC5890" format="default"/>.  The following URL would be used to search for
   domains delegated to nameservers matching the "ns1.example*.com"
   pattern:</t>
          <t>https://example.com/rdap/domains?nsLdhName=ns1.example*.com</t>
          <t>
   Searches for domain information by nameserver IP address are
   specified using this form:</t>
          <t>
   domains?nsIp=ZZZZ</t>
          <t>
   ZZZZ is an IPv4 <xref target="RFC1166" format="default"/> or IPv6
   <xref target="RFC5952" format="default"/> address.  The following URL would be used to search for
   domains that have been delegated to nameservers that resolve to the
   "192.0.2.0" address:</t>
          <t>https://example.com/rdap/domains?nsIp=192.0.2.0</t>
        </section>
        <section anchor="sect-3.2.2" numbered="true" toc="default">
          <name>Nameserver Search</name>
          <dl>
   <dt>Syntax:</dt><dd> nameservers?name=&lt;nameserver search pattern&gt;</dd>
   <dt>Syntax:</dt><dd> nameservers?ip=&lt;nameserver IP address&gt;</dd>
          </dl>
          <t>
   Searches for nameserver information by nameserver name are specified
   using this form:</t>
          <t>
   nameservers?name=XXXX</t>
          <t>
   XXXX is a search pattern representing a host name in "letters, digits,
   hyphen" format <xref target="RFC5890" format="default"/>.  The following URL would be used to find
   information for nameserver names matching the "ns1.example*.com"
   pattern:</t>
          <t>https://example.com/rdap/nameservers?name=ns1.example*.com</t>
          <t>
   Internationalized nameserver names in U-label format <xref target="RFC5890" format="default"/> can
   also be used as search patterns (see <xref target="sect-4" format="default"/>).  Searches for these
   names are of the form /nameservers?name=XXXX, where XXXX is a search
   pattern representing a nameserver name in U-label format <xref target="RFC5890" format="default"/>.
   See <xref target="sect-6.1" format="default"/> for information on character encoding for the U-label
   format.</t>
          <t>
   Searches for nameserver information by nameserver IP address are
   specified using this form:</t>
          <t>
   nameservers?ip=YYYY</t>
          <t>
   YYYY is an IPv4 <xref target="RFC1166" format="default"/> or IPv6
   <xref target="RFC5952" format="default"/> address.  The following URL would be used to search for
   nameserver names that resolve to the "192.0.2.0" address:</t>
          <t>https://example.com/rdap/nameservers?ip=192.0.2.0</t>
        </section>
        <section anchor="sect-3.2.3" numbered="true" toc="default">
          <name>Entity Search</name>
          <dl>
   <dt>Syntax:</dt><dd> entities?fn=&lt;entity name search pattern&gt;</dd>
   <dt>Syntax:</dt><dd> entities?handle=&lt;entity handle search pattern&gt;</dd>
          </dl>
          <t>
   Searches for entity information by name are specified using this
   form:</t>
          <t>
   entities?fn=XXXX</t>
          <t>
   XXXX is a search pattern representing the "fn" property of an entity
   (such as a contact, registrant, or registrar) name as described in
   <xref target="RFC9083" section="5.1" sectionFormat="of" format="default"/>.  The following URL would be used to find
   information for entity names matching the "Bobby Joe*" pattern:</t>
          <t>https://example.com/rdap/entities?fn=Bobby%20Joe*</t>
          <t>
   Searches for entity information by handle are specified using this
   form:</t>
          <t>
   entities?handle=XXXX</t>
          <t>
   XXXX is a search pattern representing an entity (such as a contact,
   registrant, or registrar) identifier whose syntax is specific to the
   registration provider.  The following URL would be used to find
   information for entity handles matching the "CID-40*" pattern:</t>
          <t>https://example.com/rdap/entities?handle=CID-40*</t>
          <t>
   URLs <bcp14>MUST</bcp14> be properly encoded according to the rules of <xref target="RFC3986" format="default"/>.
   In the example above, "Bobby Joe*" is encoded to "Bobby%20Joe*".</t>
        </section>
      </section>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Query Processing</name>
      <t>
   Servers indicate the success or failure of query processing by
   returning an appropriate HTTP response code to the client.  Response
   codes not specifically identified in this document are described in
   <xref target="RFC7480" format="default"/>.</t>
      <section anchor="sect-4.1" numbered="true" toc="default">
        <name>Partial String Searching</name>
        <t>
   Partial string searching uses the asterisk ('*', US-ASCII value 0x2A)
   character to match zero or more trailing characters.  A character string
   representing a domain label suffix <bcp14>MAY</bcp14> be concatenated to the end of the
   search pattern to limit the scope of the search.  For example, the search
   pattern "exam*" will match "example.com" and "example.net".  The search
   pattern "exam*.com" will match "example.com".  If an asterisk appears in
   a search string, any label that contains the non-asterisk characters in
   sequence plus zero or more characters in sequence in place of the asterisk
   would match. A partial string search <bcp14>MUST NOT</bcp14> include more than one asterisk.
   Additional pattern matching processing is beyond the scope of this specification.</t>
        <t>
   If a server receives a search request but cannot process the request
   because it does not support a particular style of partial match
   searching, it <bcp14>SHOULD</bcp14> return an HTTP 422 (Unprocessable Entity)
   <xref target="RFC4918" format="default"/> response (unless another response code is
   more appropriate based on a server's policy settings) to note that search functionality
   is supported, but this particular query cannot be processed. When
   returning a 422 error, the server <bcp14>MAY</bcp14> also return an error response
   body as specified in <xref target="RFC9083" section="6" sectionFormat="of" format="default"/>
   if the requested media type is one that is specified in <xref target="RFC7480" format="default"/>.</t>
        <t>
   Partial matching is not feasible across combinations of Unicode
   characters because Unicode characters can be combined with each
   other.  Servers <bcp14>SHOULD NOT</bcp14> partially match combinations of Unicode
   characters where a legal combination is possible.  It should be
   noted, though, that it may not always be possible to detect cases
   where a character could have been combined with another character,
   but was not, because characters can be combined in many different
   ways.</t>
        <t>
   Clients <bcp14>SHOULD NOT</bcp14> submit a partial match search of Unicode
   characters where a Unicode character may be legally combined with
   another Unicode character or characters.  Partial match searches with
   incomplete combinations of characters where a character must be
   combined with another character or characters are invalid.  Partial
   match searches with characters that may be combined with another
   character or characters are to be considered non-combined characters
   (that is, if character x may be combined with character y but
   character y is not submitted in the search string, then character x
   is a complete character and no combinations of character x are to be
   searched).</t>
      </section>
      <section anchor="sect-4.2" numbered="true" toc="default">
        <name>Associated Records</name>
        <t>
   Conceptually, any query-matching record in a server's database might
   be a member of a set of related records, related in some fashion as
   defined by the server -- for example, variants of an IDN.  The entire
   set ought to be considered as candidates for inclusion when
   constructing the response.  However, the construction of the final
   response needs to be mindful of privacy and other data-releasing
   policies when assembling the RDAP response set.</t>
        <t>
   Note too that due to the nature of searching, there may be a list of
   query-matching records.  Each one of those is subject to being a
   member of a set as described in the previous paragraph.  What is
   ultimately returned in a response will be the union of all the sets
   that has been filtered by whatever policies are in place.</t>
        <t>
   Note that this model includes arrangements for associated names,
   including those that are linked by policy mechanisms and names bound
   together for some other purposes.  Note also that returning
   information that was not explicitly selected by an exact-match
   lookup, including additional names that match a relatively fuzzy
   search as well as lists of names that are linked together, may cause
   privacy issues.</t>
        <t>
   Note that there might not be a single, static information return
   policy that applies to all clients equally.  Client identity and
   associated authorizations can be a relevant factor in determining how
   broad the response set will be for any particular query.</t>
      </section>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Extensibility</name>
      <t>
   This document describes path segment specifications for a limited
   number of objects commonly registered in both RIRs and DNRs.  It does
   not attempt to describe path segments for all of the objects
   registered in all registries.  Custom path segments can be created
   for objects not specified here using the process described in
   Section <xref target="RFC7480" section="6" sectionFormat="bare" format="default"/> of "<xref target="RFC7480" format="title"/>" <xref target="RFC7480" format="default"/>.</t>
      <t>
   Custom path segments can be created by prefixing the segment with a
   unique identifier followed by an underscore character (0x5F).  For
   example, a custom entity path segment could be created by prefixing
   "entity" with "custom_", producing "custom_entity".  Servers <bcp14>MUST</bcp14>
   return an appropriate failure status code for a request with an
   unrecognized path segment.</t>
    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>Internationalization Considerations</name>
      <t>
   There is value in supporting the ability to submit either a U-label
   (Unicode form of an IDN label) or an A-label (US-ASCII form of an IDN
   label) as a query argument to an RDAP service.  Clients capable of
   processing non-US-ASCII characters may prefer a U-label since this is
   more visually recognizable and familiar than A-label strings, but
   clients using programmatic interfaces might find it easier to submit
   and display A-labels if they are unable to input U-labels with their
   keyboard configuration.  Both query forms are acceptable.</t>
      <t>
   Internationalized domain and nameserver names can contain character
   variants and variant labels as described in <xref target="RFC4290" format="default"/>.  Clients that
   support queries for internationalized domain and nameserver names
   <bcp14>MUST</bcp14> accept service provider responses that describe variants as
   specified in "<xref target="RFC9083" format="title"/>" <xref target="RFC9083" format="default"/>.</t>
      <section anchor="sect-6.1" numbered="true" toc="default">
        <name>Character Encoding Considerations</name>
        <t>
   Servers can expect to receive search patterns from clients that
   contain character strings encoded in different forms supported by
   HTTP.  It is entirely possible to apply filters and normalization
   rules to search patterns prior to making character comparisons, but
   this type of processing is more typically needed to determine the
   validity of registered strings than to match patterns.</t>
        <t>
   An RDAP client submitting a query string containing non-US-ASCII
   characters converts such strings into Unicode in UTF-8 encoding.  It
   then performs any local case mapping deemed necessary.  Strings are
   normalized using Normalization Form C (NFC) <xref target="Unicode-UAX15" format="default"/>; note
   that clients might not be able to do this reliably.  UTF-8 encoded
   strings are then appropriately percent-encoded <xref target="RFC3986" format="default"/> in the query
   URL.</t>
        <t>
   After parsing any percent-encoding, an RDAP server treats each query
   string as Unicode in UTF-8 encoding.  If a string is not valid UTF-8,
   the server can immediately stop processing the query and return an
   HTTP 400 (Bad Request) response.</t>
        <t>
   When processing queries, there is a difference in handling DNS names,
   including those with putative U-labels, and everything else.  DNS
   names are treated according to the DNS matching rules as described in
   Section <xref target="RFC1035" section="3.1" sectionFormat="bare"/> of RFC 1035 <xref target="RFC1035" format="default"/> for Non-Reserved LDH (NR-LDH)
   labels and the matching rules described in Section <xref target="RFC5891" section="5.4" sectionFormat="bare"/> of RFC 5891
   <xref target="RFC5891" format="default"/> for U-labels.  Matching of DNS names proceeds one label at
   a time because it is possible for a combination of U-labels and
   NR-LDH labels to be found in a single domain or host name.  The
   determination of whether a label is a U-label or an NR-LDH label is
   based on whether the label contains any characters outside of the
   US-ASCII letters, digits, or hyphen (the so-called LDH rule).</t>
        <t>
   For everything else, servers map fullwidth and halfwidth characters
   to their decomposition equivalents.  Servers convert strings to the
   same coded character set of the target data that is to be looked up
   or searched, and each string is normalized using the same
   normalization that was used on the target data.  In general, storage
   of strings as Unicode is <bcp14>RECOMMENDED</bcp14>.  For the purposes of
   comparison, Normalization Form KC (NFKC) <xref target="Unicode-UAX15" format="default"/> with case
   folding is used to maximize predictability and the number of matches.
   Note the use of case-folded NFKC as opposed to NFC in this case.</t>
      </section>
    </section>
    <section anchor="IANA-Cons" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   Security services for the operations specified in this document are
   described in "<xref target="RFC7481" format="title"/>" <xref target="RFC7481" format="default"/>.</t>
      <t>
   Search functionality typically requires more server resources (such
   as memory, CPU cycles, and network bandwidth) when compared to basic
   lookup functionality.  This increases the risk of server resource
   exhaustion and subsequent denial of service due to abuse.  This risk
   can be mitigated by developing and implementing controls to restrict
   search functionality to identified and authorized clients.  If those
   clients behave badly, their search privileges can be suspended or
   revoked.  Rate limiting as described in Section <xref target="RFC7480" section="5.5" sectionFormat="bare" format="default"/> of "<xref target="RFC7480" format="title"/>" <xref target="RFC7480" format="default"/> can also be
   used to control the rate of received search requests.  Server
   operators can also reduce their risk by restricting the amount of
   information returned in response to a search request.</t>
      <t>
   Search functionality also increases the privacy risk of disclosing
   object relationships that might not otherwise be obvious.  For
   example, a search that returns IDN variants <xref target="RFC6927" format="default"/> that do not
   explicitly match a client-provided search pattern can disclose
   information about registered domain names that might not be otherwise
   available.  Implementers need to consider the policy and privacy
   implications of returning information that was not explicitly
   requested.</t>
      <t>
   Note that there might not be a single, static information return
   policy that applies to all clients equally.  Client identity and
   associated authorizations can be a relevant factor in determining how
   broad the response set will be for any particular query.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0952.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1035.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1123.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1166.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4291.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4632.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4918.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5396.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5730.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5733.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5890.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5891.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5952.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7230.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7231.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7480.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7481.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7484.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8499.xml"/>


<reference anchor='RFC9083' target="https://www.rfc-editor.org/info/rfc9083">
<front>
<title>JSON Responses for the Registration Data Access Protocol (RDAP)</title>

<author initials='S' surname='Hollenbeck' fullname='Scott Hollenbeck'>
    <organization />
</author>

<author initials='A' surname='Newton' fullname='Andrew Newton'>
    <organization />
</author>

<date month='June' year='2021' />

</front>
<seriesInfo name="STD" value="95"/>
<seriesInfo name="RFC" value="9083"/>
<seriesInfo name="DOI" value="10.17487/RFC9083"/>
</reference>

        <reference anchor="Unicode-UAX15" target="https://www.unicode.org/reports/tr15/">
          <front>
            <title>Unicode Standard Annex #15: Unicode Normalization Forms</title>
            <author>
              <organization>The Unicode Consortium</organization>
            </author>
            <date month="September" year="2013"/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>

        <reference anchor="REST" 
target="https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf">
          <front>
            <title>Architectural Styles and the Design of Network-based Software Architectures</title>
            <author initials="R." surname="Fielding" fullname="Roy Fielding">
              <organization>University of California, Irvine</organization>
            </author>
            <date year="2000"/>
          </front>
          <seriesInfo name="Ph.D. Dissertation," value="University of California, Irvine"/>
        </reference>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3912.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4007.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4290.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6874.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6927.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8521.xml"/>
      </references>
    </references>

    <section numbered="true" anchor="changes" toc="default">
      <name>Changes from RFC 7482</name>
      <ul  spacing="normal">
        <li>Addressed known errata.</li>
        <li>Addressed other reported clarifications and corrections: IDN, IDNA, and DNR definitions.
              Noted that registrars are entities.  Added a reference to RFC 8521 to address the bootstrap registry limitation. 
              Removed extraneous "...".  Clarified HTTP query string, search pattern, name server search, domain label suffix, and asterisk search.</li>
        <li>Addressed "The HTTP query string" clarification.</li>
        <li>Modified coauthor address.</li>
        <li>Updated references to RFC 7483 to RFC 9083.</li>
        <li>Added an IANA Considerations section. Changed references to use HTTPS for targets.</li>
        <li>Changed "XXXX is a search pattern representing the "FN" property of an entity (such as a contact, registrant, or registrar) name as specified in Section 5.1" to "Changed "XXXX is a search pattern representing the "fn" property of an entity (such as a contact, registrant, or registrar) name as described in Section 5.1".</li>
        <li>Added acknowledgments.</li>
        <li>Changed "The intent of the patterns described here are to enable queries" to "The intent of the patterns described here is to enable queries".</li>
        <li>Changed "the corresponding syntax extension in RFC 6874 <xref target="RFC6874" format="default"/> <bcp14>MUST NOT</bcp14> be used, and servers are to ignore it if possible" to "the corresponding syntax extension in RFC 6874 <xref target="RFC6874" format="default"/> <bcp14>MUST NOT</bcp14> be used, and servers <bcp14>SHOULD</bcp14> ignore it".</li> 
        <li>Changed "Only a single asterisk is allowed for a partial string search" to "A partial string search <bcp14>MUST NOT</bcp14> include more than one asterisk".</li> 
        <li>Changed "Clients should avoid submitting a partial match search of Unicode characters where a Unicode character may be legally combined with another Unicode character or characters" to "Clients <bcp14>SHOULD NOT</bcp14> submit a partial match search of Unicode characters where a Unicode character may be legally combined with another Unicode character or characters".</li>
        <li>Changed description of nameserver IP address "search pattern" in Sections <xref target="sect-3.2.1" format="counter"/> and <xref target="sect-3.2.2" format="counter"/>.</li>
        <li>IESG review feedback: Added "obsoletes 7482" to the headers, Abstract, and Introduction.  Changed "IETF standards" to "IETF specifications" and "Therefore" to "Accordingly" in <xref target="sect-1" format="default"/>. Updated the BCP 14 boilerplate. Added definition of "bootstrap registry" and changed "concatenating ... to" to "concatenating ... with" in <xref target="sect-3" format="default"/>.  Changed "bitmask length" to "prefix length" and "2001:db8::0" to "2001:db8::" in <xref target="sect-3.1.1" format="default"/>.  Added "in contrast to the more generic HTTP query string that admits multiple simultaneous parameters" in <xref target="sect-3.2" format="default"/>. Changed "0x002A" to "0x2A" in <xref target="sect-4.1" format="default"/>. Clarified use of HTTP 422 <bcp14>SHOULD</bcp14> in <xref target="sect-4.1" format="default"/>.</li>
      </ul>
   </section>
    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t>
   This document is derived from original work on RIR query formats
   developed by <contact fullname="Byron J. Ellacott"/> of APNIC, <contact fullname="Arturo L. Servin"/> of LACNIC,
   <contact fullname="Kaveh Ranjbar"/> of the RIPE NCC, and <contact fullname="Andrew L. Newton"/> of ARIN.
   Additionally, this document incorporates DNR query formats originally
   described by <contact fullname="Francisco Arias"/> and <contact fullname="Steve Sheng"/> of ICANN and <contact fullname="Scott Hollenbeck"/>
   of Verisign Labs.</t>
      <t>
   The authors would like to acknowledge the following individuals for
   their contributions to this document: <contact fullname="Francisco Arias"/>, <contact fullname="Marc Blanchet"/>,
   <contact fullname="Ernie Dainow"/>, <contact fullname="Jean-Philippe Dionne"/>, <contact fullname="Byron J. Ellacott"/>, 
   <contact fullname="Behnam Esfahbod"/>, <contact fullname="John Klensin"/>, <contact fullname="John Levine"/>, <contact fullname="Edward Lewis"/>, <contact fullname="Mario Loffredo"/>, <contact fullname="Patrick Mevzek"/>, <contact fullname="Mark Nottingham"/>,
   <contact fullname="Kaveh Ranjbar"/>, <contact fullname="Arturo L. Servin"/>, <contact fullname="Steve Sheng"/>, <contact fullname="Jasdip Singh"/>, and <contact fullname="Andrew Sullivan"/>.</t>
    </section>
  </back>
</rfc>
