Skip to main content

API reference

Every node of the dappy network exposes endpoints, allowing programs to query the data of the dappy name system, mainly records from zones. Users or clients of .d domains are supposed to do co-resolution, and should not trust a single answer given by a node, this is why dappy-lookup library (it can be a CLI or SDK) exists, dhttps is also based on dappy-lookup and does co-resolution under the hood.

Although nodes often expose their API through the DNS+CA system, you are supposed to query them directly though IP + self signed certificate. dappy-lookup knows the IP addresses and TLS certificates for each node, and does co-resolution.

DNS-over-HTTPS endpoint

A node of the dappy network will expose a DoH compatible endpoint, /dns-query, with Content-Type: application/dns-message (see RFC8484). Nevertheless, since DoH imposes limitation on the size of the responses, we can't really rely on it for CERT records, we decided to add simple JSON endpoints.

JSON endpoints

[domain] is to be replaced by the domain you want to resolve

Retrieve A records

GET or POST /[domain]/A
ex: GET https://node1.d.fabco.tech/dappy.d/A

node1.d.fabco.tech/dappy.d/A

{"records":[{"data":"134.209.84.129","name":"@","type":"A"}]}

Retrieve AAAA records

GET or POST /[domain]/AAAA
ex: GET https://node1.d.fabco.tech/dappy.d/AAAA

node1.d.fabco.tech/dappy.d/AAAA

{"records":[{"data":"2001:0db8:85a3:0000:0000:8a2e:0370:7334","name":"@","type":"AAAA"}]}

Retrieve CERT records

GET or POST /[domain]/CERT
ex: GET https://node1.d.fabco.tech/dappy.d/CERT
{"records":[{"data":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUROakNDQWg2Z0F3SUJBZ0lVWDhPZDEwUE1jU29KRFpndnAzZXVDSmtlVHVJd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0dqRVlNQllHQTFVRUF3d1BaR1ZtWVhWc2RDNWtZWEJ3ZVM1a01CNFhEVEl5TVRBeU1EQTVNVEl6TUZvWApEVE14TURFd05qQTVNVEl6TUZvd0dqRVlNQllHQTFVRUF3d1BaR1ZtWVhWc2RDNWtZWEJ3ZVM1a01JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXBHOW8wNGVFM0Z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051TnZTZlRTTStlSkEKLzlVYnhueXZPZ0pqOHAycE5CV041L1ZBblJwQmVjc1RkMm1HK0Fsajd2Vytjck56VzYwd2p0K1NhUjhQL1hjcwp1RUtvK1B6ZTBRRHg2QT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K","name":"@","type":"CERT"}]}

node1.d.fabco.tech/dappy.d/CERT

Be careful, as CERT records are base64 encoded

Retrieve TXT records

GET or POST /[domain]/TXT
ex: GET https://node1.d.fabco.tech/dappy.d/TXT

node1.d.fabco.tech/dappy.d/TXT

{"records":[{"data":"OWNER=0427fc3b97535a022a271ceaaecf518ebc218b46d579e4058cf0830f4e56f652a04bdc93542e812b342fef0a5a6f92b11ca2ac96895e5bc6db2fd38a3341ea4f42","name":"@","type":"TXT"}]}