Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display
alltrue
styleh3
pageSuperb Cloud API

GET /dns_zones

get a list of your own DNS zones

 

Tip
Use GET /dns_zones/:id to get details for a specific zone

Sections:

Table of Contents
maxLevel4
minLevel2
includeResponse.*|JSON.*|XML.*|Explanation.*

Response Parameters

name – DNS zone name

created_at – the date when the DNS zone was created in the [YYYY][MM][DD]T[hh][mm][ss]Z format

updated_at – the date when the DNS zone was updated in the [YYYY][MM][DD]T[hh][mm][ss]Z format

id – DNS zone ID

user_id – the ID of a user who has created a DNS zone

JSON Request example

Code Block
languagebash
themeRDark
 curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url https://mycp.superb.net/api/dns_zones.json 

JSON Response

Code Block
 [
    {
        "dns_zone": {
            "created_at": "2015-08-14T17:39:37+00:00",
            "id": 28,
            "name": "test.superb.com",
            "updated_at": "2015-08-14T17:39:37+00:00",
            "user_id": 337,
            "cdn_reference": 782959610
        }
    }
]

XML Request example

Code Block
languagebash
themeRDark
 curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url https://mycp.superb.net/api/dns_zones.xml

XML Response example

Code Block
languagexml
 <?xml version="1.0" encoding="UTF-8"?>
<dns_zones type="array">
<dns_zone>
<name>dns_example</name>
<created_at type="datetime">2011-12-19T12:51:02Z</created_at>
<updated_at type="datetime">2011-12-19T12:51:02Z</updated_at>
<id type="integer">5</id>
<user_id type="integer">1</user_id>
</dns_zone>