DNS Records

A DNSRecord is a custom DNS configuration record for a Site.

They represent the records you will need to configure in your DNS hosting provider to allow custom domains to work with Files.com.

Show Site DNS Configuration

SDK Method

\Files\Model\DnsRecord::list;

Return Object

DnsRecord[]

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

try {
  $dns_records = \Files\Model\DnsRecord::list();
  foreach ($dns_records as $dns_record) {
    // Operate on $dns_record
  }
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

The DnsRecord Object

Some of the methods above return a DnsRecord object. The attributes of this object are listed below.

AttributeDescription
id
string
Unique label for DNS record; used by Zapier and other integrations.
domain
string
DNS record domain name
rrtype
string
DNS record type
value
string
DNS record value