RESTful API
This document describes the API endpoints for the ddns-so service.
This document describes the RESTful API provided by `api.ddns.so` for resolving domain names and querying name records.
API Endpoint
https://api.ddns.so
Example
curl https://api.ddns.so/name/nameset.dot
Resolve Name
Resolve a name to get its records.
URL : /name/:name
Method : GET
Auth required : NO
Permissions required : None
Parameters
name=[string]
name to resolve (required)
Response
200 OK
on success
{
"result": "ok",
"data": {
"name": "john.dot",
"name_hash": "0x...",
"records": {
"avatar": "https://...",
"twitter": "@john"
}
}
}
Errors
404 Not Found
if name is not found500 Internal Server Error
on any other error
Get Subdomains
Get paginated list of subdomains for a name.
URL : /subdomains/:name
Method : GET
Auth required : NO
Permissions required : None
Parameters
name=[string]
parent namebefore
- Fetch subdomains before this name hashafter
- Fetch subdomains after this name hashlimit
- Maximum number of subdomains to return (default 50)order
- Ordering of results -asc
ordesc
(defaultasc
)
Response
200 OK
on success
{
"result": "ok",
"pagination": {
"before": "acc.example.dot",
"limit": 10,
"order": "asc"
},
"subdomains": [
{
"name": "foo.example.dot",
"nameHash": "0x123abc...",
"owner": "0x456def..."
},
{
"name": "bar.example.dot",
"nameHash": "0x456def...",
"owner": "0x789ghi..."
}
]
}
Errors
404 Not Found
if parent name not found500 Internal Server Error
on any other error
Reverse Resolution
Reverse resolve an address to get the name.
URL : /reverse/pns/:address
for PNS
URL : /reverse/ens/:address
for ENS
Method : GET
Auth required : NO
Permissions required : None
Parameters
address=[string]
address to reverse resolve
Response
200 OK
on success
{
"result": "ok",
"address": "0x1234...",
"name": "john.dot"
}
Errors
404 Not Found
if address not found500 Internal Server Error
on any other error
Last updated