Extensions
RDAP has an extension mechanism in which each extension is signaled by an extension identifier. These identifiers must start with an alphabetic character and may contain any combination of alphabetic characters, numeric characters (digits), and the underscore (“_”) character.
These extension identifiers are:
- Prepended to the names of JSON values.
- Precede path segments in URLs.
- Placed in the RDAP conformance array.
As simple as this sounds, some of these rules have been bent over the years causing some ambiguity. The IETF is currently working to correct some of these issues.
JSON
RFC 9083 gives an example of how these extension identifiers are used in JSON.
{
"handle" : "ABC123",
"objectClassName" : "entity"
"lunarNIC_beforeOneSmallStep" : "TRUE THAT!", // simple string
"remarks" :
[
{
"description" :
[
"She sells sea shells down by the sea shore.",
"Originally written by Terry Sullivan."
]
}
],
"lunarNIC_harshMistressNotes" : // an array
[
"In space,",
"nobody can hear you scream."
]
}
Left unsaid by the RFC, this is an example of the extension defining JSON that augments JSON defined by the core of RDAP. See the example below for the definition of a new object class by the extension.
In essence, the extension identifier prepends any JSON the extension defines.
The rule of thumb for clients laid out in RFC 9083 is to ignore any JSON the client is prepared to process.
URLs
RFC 9082 defines how extensions are to be used in URLs. Here, the extension identifier is used to prepend URL paths.
To round out this example, the URL https://rdap.lunar/lunarNIC_crater/alph92
might yield
the following response:
{
"rdapConformance" :
[
"rdap_level_0",
"lunarNIC"
],
"objectClassName" : "lunarNIC_crater",
"lunarNIC_handle" : "alpha92",
"lunarNIC_coordinates" : {
"quadrant_id": "b0",
"surveyed" : false
}
}
RFC 9082 does not define the use of extension identifiers in URL query parameters or as the only part of the path segment. As mentioned above, fixes to this are in active discussions in the IETF.
RDAP Conformance Array
The RDAP conformance array is a data structure that is a property of the JSON object returned as an RDAP response. It does not appear anywhere but as a direct child property of this JSON object (i.e. “top-most”).
The extension identifier gets listed in this array:
"rdapConformance" :
[
"rdap_level_0",
"lunarNIC" // lunarNic extension identifier
]
The following is the example from RFC 9083 modified to show the RDAP conformance array.
{
"rdapConformance" :
[
"rdap_level_0",
"lunarNIC" // lunarNic extension identifier
],
"handle" : "ABC123",
// simple string defined by the lunarNIC extension
"lunarNIC_beforeOneSmallStep" : "TRUE THAT!",
"remarks" :
[
{
"description" :
[
"She sells sea shells down by the sea shore.",
"Originally written by Terry Sullivan."
]
}
],
// an array defined by the lunarNIC extension
"lunarNIC_harshMistressNotes" :
[
"In space,",
"nobody can hear you scream."
]
}