DNS—Zone Record Management API Resources

Akamai’s Enhanced DNS product. This API manages records of Enhanced DNS Zones of type primary.

API Summary

Operation Method Endpoint
Zone Management
Get a Zone GET /config-dns/v1/zones/{zone}
Add or Modify a Zone POST /config-dns/v1/zones/{zone}

Get a Zone

Returns the complete representation of the zone, which includes all of the records for the specified zone. Additionally, a token is returned, which is required when submitting a modified version of the zone.

NOTE: This resource can return in JSON (application/json) or XML (application/xml) format. Default: JSON.

GET /config-dns/v1/zones/{zone}

Example: /config-dns/v1/zones/example.com

Parameter Type Sample Description
Required
zone String example.com Domain zone, encapsulating any nested subdomains.

Status 200 application/json

Response:

{
    "token": "a184671d5307a388180fbf7f11dbdf46",
    "zone": {
        "a": [
            {
                "active": true,
                "name": "arecord",
                "target": "1.2.3.5",
                "ttl": 3600
            },
            {
                "active": true,
                "name": "origin",
                "target": "1.2.3.9",
                "ttl": 3600
            },
            {
                "active": true,
                "name": "arecord",
                "target": "1.2.3.4",
                "ttl": 3600
            }
        ],
        "aaaa": [
            {
                "active": true,
                "name": "ipv6record",
                "target": "2001:0db8::ff00:0042:8329",
                "ttl": 3600
            }
        ],
        "afsdb": [
            {
                "active": true,
                "name": "afsdb",
                "subtype": 1,
                "target": "example.com.",
                "ttl": 7200
            }
        ],
        "cname": [
            {
                "active": true,
                "name": "redirect",
                "target": "arecord.example.com.",
                "ttl": 3600
            }
        ],
        "dnskey": [
            {
                "active": true,
                "algorithm": 3,
                "flags": 257,
                "key": "Av//0/goGKPtaa28nQvPoUwVQ ... i/0hC+1CrmQkuuKtQt98WObuv7q8iQ==",
                "name": "dnskey",
                "protocol": 7,
                "ttl": 7200
            }
        ],
        "ds": [
            {
                "active": true,
                "algorithm": 7,
                "digest": "909FF0B4DD66F91F56524C4F968D13083BE42380",
                "digest_type": 1,
                "keytag": 30336,
                "name": "ds",
                "ttl": 7200
            }
        ],
        "hinfo": [
            {
                "active": true,
                "hardware": "INTEL-386",
                "name": "hinfo",
                "software": "UNIX",
                "ttl": 7200
            }
        ],
        "id": 11874,
        "loc": [
            {
                "active": true,
                "name": "location",
                "target": "51 30 12.748 N 0 7 39.611 W 0.00m 0.00m 0.00m 0.00m",
                "ttl": 7200
            }
        ],
        "mx": [
            {
                "active": true,
                "name": "four",
                "priority": 10,
                "target": "mx1.akamai.com.",
                "ttl": 7200
            }
        ],
        "name": "example.com",
        "naptr": [
            {
                "active": true,
                "flags": "S",
                "name": "naptrrecord",
                "order": 0,
                "preference": 10,
                "regexp": "!^.*$!sip:customer-service@example.com!",
                "replacement": ".",
                "service": "SIP+D2U",
                "ttl": 3600
            }
        ],
        "ns": [
            {
                "active": true,
                "name": null,
                "target": "use4.akam.net.",
                "ttl": 3600
            },
            {
                "active": true,
                "name": null,
                "target": "use3.akam.net.",
                "ttl": 3600
            },
            {
                "active": true,
                "name": "five",
                "target": "use4.akam.net.",
                "ttl": 172800
            }
        ],
        "nsec3": [
            {
                "active": true,
                "algorithm": 1,
                "flags": 0,
                "iterations": 1,
                "name": "qdeo8lqu4l81uo67oolpo9h0nv9l13dh",
                "next_hashed_owner_name": "R2NUSMGFSEUHT195P59KOU2AI30JR96P",
                "salt": "EBD1E0942543A01B",
                "ttl": 7200,
                "type_bitmaps": "CNAME RRSIG"
            }
        ],
        "nsec3param": [
            {
                "active": true,
                "algorithm": 1,
                "flags": 0,
                "iterations": 1,
                "name": "qnsec3param",
                "salt": "EBD1E0942543A01B",
                "ttl": 7200
            }
        ],
        "ptr": [
            {
                "active": true,
                "name": "ptr",
                "target": "ptr.example.com.",
                "ttl": 7200
            }
        ],
        "rp": [
            {
                "active": true,
                "mailbox": "admin.example.com.",
                "name": "rp",
                "ttl": 7200,
                "txt": "txt.example.com."
            }
        ],
        "rrsig": [
            {
                "active": true,
                "algorithm": 7,
                "expiration": "20120318104101",
                "inception": "20120315094101",
                "keytag": 63761,
                "labels": 3,
                "name": "arecord",
                "original_ttl": 3600,
                "signature": "toCy19QnAb86vRlQjf5 ... z1doJdHEr8PiI+Is9Eafxh+4Idcw8Ysv",
                "signer": "example.com.",
                "ttl": 7200,
                "type_covered": "A"
            }
        ],
        "soa": {
            "contact": "hostmaster.akamai.com.",
            "expire": 604800,
            "minimum": 180,
            "originserver": "use4.akamai.com.",
            "refresh": 900,
            "retry": 300,
            "serial": 1271354824,
            "ttl": 900
        },
        "spf": [
            {
                "active": true,
                "name": "spf",
                "target": "v=spf a -all",
                "ttl": 7200
            }
        ],
        "srv": [
            {
                "active": true,
                "name": "srv",
                "port": 522,
                "priority": 10,
                "target": "target.akamai.com.",
                "ttl": 7200,
                "weight": 0
            }
        ],
        "sshfp": [
            {
                "active": true,
                "algorithm": 2,
                "fingerprint": "123456789ABCDEF67890123456789ABCDEF67890",
                "fingerprint_type": 1,
                "name": "host",
                "ttl": 3600
            }
        ]
        "txt": [
            {
                "active": true,
                "name": "text",
                "target": "Hello world!",
                "ttl": 7200
            }
        ]
    }
}

