Add DNS Zone
Автор Дмитрий Костюк, Last modified by Дмитрий Костюк на 03 February 2014 12:43 PM

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://cloud-hostpro.com/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://cloud-hostpro.com/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.

(0 голос(а))
Эта статья полезна
Эта статья бесполезна