Get a domain's DNS records

This request is used for getting all DNS records that were established for the domain.

  1. Request syntax
  2. Request example
  3. Response structure

Request syntax

The request should be sent over the HTTPS protocol using the GET method.

GET /api2/admin/dns/list?
domain=<domain name> 

Host: pddimp.yandex.ru
PddToken: <PDD token>

Headers:

NameDescription
PddToken

PDD token.

Parameters:

ParameterTypeValue
domainString

Name of the domain.

Request example

GET /api2/admin/dns/list?domain=domain.com HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
cURL
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' 'https://pddimp.yandex.ru/api2/admin/dns/list?domain=domain.com'

Response structure

{
  "domain": "{domain name}",
  "records": 
  [ 
    {
      "record_id": "{record ID}",
      "type": "{record type}",     
      "domain": "{domain name}",
      "fqdn": "{absolute domain name}",    
      "ttl": "{record lifetime}",     
      "subdomain": "{subdomain name}",     
      "content": "{record contents}",
      "priority": "{record priority}"    
    }, 
    ...
  ], 
  "success": "{status of request execution}"
}
NameType of valueDescription
domainString

Name of the domain.

recordsArray

Properties of DNS records. Each object in the array corresponds to a single DNS record.

successString

Status of request execution.

Possible values:
  • ok — Request executed successfully.
  • error — Request executed with error.
errorString

Error code.

Included in the response if the request resulted in an error.

Possible values:
  • unknown — A temporary failure or API error occurred (repeat the request again later).
  • no_token (no_domain, no_ip ) — A mandatory parameter was omitted.
  • bad_domain — The domain name was not specified or does not conform to the RFC.
  • prohibited — A forbidden domain name.
  • bad_token (bad_login, bad_passwd) — An invalid PDD token (or username/password) was passed.
  • no_auth — The PddToken header was omitted.
  • not_allowed — This operation is not allowed for this user (the user is not the domain administrator).
  • blocked — Blocked domain (for example, due to spam and so on).
  • occupied — The domain name is in use by another user.
  • domain_limit_reached — Exceeded the acceptable number of connected domains (50).
  • no_reply — Yandex.Mail for Domain cannot connect to the server source for the import.
Keys for objects in the records array
record_idInteger

ID of the DNS record.

typeString

Type of DNS record.

Possible values:
  • SRV
  • TXT
  • NS
  • MX
  • SOA
  • A
  • AAAA
  • CNAME
domainString

Name of the domain.

fqdnString

Absolute domain name ().

ttlInteger

Lifetime of the DNS record, in seconds.

subdomainString

Subdomain name. For example, “my.domain.com” is the name of a subdomain of the “domain.com” domain. You can use “my” in place of “my.domain.com”.

contentString

Contents of the DNS record.

priorityInteger

Priority of the DNS record. Exists for MX and SRV records. For all other DNS records, an empty string is returned.