Add or Modify a Zone

Resource to add or modify zone configuration.

  • When modifying a zone, the token provided needs to match the current token for the zone configuration. The token is provided by the GET method for this resource.

  • When adding a new zone, set the token value to new.

  • The SOA record’s serial number needs to be greater than the existing SOA serial number in Akamai Luna Control Console.

NOTE: This resource supports JSON or XML format. Default: JSON.

POST /config-dns/v1/zones/{zone}

Example: /config-dns/v1/zones/example.com

Content-Type: application/json

Request:

{
    "token": "a184671d5307a388180fbf7f11dbdf46",
    "zone": {
        "a": [
            {
                "active": true,
                "name": "arecord",
                "target": "1.2.3.5",
                "ttl": 3600
            },
            {
                "active": true,
                "name": "origin",
                "target": "1.2.3.9",
                "ttl": 3600
            },
            {
                "active": true,
                "name": "arecord",
                "target": "1.2.3.4",
                "ttl": 3600
            }
        ],
        "aaaa": [
            {
                "active": true,
                "name": "ipv6record",
                "target": "2001:0db8::ff00:0042:8329",
                "ttl": 3600
            }
        ],
        "afsdb": [
            {
                "active": true,
                "name": "afsdb",
                "subtype": 1,
                "target": "example.com.",
                "ttl": 7200
            }
        ],
        "cname": [
            {
                "active": true,
                "name": "redirect",
                "target": "arecord.example.com.",
                "ttl": 3600
            }
        ],
        "dnskey": [
            {
                "active": true,
                "algorithm": 3,
                "flags": 257,
                "key": "Av//0/goGKPtaa28nQvPoUwVQ ... i/0hC+1CrmQkuuKtQt98WObuv7q8iQ==",
                "name": "dnskey",
                "protocol": 7,
                "ttl": 7200
            }
        ],
        "ds": [
            {
                "active": true,
                "algorithm": 7,
                "digest": "909FF0B4DD66F91F56524C4F968D13083BE42380",
                "digest_type": 1,
                "keytag": 30336,
                "name": "ds",
                "ttl": 7200
            }
        ],
        "hinfo": [
            {
                "active": true,
                "hardware": "INTEL-386",
                "name": "hinfo",
                "software": "UNIX",
                "ttl": 7200
            }
        ],
        "id": 11874,
        "loc": [
            {
                "active": true,
                "name": "location",
                "target": "51 30 12.748 N 0 7 39.611 W 0.00m 0.00m 0.00m 0.00m",
                "ttl": 7200
            }
        ],
        "mx": [
            {
                "active": true,
                "name": "four",
                "priority": 10,
                "target": "mx1.akamai.com.",
                "ttl": 7200
            }
        ],
        "name": "example.com",
        "naptr": [
            {
                "active": true,
                "flags": "S",
                "name": "naptrrecord",
                "order": 0,
                "preference": 10,
                "regexp": "!^.*$!sip:customer-service@example.com!",
                "replacement": ".",
                "service": "SIP+D2U",
                "ttl": 3600
            }
        ],
        "ns": [
            {
                "active": true,
                "name": null,
                "target": "use4.akam.net.",
                "ttl": 3600
            },
            {
                "active": true,
                "name": null,
                "target": "use3.akam.net.",
                "ttl": 3600
            },
            {
                "active": true,
                "name": "five",
                "target": "use4.akam.net.",
                "ttl": 172800
            }
        ],
        "nsec3": [
            {
                "active": true,
                "algorithm": 1,
                "flags": 0,
                "iterations": 1,
                "name": "qdeo8lqu4l81uo67oolpo9h0nv9l13dh",
                "next_hashed_owner_name": "R2NUSMGFSEUHT195P59KOU2AI30JR96P",
                "salt": "EBD1E0942543A01B",
                "ttl": 7200,
                "type_bitmaps": "CNAME RRSIG"
            }
        ],
        "nsec3param": [
            {
                "active": true,
                "algorithm": 1,
                "flags": 0,
                "iterations": 1,
                "name": "qnsec3param",
                "salt": "EBD1E0942543A01B",
                "ttl": 7200
            }
        ],
        "ptr": [
            {
                "active": true,
                "name": "ptr",
                "target": "ptr.example.com.",
                "ttl": 7200
            }
        ],
        "rp": [
            {
                "active": true,
                "mailbox": "admin.example.com.",
                "name": "rp",
                "ttl": 7200,
                "txt": "txt.example.com."
            }
        ],
        "rrsig": [
            {
                "active": true,
                "algorithm": 7,
                "expiration": "20120318104101",
                "inception": "20120315094101",
                "keytag": 63761,
                "labels": 3,
                "name": "arecord",
                "original_ttl": 3600,
                "signature": "toCy19QnAb86vRlQjf5 ... z1doJdHEr8PiI+Is9Eafxh+4Idcw8Ysv",
                "signer": "example.com.",
                "ttl": 7200,
                "type_covered": "A"
            }
        ],
        "soa": {
            "contact": "hostmaster.akamai.com.",
            "expire": 604800,
            "minimum": 180,
            "originserver": "use4.akamai.com.",
            "refresh": 900,
            "retry": 300,
            "serial": 1271354824,
            "ttl": 900
        },
        "spf": [
            {
                "active": true,
                "name": "spf",
                "target": "v=spf a -all",
                "ttl": 7200
            }
        ],
        "srv": [
            {
                "active": true,
                "name": "srv",
                "port": 522,
                "priority": 10,
                "target": "target.akamai.com.",
                "ttl": 7200,
                "weight": 0
            }
        ],
        "sshfp": [
            {
                "active": true,
                "algorithm": 2,
                "fingerprint": "123456789ABCDEF67890123456789ABCDEF67890",
                "fingerprint_type": 1,
                "name": "host",
                "ttl": 3600
            }
        ]
        "txt": [
            {
                "active": true,
                "name": "text",
                "target": "Hello world!",
                "ttl": 7200
            }
        ]
    }
}

