Import records

Description

Import records, defined in parameter.

Note: The import for GeoDNS zones imports the records with Default location.


 Parameters

Name Data Type Status Description
auth-id or sub-auth-id Integer Required Authentication parameter
auth-password String Required Authentication parameter
domain-name String Required the name of the zone
format String Required bind or tinydns
content String Required
        list of the records in the chosen format; one per row
        @ 3600 IN TXT "3600 IN TXT "v=spf1 a mx include:_spf.google.com ~all"
        @ 3600 IN MX  ASPMX.L.GOOGLE.COM.
delete-existing-records Integer Optional

Optional parameter for bind import. Set to 1, to delete all existing records

record-types Array Optional

Optional parameter used to select the records type to import. If you use this parameter, make sure it is not left blank, as no records will be imported.


Return: Array with status and status description.


Errors

When the authenctication of API user is not correct, any API request will fail with the following status and statusDescription:

{"status":"Failed","statusDescription":"Invalid authentication, incorrect auth-id or auth-password."}

In case the credentials of API sub user are invalid, the following status and statusDescription will be returned:

{"status":"Failed","statusDescription":"Invalid authentication, incorrect sub-auth-id, sub-auth-user or auth-password."}

When invalid or non-existant domain-name is entered, the following status will be returned:

{"status":"Failed","statusDescription":"Missing domain-name"}

Note: These are example errors in JSON format.


Example:

URL JSON: https://api.cloudns.net/dns/records-import.json
POST/GET: auth-id=0&auth-password=password&domain-name=domain.com&format=bind&content=records&delete-existing-records=1
POST/GET: sub-auth-id=0&auth-password=password&domain-name=domain.com&format=bind&content=records&delete-existing-records=1&record-types[]=A

URL JSON: https://api.cloudns.net/dns/records-import.json
POST/GET: auth-id=0&auth-password=password&domain-name=domain.com&format=bind&content=records&delete-existing-records=1
POST/GET: sub-auth-id=0&auth-password=password&domain-name=domain.com&format=bind&content=records&delete-existing-records=1&record-types[]=A

URL XML: https://api.cloudns.net/dns/records-import.xml
POST/GET: auth-id=0&auth-password=password&domain-name=domain.com&format=bind&content=records&delete-existing-records=1
POST/GET: sub-auth-id=0&auth-password=password&domain-name=domain.com&format=bind&content=records&delete-existing-records=1&record-types[]=A

URL XML: https://api.cloudns.net/dns/records-import.xml
POST/GET: auth-id=0&auth-password=password&domain-name=domain.com&format=bind&content=records&delete-existing-records=1
POST/GET: sub-auth-id=0&auth-password=password&domain-name=domain.com&format=bind&content=records&delete-existing-records=1&record-types[]=A

 


Last modified: 2020-03-27
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more