Records & Data Requests
Retrieve a domain's content records or domain data without initiating a new resolution request.
Introduction
A domain's content records or domain data can be retrieved without initiating a resolution request that queries the ENS smart contracts by returning the data contained within the domain's record from the API's database. The details on this database are briefly explain in Domain Resolution. Via this method, the content records and domain data returned will be based off previous resolutions, initiated either by standard resolution requests described on Resolving a Domain, the creation or update of records based on observed transactions from the contract listeners, or regular background updates to the database.
Records Request
Overview
The Records Request, a GET
request to the /domain/records
endpoint, is a request used to obtain the current value for a given domain's ipns
, ipfs
, ipnsCache
, and address
records from the database, even when they are null
. This differs from the standard domain resolution request which excludes null records and tailors the response based on the available content.
Sending the Request
Sending a request to the /domain/records
endpoint requires a valid API Key to be provided in the x-api-key
header, and that an ENS domain name be provided.
When a Domain Records Request completes successfully, the returned output will contain a success message for confirmation, along with the values for all content records fetched from the database, regardless of if they are null or have a value assigned.
Domain Data Request
Overview
The Domain Data Request, a GET
request to the /domain/data
endpoint, is a request used to obtain the domain data recorded in the database for a given domain. The domain data include the domain's name
, tld
, namehash
, owner
, along with both a wrapped and unwrapped tokenId
. Since the wrapped status of an ENS domain is not currently monitored or recorded, both the wrapped and unwrapped tokenIds are recorded, where wrapped is when the domain takes the form of an ERC-1155 token, and unwrapped is when the domain takes the form of an ERC-721 token. The domain will always correspond to one of these two tokenIds.
Sending the Request
Sending a request to the /domain/data
endpoint requires a valid API Key to be provided in the x-api-key
header, and that an ENS domain name be provided.
When a Domain Data Request completes successfully, the returned output will contain a success message for confirmation, along with the values for all domain data fetched from the database.
Last updated