Versions Compared

Key

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

...

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.

 

...

update

URL/api/v1/api.php?target=dnsServer&action=update
DescriptionUpdates an existing DNS Server with new information.
Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Update Successful."}
ERROR:{"success":0, "message":"error message"}
Required Parameters
NameTypeExampleDescription
idINTEGER5ID of server
serverSTRINGdns.yourdomain.comIP or FQDN of the DNS Server
SOASTRINGns1.6connect.com. hostmaster.6connect.com.Server of Authority record for DNS server
transferTypeSTRINGSCPProtocol used for transfer of DNS zones and records. Valid settings include SCP, PowerDNS, Secure64, Secure64Signer
Optional Parameters

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

NameTypeExampleDescription
activeINTEGER0Values 0 or 1 only, sets the server to inactive on 0 value
customerNameSTRING/tmp/zonesCustomer Name
dbDatabaseNameSTRINGpdns_1DB name for pDNS servers with MySQL powerDNSBackend type
dbPasswordSTRINGsomepassDB password 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
displayNameSTRINGPrimary NSThe name displayed representing the DNS server, can be the same as server or different
DNSSECContactSTRINGjoeuserFor use with Dyn dns service
enable_viewsINTEGER1Whether or not Views are enabled. Valid values are '1' for enable or '0' for do not enable
masteridINTEGER 53Master server ID. If a server is a slave, masterid points to its master. 
namedConfPathSTRING/tmpThe path to the zone files used within the named.conf file.
passwordSTRINGpassword1Login password for Server
portINTEGER22Port for ssh or scp access to server
powerDNSBackendSTRINGBind or MySQLpDNS server backend type
postCommandSTRING/path/to/stuff/postcommandCommand to execute after zone transfer
preCommandSTRING/path/to/stuff/precommandCommand to execute before zone transfer
remoteDirectorySTRING/tmp/zonesZone Directory on Server
serverTypeSTRINGMasterValues are 'Master' or 'Slave' only
usernameSTRINGbobuserLogin name for Server
Example URL

/api.php?target=dnsServer&action=update&id=74&transferType=SCP&server=dns.yourdomain.com&SOA=ns1.6connect.com.+hostmaster.6connect.com.

transferAll

transferByServer

URL/api/v1/api.php?target=dnsServer&action=transferServertransferByServer
DescriptionPerforms a full zone push on a DNS Server, executing pre and post commands, transferring files, and restarting services.
Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Transfer Successful."}
ERROR:{"success":0, "message":"error message"}
Required Parameters
NameTypeExampleDescription
pushINTEGER1The ID of the server to push zones to
Optional ParametersNone

transferSingle

URL/api/v1/api.php?target=dnsServer&action=transferSingle
Description

Transfers a single Zone file to all its associated DNS Servers, along with updated server configurations.

Performs pre and post commands on the target servers, transfers the zone file(s), and restarts services.

Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Updated Zone: $name.zone on $server via SCP"}
ERROR:{"success":0, "message":"error message"}
Required Parameters
NameTypeExampleDescription
zoneIDzoneidINTEGER35The ID of the zone to push
Optional ParametersNone

 

DNS Zone Control

get

URL/api/v1/api.php?target=zone&action=get
Description

Accepts search criteria to retrieve a list of all matching DNS Zones and associated Records.

Search can be performed on any combination of Zone and Record attributes.

Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Search Successful.","data":[{"zoneId":"932","zoneName":"185.160.209.in-addr.arpa","zoneResourceId":"81", "zoneSerial":"2013040302","zoneRefresh":"28800","zoneRetry":"7200","zoneExpire":"604800","zoneMinimum":"86400","zoneSOA":null, "zoneTags":null,"zoneTTL":"28800","zoneAutoCheck":"1","zoneEnableDNSSEC":null,"recordId":"154110","recordZoneId":"932", "recordHost": "185.160.209.inaddr.arpa.","recordType":"NS","recordValue":"auth01.veroxity.net.","recordDescription":null,"recordTTL":"28800", "recordOrdering":"1", "recordErrors":null,"assetId":"0","userCanCreate":0,"userCanDelete":1,"userCanUpdate":1}]}
ERROR:{"success":0, "message":"error message"}


Data Detail:

NameTypeDescription
zoneIdINTEGERThe Id of the Zone entry. A single Zone entry might have multiple Records.
zoneNameSTRINGThe Zone name.
zoneResourceIdINTEGERThe resource Id associated with this Zone.
zoneSerialINTEGERZone Serial.
zoneRefreshINTEGERZone Refresh.
zoneRetryINTEGERZone Retry.
zoneExpireINTEGERZone Expire.
zoneMinimumINTEGERZone Minimum.
zoneSOASTRINGZone SOA.
zoneTagsSTRINGAll the tags associated with this Zone.
zoneTTLSTRINGZone TTL.
zoneEnableDNSSECBOOLWhether or not DNSSEC is enabled for this Zone.
zoneAutoCheckBOOLWhether or not this zone is configured to be automatically validated on load/edit.
recordIdINTEGERThe Id of this Record Entry. It is always included with its 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.
recordOrderingINTEGERThe numerical order in which the record appears in the zone.
recordErrorsSTRINGA string containing any detected problems with this record
userCanCreateBOOLWhether or not the user has DNS CREATE permissions on this zone's resource
userCanUpdateBOOLWhether or not the user has DNS UPDATE permissions on this zone's resource
userCanDeleteBOOlWhether or not the user has DNS DELETE permissions on this zone's resource
unpagedRowsINTEGERIf pagination is used, this value will contain a total count of records had the pagination not been used.
Optional Parameters
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
generalFlagBOOL1When 1, searches over the provided parameters using OR. If 0 or omitted, uses AND.
selectCountINTEGER30When supplied only returns the first X entries
selectOffsetINTEGER10When supplied, only returns entries after record X
sortArrayJSON{"zoneName":"desc","zoneMask":"asc"}A JSON-encoded object containing a list of columns to sort on and the direction in which to sort. Any API variable may be used for sorting. Valid sort directions are ASC and DESC.
NameTypeExampleDescription
zoneIdINTEGER123The Zone Id to search for.
zoneNameSTRINGfooThe Zone Name to search for.
zoneResourceIdINTEGER5The Resource Id 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.
zoneTagsSTRINGclient,productionZone Tags to search for.
zoneTTLINTEGER3600The Zone TTL to search for.
zoneEnableDNSSECINTEGER1Search based on DNSSEC settings.
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.

...