Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 7.3.0

...

HTML
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>



DNS Server Control

Warning
ProVision's APIv1 system has been replaced by APIv2, and is now considered deprecated. 

Table of Contents

DNS Server Control


get

URL/api/v1/api.php?target=dnsServer&action=get
DescriptionIf provided with an id, fetches that DNS Server from the database. If not, fetches a list of all stored DNS Servers
Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Fetch Sucessful.","data":[{"id":"10","server":"mrbomasm-dns-4.onnet.net", "username":"user", "password":"vwvddp","port":"2600","customer_name":null,"transfer_type": "SCP","remote_directory":"zones", "named_conf_path":"\/etc\/zones","active":"1","post_command":null,"pre_command":null,"dyn_DNSSEC_contact":null, "powerdns_backend":"Bind","db_username":null,"db_password":"(","db_port":null,"db_name":null, "server_type":"slave","SOA":null,"master_id":null,"options": "{\"customer_name\":\"\",\"server_type\":\"slave\" ,\"SOA\":\"\",\"remote_directory\":\"zones\", \"named_conf_path\":\"\\\/etc\\\/zones\", \"dyn_DNSSEC_contact\" :\"\",\"post_command\":\"\" ,\"pre_command\":\"\",\"powerdns_backend\":\"Bind\", \"db_username\":\"\",\"db_password\":\"(\",\"db_port\":\"\",\"db_name\":\"\",\"enable_views\":\"1\"}", "testID":"963","zoneCount":"8","views":"[{\"id\":\"1\", \"server_id\":\"10\",\"name\":\"_6connectDefault\",\"extras\":\"[]\",\"description\":\"\",\"timestamp\":\"1371789181\"},{\"id\":\"3\",\"server_id\":\"10\",\"name\":\"internal\",\"extras\":\"[]\",\"description\":null,\"timestamp\":\"1374686650\"}]"}]}

ERROR:{"success":0, "message":"error message"}


Data Detail:

NameTypeDescription
idINTEGERServer ID
serverSTRINGServer Name
usernameSTRINGLogin Name
passwordCRYPTLogin Password
portINTEGERPort the Server listens on
zoneCountINTEGERThe number of zones attached to this server.
optionsJSON

The options entry is a JSON-encoded string containing a variety of server-specific configuration options.

This string will vary widely by server type and configuration. The following are a selection of common settings.

transfer_typeSTRINGProtocol used for transfer of DNS zones and records. Valid settings include SCP, PowerDNS, Secure64, Secure64Signer
server_typeSTRINGWhether this server is a master or a slave server
SOASTRINGThe SOA entry to be used for zones on this server
remote_directorySTRINGThe directory where SCP will place the zone files.
named_conf_pathSTRINGThe path to the zone files used within the named.conf file.
pre_commandSTRINGThe command executed on the server before the zones are transferred
post_commandSTRINGThe command executed on the server after the transfer is complete
enable_viewsINTEGERWhether or not Views are enabled
viewsJSON

The views entry is a JSON-encoded string containing all the information about the Views attached to this server, if any exist.

idINTEGERThe View ID
server_idINTEGERThe ID of the server the View is attached to
nameSTRINGThe name of the View
descriptionSTRINGA description of the View
timestampINTEGERThe UNIX timestamp of when the view was created.
extrasJSONA JSON-encoded array of the extra attributes printed out in the view definition in the config file.


Required ParametersNone
Optional Parameters


NameTypeExampleDescription
idINTEGER15The server id to fetch.


Example URL/api/v1/api.php?target=dnsServer&action=get&id=15

...

add

URL/api/v1/api.php?target=dnsServer&action=add
DescriptionAdds a new DNS Server
Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Add Successful."}
ERROR:{"success":0, "message":"error message"}


Required Parameters


NameTypeExampleDescription
serverSTRINGdns.yourdomain.comIP or FQDN of the DNS Server
passwordSTRINGpassword1Login password for Server
transferTypeSTRINGSCPProtocol used for transfer of DNS zones and records. Valid settings include SCP, PowerDNS, Secure64, Secure64Signer
serverTypeSTRINGMasterValues are 'Master' or 'Slave' only
displayNameSTRINGPrimary NSThe name displayed representing the DNS server, can be the same as server or different
SOASTRINGns1.6connect.com. hostmaster.6connect.com.Server of Authority record for DNS server


Optional Parameters

These optional parameters vary according to what type of server is being configured.

