API Reference

Domain Name System (DNS)

📘

The API Docs have moved to a new website

Go to api.safedev.org to find the latest version of the API Docs.

The DNS API can be used to manage public names and services on the SAFE Network.

DNS can be used to share public data and make it easily accessible.

This can be compared to the general web hosting on the clearnet where the user has to register a domain (e.g. safenetwork.org) and then map a subdomain (e.g. www) to his hosting provider. Similarly, the SAFE Network user has to create a long name (e.g. safenetwork) and then map a service (e.g. www) to a directory.

Any user can access public data using the service and the long name (e.g. www.example). Web browsers will display the content of the directory (e.g. index.html) associated with the service.

DNS API Conventions

FieldDescription
longNameA human readable name that can be used for sharing public content (e.g. safenetwork).
serviceNameA service (e.g. www) that can be mapped to a long name (e.g. safenetwork).
rootPathAn enum representation of the root directory.

Accepted value - app or drive

app specifies the application’s root directory, while drive corresponds to SAFE Drive.
serviceHomeDirPathThe full path of the directory associated with the service.