POST /config-dns/v1/zones/{zone}

Example: /config-dns/v1/zones/example.com

Content-Type: text/dns

Request:

example.com.            900     IN      SOA     use4.akamai.com. hostmaster.akamai.com. 1271354824 900 300 604800 180
example.com.            3600    IN      NS      use4.akam.net.
example.com.            3600    IN      NS      use3.akam.net.
afsdb.example.com.      7200    IN      AFSDB   1 example.com.
arecord.example.com.    3600    IN      A       1.2.3.5
arecord.example.com.    3600    IN      A       1.2.3.4
arecord.example.com.    3600    IN      RRSIG   A 7 3 3600 20120318104101 20120315094101 63761 example.com. toCy19QnAb86vRlQjf5ARG3wQ7CbH4B4wJ5B6OO7C7/1TP0JXUuOcQ5xMs3NLuzwo2VqqRBBQ1ZlmpIhJ9ceGYYpd7IWEIdbyeZo1PqiQc25HfVObGgyks4RVdN3q4mIxHwqzuWzz1doJdHEr8PiI+Is9Eafxh+4Idcw8Ysv
dnskey.example.com.     7200    IN      DNSKEY  257 7 3 Av//0/goGKPtaa28nQvPoUwVQelORVnzzZH/obPaLxWO5cwYjEXQWzkadfO5pxdeydYTFqGQsTd8c/V0UtCLlRzz5ZGU+pMewlpjtz9n3Ea9O4cCoXdcRrTj4wFQbK+h50iI8Cbcog7H76vgfAU9vSIueBwlWFvId9ehPUlbaL6KVBr5WFvHnUwCjVsUIvRwGKVOixFsthMUf+hPSp2Fx8OHvyw9oQ/TR/QEwj3cGpnbGVvtFzLlo4FdsLoktoLNbvsDxetTzCFRG2GvChmzoQ9xwwQOWiSu5THgTHskiuZPZ2x2UAZGPER0P6A6i/0hC+1CrmQkuuKtQt98WObuv7q8iQ==
ds.example.com.         7200    IN      DS      30336 7 1 909FF0B4DD66F91F56524C4F968D13083BE42380
five.example.com.       172800  IN      NS      use4.akam.net.
four.example.com.       7200    IN      MX      10 mx1.akamai.com.
hinfo.example.com.      7200    IN      HINFO   "INTEL-386" "UNIX"
host.example.com.       3600    IN      SSHFP   2 1 123456789ABCDEF67890123456789ABCDEF67890
ipv6record.example.com. 3600    IN      AAAA    2001:db8:0:0:0:ff00:42:8329
location.example.com.   0       IN      LOC     51 30 12.748 N 0 7 39.611 W 0m 0m 0m 0m
naptrrecord.example.com.        3600    IN      NAPTR   0 10 "S" "SIP+D2U" "!^.*$!sip:customer-service@example.com!" .
origin.example.com.     3600    IN      A       1.2.3.9
ptr.example.com.        7200    IN      PTR     ptr.example.com.
qdeo8lqu4l81uo67oolpo9h0nv9l13dh.example.com.   7200    IN      NSEC3   1 0 1 EBD1E0942543A01B R2NUSMGFSEUHT195P59KOU2AI30JR96P CNAME RRSIG
qnsec3param.example.com.        7200    IN      NSEC3PARAM      1 0 1 EBD1E0942543A01B
redirect.example.com.   3600    IN      CNAME   arecord.example.com.
rp.example.com.         7200    IN      RP      admin.example.com. txt.example.com.
spf.example.com.        7200    IN      SPF     "v=spf a -all"
srv.example.com.        7200    IN      SRV     10 0 522 target.akamai.com.
text.example.com.       7200    IN      TXT     "Hello world!"

Parameter Type Sample Description
Required
zone String example.com Domain zone, encapsulating any nested subdomains.

Status 204

Headers:

  • Location: /config-dns/config-dns/v1/zones/example.com


Last modified: 12/12/2016