NameTypeExampleDescription
customerNameSTRING/tmp/zonesCustomer Name
remoteDirectorySTRING/tmp/zonesZone Directory on Server
portINTEGER22Port for ssh or scp access to server
namedConfPathSTRING/tmpThe path to the zone files used within the named.conf file.
preCommandSTRING/path/to/stuff/precommandCommand to execute before zone transfer
postCommandSTRING/path/to/stuff/postcommandCommand to execute after zone transfer
DNSSECContactSTRINGjoeuserFor use with Dyn dns service
usernameSTRINGbobuserLogin name for Server
activeINTEGER0Values 0 or 1 only, sets the server to inactive on 0 value
masterIdINTEGER53Master server ID. If a server is a slave, masterId points to its master.
powerDNSBackendSTRINGBind or MySQLpDNS server backend type
dbDatabaseNameSTRINGpdns_1DB name for pDNS servers with MySQL powerDNSBackend type
dbPortINTEGER3306Port for for pDNS servers with MySQL powerDNSBackend type
dbUsernameSTRINGsomeuserDB username for pDNS servers with MySQL powerDNSBackend type
dbPasswordSTRINGsomepassDB password for pDNS servers with MySQL powerDNSBackend type


Example URL

/api/v1/api.php?target=dnsServer&action=add&server=dns.yourdomain.com&transferType=Secure64&displayName=PrimaryNS&serverType=master&password=password1&SOA=ns1.6connect.com.+hostmaster.6connect.com. 



delete

URL/api/v1/api.php?target=dnsServer&action=delete
DescriptionDeletes a DNS Server
Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Delete Successful."}
ERROR:{"success":0, "message":"error message"}


Required Parameters


NameTypeExampleDescription
idINTEGER5ID of server to delete


Optional ParametersNone
Example URL/api/v1/api.php?target=dnsServer&action=delete&id=5

...

get

URL/api/v1/api.php?target=record&action=get
DescriptionAccepts search criteria to retrieve a list of all matching DNS Records. Search can be performed on any combination of Zone and Record attributes.
Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Search Successful.","data":[{"recordId":"30894","recordZoneId":"229","recordHost":"@","recordType":"NS","recordValue":"ns1.domain.com.","recordDescription":"","recordTTL":""}]}
ERROR:{"success":0, "message":"error message"}


Data Detail:

NameTypeDescription
recordIdINTEGERThe ID of this Record Entry. It is always included with its parent Zone.
recordZoneIdINTEGERThe ID of this Record's parent Zone.
recordHostSTRINGThe Hostname of this Record.
recordTypeSTRINGThe Record Type (MX,NS,A,PTR,etc)
recordValueSTRINGThe Value of this Record.
recordDescriptionSTRINGA short description of this Record.
recordTTLSTRINGThe TTL of this Record.


Required ParametersNone
Optional Parameters


NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
selectCountINTEGER30When supplied only returns the first X entries
selectOffsetINTEGER10When supplied, only returns entries after record X


NameTypeExampleDescription
recordIdINTEGER123The Record ID to search for.
recordZoneIdINTEGER123The parent Zone to search for.
recordHostSTRING@The Record Host to search for.
recordTypeSTRINGNSThe Record Type to search for.
recordValueSTRINGns1.dns.6connect.com.The Record Value to search for.
recordDescriptionSTRINGDescriptionSearch based on Record Description.
recordTTLSTRING3600The Record TTL to search for.

 

 



NameTypeExampleDescription
zoneIdINTEGER123The Zone Id to search for.
zoneNameSTRINGfooThe Zone Name to search for.
zoneResourceIdINTEGER5The Resource Id to search for.
zoneCustNameSTRINGfooThe Customer Name to search for.
zoneIpverSTRINGIPv6The IP Version to search for.
zoneSerialINTEGER2012033001The Zone Serial to search for.
zoneRefreshINTEGER36000The Zone Refresh to search for.
zoneRetryINTEGER800The Zone Retry to search for.
zoneExpireINTEGER6090000The Zone Expire to search for.
zoneMinimumINTEGER10The Zone Minimum to search for.
zoneSOASTRING200The Zone SOA to search for.
zoneTTLINTEGER3600The Zone TTL to search for.
zoneEnableDNSSECINTEGER1Search based on DNSSEC settings.


Example URL/api/v1/api.php?target=record&action=get&selectCount=30&zoneId=123

...

orderDown

URL/api/v1/api.php?target=nameServer&action=orderDown
DescriptionSwaps the index order of the targeted NameServer with that of the one below it.
Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Reordering Successful."}
ERROR:{"success":0, "message":"error message"}


Required Parameters


NameTypeExampleDescription
idINTEGER5ID of server to activate.


Optional ParametersNone
Example URL/api/v1/api.php?target=nameServer&action=orderDown&id=5

 

...