Page tree
Skip to end of metadata
Go to start of metadata

Use the following methods to create a new DNS zone:

POST /dns_zones.xml
POST /dns_zones.json

XML Request example

curl -i -X POST http://onapp.test/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' 

JSON Request example

curl -i -X POST http://onapp.test/dns_zones.json -d '{"dns_zone":{"name":"domain.com", "auto_populate":"1"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

Where:

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.

You will get a 200 status response on success, and 404 if there is no DNS zone with a requested ID or you entered incorrect URL.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels