Skip to content

v0.5.0

Latest

Choose a tag to compare

@boutetnico boutetnico released this 24 Apr 21:11
· 1 commit to main since this release

TLD catalog endpoints

Two new methods list the TLDs the API can resolve and how often each registry's RDAP server populates common fields. Neither endpoint counts against your monthly quota.

TldListResponse tlds = client.tlds();
System.out.printf(
    "%d TLDs, coverage %.0f%%%n",
    tlds.getMeta().getCount(), tlds.getMeta().getCoverage() * 100);

for (TldEntry tld : tlds.getData()) {
    if (tld.getFieldAvailability() != null) {
        System.out.printf(
            "%s: expires_at=%s%n",
            tld.getTld(), tld.getFieldAvailability().getExpiresAt().toWire());
    }
}

Filters: since (ISO 8601), server (hostname) on TldsOptions. Pass the previous ETag via ifNoneMatch to skip unchanged transfers. The method returns null on HTTP 304.

TldListResponse later = client.tlds(new TldsOptions().ifNoneMatch(tlds.getEtag()));
TldResponse com = client.tld("com");

New response classes: TldListResponse, TldResponse, TldEntry, TldListMeta, TldMeta, TldThresholds, FieldAvailability, AvailabilityLevel. New option classes: TldsOptions, TldOptions.

NotSupportedException

A new NotSupportedException subclass of NotFoundException is thrown on HTTP 404 when the API returns error: "not_supported" (no RDAP coverage for the TLD, IP range, or ASN range). Existing catch (NotFoundException e) blocks keep working.

import io.rdapapi.client.exceptions.NotFoundException;
import io.rdapapi.client.exceptions.NotSupportedException;

try {
    client.domain("example.nope");
} catch (NotSupportedException e) {
    System.out.println("TLD not covered by RDAP");
} catch (NotFoundException e) {
    System.out.println("Domain not registered");
}

Install

Gradle:

implementation("io.rdapapi:rdapapi-java:0.5.0")

Maven:

<dependency>
    <groupId>io.rdapapi</groupId>
    <artifactId>rdapapi-java</artifactId>
    <version>0.5.0</version>
</dependency>

Full Changelog: v0.3.0...v0.5.0