Fwd: Re: WHOIS public API

From: Ish Sookun <ish_at_lsl.digital>
Date: Mon, 10 Apr 2017 20:41:30 +0400


Dear SM, Renghen,

We spoke off-list about the term API and the request I sent to AFRINIC.
My understanding of the below is that AFRINIC only has a WHOIS and a
RDAP server. Could you please confirm whether I understood it well?

Regards,

Ish

-------- Forwarded Message --------
Subject: Re: WHOIS public API
Date: Tue, 4 Apr 2017 15:31:15 +0400
From: Daniel Shaw <daniel_at_afrinic.net>
To: Ish Sookun <ish_at_hacklog.mu>



Dear Ish,

Before really being able to answer *perfectly* we’d need to agree on
what you define as an “API” :-)

Depending on how one defines API, the answer can be either yes or no.
I’ll explain further shortly. But it’s basically yes.

Let me first be clear, that given my role within AFRINIC, I am indeed a
good contact to explain to you exactly what services and interfaces we
run publicly, how to access them and what you can and cannot do with
them technically.

However, once I’ve explained what works and how it works, if you then
have further questions regarding why AFRINIC has what it has vs any
other alternatives. Or are interested in wether or not anything
different may be in the future roadmap; those sorts of questions would
need to go through a customer service contact.

To answer your question fully: Broadly speaking, yes.

AFRINIC provides a number of public interfaces to query the database of
IP resource allocations, contact information, reverse DNS delegations
and so on (registration data) that we maintain.

The first of these is the standard well known WHOIS interface. The WHOIS
protocol specification is detailed in the short RFC 3912 [1].
This is a relatively simple TCP protocol that listens on port 43, and
clients interact with it using a text-based query, and are answered in
human readable ascii text. As you may know WHOIS as a protocol is not
only used by Regional Internet Registries like AFRINIC, but also many
Domain registrars, as well as various other online data services.

This is technically a public remote API. The queries accepted and the
format of the responses are documented, a client application can open a
socket, make a query and get a response.

Of course, most typically, an end user will use an existing command-line
client. However, you can in fact interact with the database over port 43
using telnet. Or indeed with a library from most programming languages.
Hence technically an API.

However, if you specifically meant a WHOIS REST API, then the answer is
more or less no. AFRINIC does not have it’s own REST API for
registration data queries (and updates) as some other RIR’s and domain
registrars do.

That being said, AFRINIC *does* have a public RESTful web service
available for *querying* registration data. However, this is not just an
HTTP interface to the same ascii only WHOIS format, but rather a
separate Registration Data Access Protocol (RDAP) end-point. It is:
http://rdap.afrinic.net/rdap/

You can read the full RDAP specification in RFC 7482 [2]. Additional
details are also in RFCs 7484, 7483 and 7480. RDAP is an HTTP based
service that will return the same data as WHOIS, in JSON format.

And finally of course, you can do queries from the AFRINIC web site in a
form there. Which is not an API of any kind.

So in summary, the answer to your question is: Yes. AFRINIC has two
different public APIs for *queries*: Port 43 WHOIS, and a RESTful RDAP
service.

However, AFRINIC only currently allows for registered members to *write*
authenticated updates via port 43 or via an automated email service. We
do not have an API that combines authentication/writes with http and REST.

Two other services you may be interested in are:
* AFRINIC provides a daily bulk dump of anonymized WHOIS data on
ftp.afrinic.net [3].
* For discussions and suggestions in regards to WHOIS and the database,
AFRINIC has a database working group mailing list [4].

Regards,
Daniel

On 4 Apr 2017, 14:15 +0400, Ish Sookun <ish_at_hacklog.mu>, wrote:
> Dear Mr Shaw,
>
> I'd like to know if AFRINIC has a public API for WHOIS queries.
>
> Regards,
>
> --
> Ish Sookun
>

[1] https://tools.ietf.org/html/rfc3912
[2] https://tools.ietf.org/html/rfc7482
[3] http://ftp.afrinic.net/dbase/
[4] http://www.afrinic.net/community/working-groups/dbwg
Received on Mon Apr 10 2017 - 16:41:51 PST

This archive was generated by hypermail 2.3.0 : Mon Apr 10 2017 - 16:45:00 PST