Page tree

Versions Compared

Key

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

Children Display
alltrue
styleh3
pageSuperb Cloud API

POST /dns_zone 

Create a new DNS zone

Sections:

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

Request Parameters

name* – name of a DNS zone you create

auto_populate – autopopulate option lets you automatically import your existing DNS settings. To autopopulate your DNS settings, set the autopopulate value 1, otherwise set 0.

Response Parameters

Info
On success echos the created dns

JSON Request example

Code Block
languagebash
themeRDark
 curl -i -X POST https://mycp.superb.net/api/dns_zones.json -d '{"dns_zone":{"name":"domain.com", "auto_populate":"1"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

JSON Response

Code Block
{
    "dns_zone": {
        "created_at": "2015-08-21T00:40:39+00:00",
        "id": 29,
        "name": "domain.com",
        "updated_at": "2015-08-21T00:40:39+00:00",
        "user_id": 321,
        "cdn_reference": 334088150
    }
}

XML Request example

Code Block
languagebash
themeRDark
 curl -i -X POST https://mycp.superb.net/api/dns_zones.xml -d '<dns_zone><name>domain.com</name><auto_populate>1</auto_populate></dns_zone>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml'