Quick Start
For local testing, we highly recommend something like HTTPIE. It's much nicer to use than CURL, provides clean json body creation and automatically displays json responses in a clean format.
The examples will reference using httpie via the 'http' command.
VIEWS in GET requests
First, a quick note about the 'view' property in many of the APIs. For efficiency, many API requests have a default 'view' that returns a focused amount of data more appropriate for certain requestors. This view is what will be returned if no view parameter is explicitly set. Typically this is the 'brief' view. Some queries return a special 'thumbnail' view that is meant to to be very simple - often used for interactive 'search by name' types of queries. Thumbnail is basically 'tiny' + avatar links and is only available via some endpoints.
Example views differences for an NFD (nfdomains.algo in this example):
GET an NFD by NAME
To fetch an NFD by explicit name, make an HTTP GET call to the /nfd/{name} endpoint.
No parameters are required. Fetching a name will return the 'brief' view by default which is sufficient for most fetches a wallet would use for example.
Please don't use the 'poll' or 'nocache' query parameters, except for specific UI/UX transitions as part of a minting process. Ask in the dev channels for details.
Get examples
GET NFDs for an Algorand Account Address (reverse lookup)
To fetch NFDs that an an address points to, make an HTTP GET call to the /nfd/lookup?address=xxxxx[&address=yyyyy] endpoint.
Multiple addresses can be passed to the endpoint, with each address specified as an additional address=xxx query parameter.
If nothing is matched, a 404 (Not Found) is returned. This is a valid return status, and also helps performance due to CDN negative caching.
For more detailed information on this endpoint, please see some of the details described in Resolving an Algorand address to an NFD name / avatar
Last updated