draft-designteam-weirds-using-http-00.txt   draft-designteam-weirds-using-http-01.txt 
Network Working Group A. Newton Network Working Group A. Newton
Internet-Draft ARIN Internet-Draft ARIN
Intended status: Standards Track K. Ranjbar Intended status: Standards Track K. Ranjbar
Expires: November 11, 2012 RIPE NCC Expires: January 13, 2013 RIPE NCC
A. Servin A. Servin
LACNIC LACNIC
B. Ellacott B. Ellacott
APNIC APNIC
S. Hollenbeck S. Hollenbeck
Verisign Verisign
S. Sheng S. Sheng
F. Arias F. Arias
ICANN ICANN
N. Kong N. Kong
CNNIC CNNIC
F. Obispo F. Obispo
ISC ISC
May 10, 2012 July 12, 2012
Using HTTP for RESTful Whois Services by Internet Registries Using HTTP for RESTful Whois Services by Internet Registries
draft-designteam-weirds-using-http-00 draft-designteam-weirds-using-http-01
Abstract Abstract
This document describes the use of HTTP in Whois services using This document describes the use of HTTP in Whois services using
RESTful web methodologies. RESTful web methodologies.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 45 skipping to change at page 1, line 45
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on November 11, 2012. This Internet-Draft will expire on January 13, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Design Intents . . . . . . . . . . . . . . . . . . . . . . . . 6 3. Design Intents . . . . . . . . . . . . . . . . . . . . . . . . 5
4. Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4. Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.1. Accept Header . . . . . . . . . . . . . . . . . . . . . . 7 4.1. Accept Header . . . . . . . . . . . . . . . . . . . . . . 6
4.2. Parameters . . . . . . . . . . . . . . . . . . . . . . . . 7 4.2. Query Parameters . . . . . . . . . . . . . . . . . . . . . 6
5. Types of HTTP Response . . . . . . . . . . . . . . . . . . . . 8 5. Types of HTTP Response . . . . . . . . . . . . . . . . . . . . 7
5.1. Positive Answers . . . . . . . . . . . . . . . . . . . . . 8 5.1. Positive Answers . . . . . . . . . . . . . . . . . . . . . 7
5.2. Redirects . . . . . . . . . . . . . . . . . . . . . . . . 8 5.2. Redirects . . . . . . . . . . . . . . . . . . . . . . . . 7
5.3. Negative Answers . . . . . . . . . . . . . . . . . . . . . 8 5.3. Negative Answers . . . . . . . . . . . . . . . . . . . . . 7
5.4. Malformed Queries . . . . . . . . . . . . . . . . . . . . 8 5.4. Malformed Queries . . . . . . . . . . . . . . . . . . . . 7
6. Use of JSON . . . . . . . . . . . . . . . . . . . . . . . . . 9 6. Use of JSON . . . . . . . . . . . . . . . . . . . . . . . . . 8
6.1. Signaling . . . . . . . . . . . . . . . . . . . . . . . . 9 6.1. Signaling . . . . . . . . . . . . . . . . . . . . . . . . 8
6.2. Naming . . . . . . . . . . . . . . . . . . . . . . . . . . 9 6.2. Naming . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7. Use of XML . . . . . . . . . . . . . . . . . . . . . . . . . . 10 7. Use of XML . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.1. Signaling . . . . . . . . . . . . . . . . . . . . . . . . 10 7.1. Signaling . . . . . . . . . . . . . . . . . . . . . . . . 11
7.2. Naming and Structure . . . . . . . . . . . . . . . . . . . 10 7.2. Naming and Structure . . . . . . . . . . . . . . . . . . . 11
8. Common Error Response Body . . . . . . . . . . . . . . . . . . 12 8. Common Error Response Body . . . . . . . . . . . . . . . . . . 13
9. Common Datatypes . . . . . . . . . . . . . . . . . . . . . . . 13 9. Common Data Structures . . . . . . . . . . . . . . . . . . . . 14
10. Internationalization Considerations . . . . . . . . . . . . . 14 10. Common Datatypes . . . . . . . . . . . . . . . . . . . . . . . 16
10.1. URIs vs IRIs . . . . . . . . . . . . . . . . . . . . . . . 14 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
10.2. Character Encoding . . . . . . . . . . . . . . . . . . . . 14 11.1. Registration of RDAP Error Media Type for JSON . . . . . . 17
11. Normative References . . . . . . . . . . . . . . . . . . . . . 15 11.2. Registration of RDAP Error Media Type for XML . . . . . . 17
Appendix A. Areas of Improvement . . . . . . . . . . . . . . . . 16 12. Internationalization Considerations . . . . . . . . . . . . . 19
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 17 12.1. URIs vs IRIs . . . . . . . . . . . . . . . . . . . . . . . 19
12.2. Character Encoding . . . . . . . . . . . . . . . . . . . . 19
13. Normative References . . . . . . . . . . . . . . . . . . . . . 20
Appendix A. Cache Busting . . . . . . . . . . . . . . . . . . . . 22
Appendix B. Areas of Improvement . . . . . . . . . . . . . . . . 23
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24
1. Introduction 1. Introduction
Over time, several deficiencies have been noted in the Whois protocol This document describes the usage of HTTP for Registration Data
as described in RFC 3912. The following is a partial list: Directory Services running on RESTful web servers. The goal of this
lack of standardized command structures
lack of standardized output and error structures
lack of support for internationalization (and therefore
localization)
lack of support for user identification, authentication, and
access control
This document describes the usage of HTTP for Internet registry Whois
services running on RESTful web servers for the purposes of
addressing the deficiencies as described above. The goal of this
document is to tie together the usage patterns of HTTP into a common document is to tie together the usage patterns of HTTP into a common
profile applicable to the various types of Internet registries profile applicable to the various types of Directory Services serving
serving Whois data using RESTful styling. By giving the various Registration Data using RESTful styling. By giving the various
Internet registries a common behavior, a single client is better able Directory Services common behavior, a single client is better able to
to retreive data from Internet registries adhering to this behavior. retrieve data from Directory Services adhering to this behavior.
The goal of this specification is to define a simple use of HTTP to In designing these common usage patterns, this draft endeavours to
deliver Whois information using RESTful patterns. Where complexity satisfy requirements for Registration Data Access Protocols that are
may reside, it is the goal of this specification to place it upon the documented in [draft-kucherawy-weirds-requirements]. This draft also
server and to keep the client as simple as possible. In the introduces an additional design consideration to define a simple use
vacubulary of computer programmers, it should be suffecient enough to of HTTP. Where complexity may reside, it is the goal of this
write a client for this application in bash using commands such as specification to place it upon the server and to keep the client as
wget or curl and other commonly available command line tools. simple as possible. A client should be possible using common
operating system scripting tools.
This is the basic usage pattern for this protocol: This is the basic usage pattern for this protocol:
1. A client issues an HTTP query using GET. As an example, a query 1. A client issues an HTTP query using GET. As an example, a query
for the network registration 192.168.0.0 might be for the network registration 192.168.0.0 might be
http://example.com/ip/192.168.0.0. http://example.com/ip/192.168.0.0.
2. If the receiving server has the information for the query, it 2. If the receiving server has the information for the query, it
examines the Accept header of the query and returns a 200 examines the Accept header field of the query and returns a 200
response with a response entity appropriate for the requested response with a response entity appropriate for the requested
format. format.
3. If the receiving server does not have the information for the 3. If the receiving server does not have the information for the
query but does have knowledge of where the information can be query but does have knowledge of where the information can be
found, it will return a response of 301 or 303 with the Redirect found, it will return a redirection response (3xx) with the
header containing an HTTP URL pointing to the information. The Redirect header containing an HTTP URL pointing to the
client is expected to re-query using that HTTP URL. information. The client is expected to re-query using that HTTP
URL.
4. If the receiving server does not have the information being 4. If the receiving server does not have the information being
requested and does not have knowledge of where the information requested and does not have knowledge of where the information
can be found, it should return a 404 response. can be found, it should return a 404 response.
It is important to note that it is not the intent of this document to It is important to note that it is not the intent of this document to
redefine the meaning and semantics of HTTP. The purpose of this redefine the meaning and semantics of HTTP. The purpose of this
document is to clarify the use of standard HTTP mechanisms for this document is to clarify the use of standard HTTP mechanisms for this
application. application.
skipping to change at page 6, line 11 skipping to change at page 5, line 11
RD-AP. RD-AP.
Note that other types of RD-AP may exist in the future. Note that other types of RD-AP may exist in the future.
3. Design Intents 3. Design Intents
There are a few design criteria this document attempts to support. There are a few design criteria this document attempts to support.
First, each query is meant to return either zero or one result. With First, each query is meant to return either zero or one result. With
the maximum upper bound being set to one, the issuance of redirects the maximum upper bound being set to one, the issuance of redirects
is simplified to the known document model used by HTTP [RFC2616]. is simplified to the known query/respone model used by HTTP
Should a result contain more than one result, some of which are [RFC2616]. Should a result contain more than one result, some of
better served by other servers, the redirection model becomes much which are better served by other servers, the redirection model
more complicated. becomes much more complicated.
Second, multiple response formats are supported by this protocol. Second, multiple response formats are supported by this protocol.
This document outlines the base usage of JSON and XML, but server This document outlines the base usage of JSON and XML, but server
operators may support other formats as they desire if appropriate. operators may support other formats as they desire if appropriate.
Third, HTTP offers a number of transport protocol mechanisms not Third, HTTP offers a number of transport protocol mechanisms not
described further in this document. Operators are able to make use described further in this document. Operators are able to make use
of these mechanisms according to their local policy, including cache of these mechanisms according to their local policy, including cache
control, authorization, compression, and redirection. HTTP also control, authorization, compression, and redirection. HTTP also
benefits from widespread investment in scalability, reliability, and benefits from widespread investment in scalability, reliability, and
performance performance, and widespread programmer understanding of client
behaviours for RESTful web services, reducing the cost to deploy
Registration Data Directory Services and clients.
4. Queries 4. Queries
4.1. Accept Header 4.1. Accept Header
Clients SHOULD put the MIME type of the format they desire in the Clients SHOULD put the media type of the format they desire in the
Accept header. Servers SHOULD respond with an appropriate MIME type Accept header field, and SHOULD use the Accept header parameter
in the Accept header in accordance with the preference rules for the "level" to indicate the version of the format acceptable [RFC2616].
Accept header in HTTP [RFC2616]. However the use by clients of
multiple MIME types in the Accept header is NOT RECOMMENDED.
Clients may use a generic MIME type for the desired data format of Accept: applicaiton/weirds_blah+json;level=0
the response, but servers MUST respond with the most appropriate MIME
type. In other words, a client may use "application\json" to express
that it desires JSON or "application\weirds_blah_v1+json" to express
that it desires WEIRDS BLAH version 1 in JSON. The server MUST
respond with "application\weirds_blah_v1+json".
4.2. Parameters Figure 1
To overcome issues with misbehaving HTTP [RFC2616] cache Servers SHOULD respond with an appropriate media type in the Content-
infrastructure, clients may use the '__weirds__cachebust' query Type header in accordance with the preference rules for the Accept
parameter with a random value of their choosing. Servers MUST ignore header in HTTP [RFC2616]. Servers SHOULD affix a media type
this query parameter. parameter of "level" appropriate to the version of the format being
sent.
The following is an example use of this parameter to retreive the Content-Type: application/weirds_blah+json;level=0
abuse contacts associated with the most specific IP network with the
address 192.0.2.0:
/ip/192.0.2.0/operator/contacts/abuse?__weirds_cachebust=xyz123 Figure 2
For all others, servers SHOULD ignore unknown query parameters. Clients MAY use a generic media type for the desired data format of
the response (e.g. "application/json"), but servers SHOULD respond
with the most appropriate media type and corresponding level (e.g.
"application/weirds+json;level=0"). In other words, a client may use
"application/json" to express that it desires JSON or "application/
weirds_blah+json" to express that it desires WEIRDS BLAH in JSON.
The server MUST respond with "application/weirds_blah+json;level=0".
4.2. Query Parameters
Servers SHOULD ignore unknown query parameters. Use of unknown query
parameters for cache-busting is described in Appendix A.
5. Types of HTTP Response 5. Types of HTTP Response
This section describes the various types of responses a server may This section describes the various types of responses a server may
send to a client. While no standard HTTP response code is forbidden send to a client. While no standard HTTP response code is forbidden
in usage, at a minimum clients should understand the response codes in usage, at a minimum clients should understand the response codes
described in this section. It is expected that usage of response described in this section. It is expected that usage of response
codes and types for this application not defined here will be codes and types for this application not defined here will be
described in subsequent documents. described in subsequent documents.
skipping to change at page 8, line 25 skipping to change at page 7, line 25
If a server has the information requested by the client and wishes to If a server has the information requested by the client and wishes to
respond to the client with the information according to its policies, respond to the client with the information according to its policies,
it should encode the answer in the format most appropriate according it should encode the answer in the format most appropriate according
to the standard and defined rules for processing the HTTP Accept to the standard and defined rules for processing the HTTP Accept
header, and return that answer in the body of a 200 response. header, and return that answer in the body of a 200 response.
5.2. Redirects 5.2. Redirects
If a server wishes to inform a client that the answer to a given If a server wishes to inform a client that the answer to a given
query can be found elsewhere, it should return either a 301 or a 303 query can be found elsewhere, it SHOULD return either a 301 or a 307
reponse code and an HTTP URL in the Redirect header. The client is response code and an HTTP URL in the Redirect header. The client is
expected to issue a subsequent query using the given URL without any expected to issue a subsequent query using the given URL without any
processing of the URL. In other words, the server is to hand back a processing of the URL. In other words, the server is to hand back a
complete URL and the client should not have to transform the URL to complete URL and the client should not have to transform the URL to
follow it. follow it.
A server should use a 301 response to inform the client of a A server should use a 301 response to inform the client of a
permanent move and a 303 repsonse otherwise. For this application, permanent move and a 307 response otherwise. For this application,
such an example of a permentant move might be a TLD operator such an example of a permanent move might be a TLD operator informing
informing a client the information being sought can be found with a client the information being sought can be found with another TLD
another TLD operator (i.e. a query for the domain bar in foo.example operator (i.e. a query for the domain bar in foo.example is found at
is found at http://foo.example/domain/bar). http://foo.example/domain/bar).
5.3. Negative Answers 5.3. Negative Answers
If a server wishes to respond that it has no information regarding If a server wishes to respond that it has no information regarding
the query, it SHOULD return a 404 response code. Optionally, it may the query, it SHOULD return a 404 response code. Optionally, it may
include additional information regarding the lack of information as include additional information regarding the lack of information as
defined by Section 8. defined by Section 8.
5.4. Malformed Queries 5.4. Malformed Queries
If a server receives a query which it cannot understand, it SHOULD If a server receives a query which it cannot understand, it SHOULD
return a 503 response code. Optionally, it may include additional return a 400 response code. Optionally, it may include additional
information about why it does not understand the query as defined by information about why it does not understand the query as defined by
Section 8. Section 8.
6. Use of JSON 6. Use of JSON
6.1. Signaling 6.1. Signaling
Clients may signal their desire for JSON using the "application\json" Clients may signal their desire for JSON using the "application/json"
mime type or a more application specific JSON mime type. media type or a more application specific JSON media type.
6.2. Naming 6.2. Naming
Clients processing JSON [RFC4627] responses SHOULD ignore values Clients processing JSON [RFC4627] responses SHOULD ignore values
associated with unrecognized names. Servers MAY insert values associated with unrecognized names. Servers MAY insert values
signified by names into the JSON responses which are not specified in signified by names into the JSON responses which are not specified in
this document. Insertion of unspecified values into JSON responses this document. Insertion of unspecified values into JSON responses
SHOULD have names prefixed with a short identifier followed by an SHOULD have names prefixed with a short identifier followed by an
underscore followed by a meaningful name. underscore followed by a meaningful name.
For example, "handle" may be specified as the name of a value which For example, a JSON object may have "handle" and "remarks" formally
is a string containing a registry unique identifier for a documented in a specification. Clients adhering to that
registration. The registry of the Moon might desire to insert a specification will have appropriate knowledge of the meaning of
value specific to their services denoting that a registration occured "handle" and "remarks".
before or after the first moon landing. The name for such a value
might take the form "lunarNic_beforeOneSmallStep". Consider the following JSON response with JSON names.
{
"handle" : "ABC123",
"remarks" : [
"she sells seas shells",
"down by the seashore"
]
}
Figure 3
If The Registry of the Moon desires to express information not found
in the specification, it might select "lunarNic" as its identifying
prefix and insert, as an example, the name
"lunarNic_beforeOneSmallStep" to signify registrations occuring
before the first moon landing and the name
"lunarNic_harshMistressNotes" containing other descriptive text.
Consider the following JSON response with JSON names, some of which
should be ignored by clients without knowledge of their meaning.
{
"handle" : "ABC123",
"lunarNic_beforeOneSmallStep" : "TRUE THAT!",
"remarks" : [
"she sells seas shells",
"down by the seashore"
],
"lunarNic_harshMistressNotes" : [
"In space,",
"nobody can hear you scream."
]
}
Figure 4
Insertion of unrecognized names ignored by clients may also be used
for future revisions to specifications and specifications deriving
extensions from a base specification.
JSON names SHOULD only consist of the alphabetic ASCII characters A JSON names SHOULD only consist of the alphabetic ASCII characters A
through Z in both uppercase and lowercase, underscore characters, and through Z in both uppercase and lowercase, the numerical digits 0
SHOULD NOT begin with an underscore character or the characters through 9, underscore characters, and SHOULD NOT begin with an
"xml". This restriction is a union of the Ruby programming language underscore character, numerical digit or the characters "xml". The
following describes the produciton of JSON names in ABNF [RFC5234].
ABNF for JSON names
name = ALPHA *( ALPHA / DIGIT / "_" )
Figure 5
This restriction is a union of the Ruby programming language
identifier syntax and the XML element name syntax and has two identifier syntax and the XML element name syntax and has two
purposes. First, client implementers using modern programming purposes. First, client implementers using modern programming
languages such as Ruby or Java may use libraries that automatically languages such as Ruby or Java may use libraries that automatically
promote JSON values to first order object attributes or members (e.g. promote JSON names to first order object attributes or members (e.g.
using the example above, the values may be referenced as using the example above, the values may be referenced as
network.handle or network.lunarNic_beforeOneSmallStep). Second, a network.handle or network.lunarNic_beforeOneSmallStep). Second, a
clean mapping between JSON and XML is easy to accomplish using the clean mapping between JSON and XML is easy to accomplish using the
JSON representation. JSON representation.
Clients processing JSON responses MUST be prepared for values Clients processing JSON responses MUST be prepared for values
specified in the registry response documents to be absent from a specified in the registry response documents to be absent from a
response as no JSON value listed is required to appear in the response as no JSON value listed is required to appear in the
response. In other words, servers MAY remove values as is needed by response. In other words, servers MAY remove values as is needed by
the policies of the server operator. the policies of the server operator.
7. Use of XML 7. Use of XML
7.1. Signaling 7.1. Signaling
Clients may signal their desire for XML using the "application\xml" Clients may signal their desire for XML using the "application/xml"
mime type or a more application specific XML mime type. media type or a more application specific XML media type.
7.2. Naming and Structure 7.2. Naming and Structure
Well-formed XML may be programmatically produced using the JSON Well-formed XML may be programmatically produced using the JSON
encodings due to the JSON naming rules outlined in Section 6.2 and encodings due to the JSON naming rules outlined in Section 6.2 and
the following simple rules: the following simple rules:
1. Where a JSON name is given, the corresponding XML element has the 1. Where a JSON name is given, the corresponding XML element has the
same name. same name.
skipping to change at page 10, line 47 skipping to change at page 11, line 47
], ],
"uris" : [ "uris" : [
{ {
"type" : "source", "type" : "source",
"uri" : "http://whois-rws.net/network/xxxx" "uri" : "http://whois-rws.net/network/xxxx"
}, },
{ {
"type" : "parent", "type" : "parent",
"uri" : "http://whois-rws.net/network/yyyy" "uri" : "http://whois-rws.net/network/yyyy"
} }
]
} }
Figure 1 Figure 6
The corresponding XML would look like this: The corresponding XML would look like this:
<response> <response>
<startAddress>10.0.0.0</startAddress> <startAddress>10.0.0.0</startAddress>
<endAddress>10.0.0.255</endAddress> <endAddress>10.0.0.255</endAddress>
<remarks>She sells sea shells</remarks> <remarks>She sells sea shells</remarks>
<remarks>down by the seashore</remarks> <remarks>down by the seashore</remarks>
<uris> <uris>
<type>source</type> <type>source</type>
<uri>http://whois-rws.net/network/xxxx</uri> <uri>http://whois-rws.net/network/xxxx</uri>
</uris> </uris>
<uris> <uris>
<type>parent</type> <type>parent</type>
<uri>http://whois-rws.net/network/yyyy</uri> <uri>http://whois-rws.net/network/yyyy</uri>
</uris> </uris>
</response> </response>
JSON values converted to XML element content MUST be properly
escaped. XML offers various means for escaping data, but such
escaping MUST account for the '<', '>', and '&' characters and MUST
redact all C0 control characters except tab, carriage return, and
new-line. (Redaction of disallowed control characters is a protocol
requirement, though in practice most Internet registries do not allow
this data in their data stores and therefore do not need to account
for this rule.)
The rules for clients processing XML responses are the same as those The rules for clients processing XML responses are the same as those
with JSON: clients SHOULD ignore unrecognized XML elements, and with JSON: clients SHOULD ignore unrecognized XML elements, and
servers MAY insert XML elements with tag names according to the servers MAY insert XML elements with tag names according to the
naming rules in Section 6.2. And as with JSON, clients MUST be naming rules in Section 6.2. And as with JSON, clients MUST be
prepared for XML elements specified in the registry response prepared for XML elements specified in the registry response
documents to be absent from a response as no XML element listed is documents to be absent from a response as no XML element listed is
required to appear in the response. required to appear in the response.
8. Common Error Response Body 8. Common Error Response Body
skipping to change at page 12, line 19 skipping to change at page 13, line 19
The basic structure of that response is a data class containing an The basic structure of that response is a data class containing an
error code number (corresponding to the HTTP response code) followed error code number (corresponding to the HTTP response code) followed
by a string named "title" followed by an array of strings named by a string named "title" followed by an array of strings named
"description". "description".
This is an example of the JSON version of the common response body. This is an example of the JSON version of the common response body.
{ {
"errorCode": 418 "errorCode": 418
"title": "No More Tacos", "title": "Your beverage choice is not available",
"description": [ "description": [
"We ran out of shells and sauce.", "I know coffee has more ummppphhh.",
"Come back tomorrow." ] "But I cannot provide." ]
} }
Figure 2 Figure 7
This is an example of the XML version of the common response body. This is an example of the XML version of the common response body.
<response> <response>
<errorCode>418</errorCode> <errorCode>418</errorCode>
<title>No More Tacos</title> <title>Your beverage choice is not available</title>
<description>We ran out of shells and sauce.</description> <description>I know coffee has more ummppphhh.</description>
<description>Come back tomorrow.</description> <description>But I cannot provide.</description>
</response> </response>
Figure 3 Figure 8
The MIME type for the JSON structure is The media type for the JSON structure is "application/
"application\weirds_common_error_v1+json" and the MIME type for the rdap_error+json" and the media type for the XML document is
XML document is "application\weirds_common_error_v1+xml". "application/rdap_error+xml". Conformance to this specification is
considered to be level 0 for both media types.
A client MAY simply use the HTTP response code as the server is not A client MAY simply use the HTTP response code as the server is not
required to include error data in the response body. However, if a required to include error data in the response body. However, if a
client wishes to parse the error data, it SHOULD first check that the client wishes to parse the error data, it SHOULD first check that the
Accept header contains the appropriate MIME type. Content-Type header contains the appropriate media type.
9. Common Datatypes 9. Common Data Structures
This section defines two common data structures to be used by
DNRD-AP, NRRD-AP, and other RD-AP protocols. As such, the names
identifying these data structures are not to be redefined by any
registry specific RD-AP specifications. Each of these datatypes MAY
appear within any other data object of a response, but the intended
purpose is that they will be mostly used in the top-most data object
of a response.
The first data structure is named "rdapConformance" and is simply an
array of strings, each providing a hint as to the specifications used
in the construction of the response.
An example rdapConformance data structure.
"rdapConformance" : [
"nrrdap_level_0"
]
Figure 9
The second data structure is named "notices" and is an array of
"notice" objects. Each "notice" object contains a "title" string
representing the title of the notice object, an array of strings
named "description" for the purposes of conveying any descriptive
text about the notice, and a "uri" string holding a URI referencing a
service that may provide additional information about the notice.
An exmaple of the notices data structure.
"notices" : [
"notice" : {
"title" : "Terms of Use",
"description" : [
"This service is subject to The Registry of the Moons",
"terms of service."
],
"uri" : "http://example.com/our-terms-of-use"
}
]
Figure 10
This is an example response with both rdapConformance and notices
embedded.
{
"rdapConformance" : [
"nrrdap_level_0"
]
"notices" : [
"notice" : {
"title" : "Content Redacted",
"description" : [
"Without full authorization, content has been redacted.",
"Sorry, dude!"
],
"uri" : "http://example.com/our-redaction-policies"
}
]
"startAddress" : "10.0.0.0",
"endAddress" : "10.0.0.255",
"remarks" : [
"she sells seas shells",
"down by the seashore"
],
"uris" : [
{
"type" : "source",
"uri" : "http://whois-rws.net/network/xxxx"
},
{
"type" : "parent",
"uri" : "http://whois-rws.net/network/yyyy"
}
]
}
Figure 11
10. Common Datatypes
This section describes common data types found in Internet This section describes common data types found in Internet
registries. Unless otherwise stated by the response specification of registries, the purpose being a common and normalized list of
an Internet registry using this specification as a basis, the data normative references to other specifications to be used by multiple
types can assume to be as follows: RD-AP applications. Unless otherwise stated by the response
specification of an Internet registry using this specification as a
basis, the data types can assume to be as follows:
1. IPv4 addresses - [RFC0791] 1. IPv4 addresses - [RFC0791]
2. IPv6 addresses - [RFC5952] 2. IPv6 addresses - [RFC5952]
3. country code - [ISO.3166.1988] 3. country code - [ISO.3166.1988]
4. domain name - [RFC4343] 4. domain name - [RFC4343]
5. email address - [RFC5322] 5. email address - [RFC5322]
6. date and time strings - [RFC3339] 6. date and time strings - [RFC3339]
10. Internationalization Considerations 11. IANA Considerations
10.1. URIs vs IRIs 11.1. Registration of RDAP Error Media Type for JSON
This specification registers the "application/rdap_error+json" media
type.
Type name: application
Subtype name: rdap_error+json
Required parameters: n/a
Optional parameters: level
Encoding considerations: n/a
Security considerations: n/a
Interoperability considerations: n/a
Published specification: [[ this document ]]
Applications that use this media type: RESTful Whois applications
Additional information: n/a
Person & email address to contact for further information: Andy
Newton &andy@hxr.us&
Intended usage: COMMON
Restrictions on usage: none
Author: Andy Newton
Change controller: IETF
11.2. Registration of RDAP Error Media Type for XML
This specification registers the "application/rdap_error+xml" media
type.
Type name: application
Subtype name: rdap_error+xml
Required parameters: n/a
Optional parameters: level
Encoding considerations: n/a
Security considerations: n/a
Interoperability considerations: n/a
Published specification: [[ this document ]]
Applications that use this media type: RESTful Whois applications
Additional information: n/a
Person & email address to contact for further information: Andy
Newton &andy@hxr.us&
Intended usage: COMMON
Restrictions on usage: none
Author: Andy Newton
Change controller: IETF
12. Internationalization Considerations
12.1. URIs vs IRIs
Clients MAY use IRIs as they see fit, but MUST transform them to URIs Clients MAY use IRIs as they see fit, but MUST transform them to URIs
[RFC3986] for interaction with RD-AP servers. RD-AP servers MUST use [RFC3986] for interaction with RD-AP servers. RD-AP servers MUST use
URIs in all responses, and clients MAY transform these URIs to IRIs. URIs in all responses, and clients MAY transform these URIs to IRIs.
10.2. Character Encoding 12.2. Character Encoding
The default text encoding for JSON and XML responses in RD-AP is The default text encoding for JSON and XML responses in RD-AP is
UTF-8, and all servers and clients MUST support UTF-8. Servers and UTF-8, and all servers and clients MUST support UTF-8. Servers and
clients MAY optionally support other character encodings. clients MAY optionally support other character encodings.
11. Normative References 13. Normative References
[draft-kucherawy-weirds-requirements]
Kucherawy, M., "Requirements For Internet Registry
Services", Work in progress: Internet
Drafts draft-kucherawy-weirds-requirements-04.txt,
April 2011.
[SAC-051] Piscitello, D., Ed., "SSAC Report on Domain Name WHOIS [SAC-051] Piscitello, D., Ed., "SSAC Report on Domain Name WHOIS
Terminology and Structure", September 2011. Terminology and Structure", September 2011.
[RFC4627] Crockford, D., "The application/json Media Type for [RFC4627] Crockford, D., "The application/json Media Type for
JavaScript Object Notation (JSON)", RFC 4627, July 2006. JavaScript Object Notation (JSON)", RFC 4627, July 2006.
[RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the [RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the
Internet: Timestamps", RFC 3339, July 2002. Internet: Timestamps", RFC 3339, July 2002.
skipping to change at page 16, line 5 skipping to change at page 21, line 5
Resource Identifier (URI): Generic Syntax", STD 66, Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, January 2005. RFC 3986, January 2005.
[RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322,
October 2008. October 2008.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
Appendix A. Areas of Improvement [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008.
Appendix A. Cache Busting
To overcome issues with misbehaving HTTP [RFC2616] cache
infrastructure, clients may use the adhoc and improbably used query
parameter with a random value of their choosing. As Section 4.2
instructs servers to ignore unknown parameters, this is unlikely to
have any known side effects.
An example of using an unknown query parameter to bust caches:
http://example.com/ip/192.0.2.0?__fuhgetaboutit=xyz123
Use of an unknown parameter to overcome misbehaving caches is not
part of any specification and is offered here for informational
purposes.
Appendix B. Areas of Improvement
Things that need to be done to this draft. Things that need to be done to this draft.
1. authentication what? 1. authentication what?
2. clean up must should, ref 2119? 2. clean up must should, ref 2119?
3. better language on data formats... it was just a rough start 3. better language on data formats... it was just a rough start
4. IANA considerations 4. Security considerations?
5. Security considerations?
6. Is there a privacy considerations things we have to do now? 5. Is there a privacy considerations things we have to do now?
Authors' Addresses Authors' Addresses
Andrew Lee Newton Andrew Lee Newton
American Registry for Internet Numbers American Registry for Internet Numbers
3635 Concorde Parkway 3635 Concorde Parkway
Chantilly, VA 20151 Chantilly, VA 20151
US US
Email: andy@arin.net Email: andy@arin.net
 End of changes. 46 change blocks. 
133 lines changed or deleted 369 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/