Auto Light Dark
Auto Light Dark

API Module - DNS

APIv1 - DNS  Module

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

DNS Server Control

get

URL

/api/v1/api.php?target=dnsServer&action=get

Description

If 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\":\"_exampleDefault\",\"extras\":\"[]\",\"description\":\"\",\"timestamp\":\"1371789181\"},{\"id\":\"3\",\"server_id\":\"10\",\"name\":\"internal\",\"extras\":\"[]\",\"description\":null,\"timestamp\":\"1374686650\"}]"}]}

ERROR:

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


Data Detail:

Name

Type

Description

id

INTEGER

Server ID

server

STRING

Server Name

username

STRING

Login Name

password

CRYPT

Login Password

port

INTEGER

Port the Server listens on

zoneCount

INTEGER

The number of zones attached to this server.

options

JSON

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_type

STRING

Protocol used for transfer of DNS zones and records. Valid settings include SCP, PowerDNS, Secure64, Secure64Signer

server_type

STRING

Whether this server is a master or a slave server

SOA

STRING

The SOA entry to be used for zones on this server

remote_directory

STRING

The directory where SCP will place the zone files.

named_conf_path

STRING

The path to the zone files used within the named.conf file.

pre_command

STRING

The command executed on the server before the zones are transferred

post_command

STRING

The command executed on the server after the transfer is complete

enable_views

INTEGER

Whether or not Views are enabled

views

JSON

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

id

INTEGER

The View ID

server_id

INTEGER

The ID of the server the View is attached to

name

STRING

The name of the View

description

STRING

A description of the View

timestamp

INTEGER

The UNIX timestamp of when the view was created.

extras

JSON

A JSON-encoded array of the extra attributes printed out in the view definition in the config file.

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

id

INTEGER

15

The 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

Description

Adds a new DNS Server

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Add Successful."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

server

STRING

dns.yourdomain.com

IP or FQDN of the DNS Server

password

STRING

password1

Login password for Server

transferType

STRING

SCP

Protocol used for transfer of DNS zones and records. Valid settings include SCP, PowerDNS, Secure64, Secure64Signer

serverType

STRING

Master

Values are 'Master' or 'Slave' only

displayName

STRING

Primary NS

The name displayed representing the DNS server, can be the same as server or different

SOA

STRING

ns1.example.com. hostmaster.example.com.

Server of Authority record for DNS server

Optional Parameters

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

Name

Type

Example

Description

customerName

STRING

/tmp/zones

Customer Name

remoteDirectory

STRING

/tmp/zones

Zone Directory on Server

port

INTEGER

22

Port for ssh or scp access to server

namedConfPath

STRING

/tmp

The path to the zone files used within the named.conf file.

preCommand

STRING

/path/to/stuff/precommand

Command to execute before zone transfer

postCommand

STRING

/path/to/stuff/postcommand

Command to execute after zone transfer

DNSSECContact

STRING

joeuser

For use with Dyn dns service

username

STRING

bobuser

Login name for Server

active

INTEGER

0

Values 0 or 1 only, sets the server to inactive on 0 value

masterId

INTEGER

53

Master server ID. If a server is a slave, masterId points to its master.

powerDNSBackend

STRING

Bind or MySQL

pDNS server backend type

dbDatabaseName

STRING

pdns_1

DB name for pDNS servers with MySQL powerDNSBackend type

dbPort

INTEGER

3306

Port for for pDNS servers with MySQL powerDNSBackend type

dbUsername

STRING

someuser

DB username for pDNS servers with MySQL powerDNSBackend type

dbPassword

STRING

somepass

DB 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.example.com.+hostmaster.example.com.


delete

URL

/api/v1/api.php?target=dnsServer&action=delete

Description

Deletes a DNS Server

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Delete Successful."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

id

INTEGER

5

ID of server to delete

Optional Parameters

None

Example URL

/api/v1/api.php?target=dnsServer&action=delete&id=5

update

URL

/api/v1/api.php?target=dnsServer&action=update

Description

Updates an existing DNS Server with new information.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Update Successful."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

id

INTEGER

5

ID of server

server

STRING

dns.yourdomain.com

IP or FQDN of the DNS Server

SOA

STRING

ns1.example.com. hostmaster.example.com.

Server of Authority record for DNS server

transferType

STRING

SCP

Protocol 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.

Name

Type

Example

Description

active

INTEGER

0

Values 0 or 1 only, sets the server to inactive on 0 value

customerName

STRING

/tmp/zones

Customer Name

dbDatabaseName

STRING

pdns_1

DB name for pDNS servers with MySQL powerDNSBackend type

dbPassword

STRING

somepass

DB password for pDNS servers with MySQL powerDNSBackend type

dbPort

INTEGER

3306

Port for for pDNS servers with MySQL powerDNSBackend type

dbUsername

STRING

someuser

DB username for pDNS servers with MySQL powerDNSBackend type

displayName

STRING

Primary NS

The name displayed representing the DNS server, can be the same as server or different

DNSSECContact

STRING

joeuser

For use with Dyn dns service

enable_views

INTEGER

1

Whether or not Views are enabled. Valid values are '1' for enable or '0' for do not enable

masterId

INTEGER

53

Master server ID. If a server is a slave, masterId points to its master.

namedConfPath

STRING

/tmp

The path to the zone files used within the named.conf file.

password

STRING

password1

Login password for Server

port

INTEGER

22

Port for ssh or scp access to server

powerDNSBackend

STRING

Bind or MySQL

pDNS server backend type

postCommand

STRING

/path/to/stuff/postcommand

Command to execute after zone transfer

preCommand

STRING

/path/to/stuff/precommand

Command to execute before zone transfer

remoteDirectory

STRING

/tmp/zones

Zone Directory on Server

serverType

STRING

Master

Values are 'Master' or 'Slave' only

username

STRING

bobuser

Login name for Server

Example URL

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

transferServer

URL

/api/v1/api.php?target=dnsServer&action=transferServer

Description

Performs 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

Name

Type

Example

Description

push

INTEGER

1

The ID of the server to push zones to

Optional Parameters

None

Example URL

/api/v1/api.php?target=dnsServer&action=transferServer&push=1

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

Name

Type

Example

Description

zoneId

INTEGER

35

The ID of the zone to push

Optional Parameters

None

Example URL

/api/v1/api.php?target=dnsServer&action=transferSingle&zoneId=35

 

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, "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:

Name

Type

Description

zoneId

INTEGER

The Id of the Zone entry. A single Zone entry might have multiple Records.

zoneName

STRING

The Zone name.

zoneResourceId

INTEGER

The resource Id associated with this Zone.

zoneSerial

INTEGER

Zone Serial.

zoneRefresh

INTEGER

Zone Refresh.

zoneRetry

INTEGER

Zone Retry.

zoneExpire

INTEGER

Zone Expire.

zoneMinimum

INTEGER

Zone Minimum.

zoneSOA

STRING

Zone SOA.

zoneTTL

STRING

Zone TTL.

zoneEnableDNSSEC

BOOL

Whether or not DNSSEC is enabled for this Zone.

zoneAutoCheck

BOOL

Whether or not this zone is configured to be automatically validated on load/edit.

recordId

INTEGER

The Id of this Record Entry. It is always included with its parent Zone.

recordHost

STRING

The Hostname of this Record.

recordType

STRING

The Record Type (MX,NS,A,PTR,etc)

recordValue

STRING

The Value of this Record.

recordDescription

STRING

A short description of this Record.

recordTTL

STRING

The TTL of this Record.

recordOrdering

INTEGER

The numerical order in which the record appears in the zone.

recordErrors

STRING

A string containing any detected problems with this record

userCanCreate

BOOL

Whether or not the user has DNS CREATE permissions on this zone's resource

userCanUpdate

BOOL

Whether or not the user has DNS UPDATE permissions on this zone's resource

userCanDelete

BOOl

Whether or not the user has DNS DELETE permissions on this zone's resource

unpagedRows

INTEGER

If pagination is used, this value will contain a total count of records had the pagination not been used.

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

likeFlag

BOOL

1

When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.

generalFlag

BOOL

1

When 1, searches over the provided parameters using OR. If 0 or omitted, uses AND.

selectCount

INTEGER

30

When supplied only returns the first X entries

Name

Type

Example

Description

zoneId

INTEGER

123

The Zone Id to search for.

zoneName

STRING

foo

The Zone Name to search for.

zoneResourceId

INTEGER

5

The Resource Id to search for.

zoneSerial

INTEGER

2012033001

The Zone Serial to search for.

zoneRefresh

INTEGER

36000

The Zone Refresh to search for.

zoneRetry

INTEGER

800

The Zone Retry to search for.

zoneExpire

INTEGER

6090000

The Zone Expire to search for.

zoneMinimum

INTEGER

10

The Zone Minimum to search for.

zoneSOA

STRING

200

The Zone SOA to search for.

zoneTTL

INTEGER

3600

The Zone TTL to search for.

zoneEnableDNSSEC

INTEGER

1

Search based on DNSSEC settings.

recordId

INTEGER

123

The Record Id to search for.

recordZoneId

INTEGER

123

The parent Zone to search for.

recordHost

STRING

@

The Record Host to search for.

recordType

STRING

NS

The Record Type to search for.

recordValue

STRING

ns1.dns.example.com.

The Record Value to search for.

recordDescription

STRING

Description

Search based on Record Description.

recordTTL

STRING

3600

The Record TTL to search for.

Example URL

/api/v1/api.php?target=zone&action=get&zoneId=123

URL

/api/v1/api.php?target=zone&action=search

Description

Accepts search criteria to retrieve a list of all matching DNS Zones but NO associated Records. Search can be performed on any combination of Zone and Record attributes.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Search Successful.","data":[{"zoneId":"123","zoneName":"foobs.net","zoneResourceId":"483","zoneIpver":null,"zoneMask":null,"zoneSerial":"2012121803","zoneRefresh":null,"zoneRetry":null,"zoneExpire":null,"zoneMinimum":null,"zoneSOA":null,"zoneTTL":"3600","zoneEnableDNSSEC":"1","zoneLocalSigning":"1","assetId":"0","recordCount":"1","unpagedRows":"215"}]}

ERROR:

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


Data Detail:

Name

Type

Description

zoneId

INTEGER

The Id of the Zone entry. A single Zone entry might have multiple Records.

zoneName

STRING

The Zone name.

zoneResourceId

INTEGER

The resource Id associated with this Zone.

zoneSerial

INTEGER

Zone Serial.

zoneRefresh

INTEGER

Zone Refresh.

zoneRetry

INTEGER

Zone Retry.

zoneExpire

INTEGER

Zone Expire.

zoneMinimum

INTEGER

Zone Minimum.

zoneSOA

STRING

Zone SOA.

zoneTTL

STRING

Zone TTL.

zoneEnableDNSSEC

BOOL

Whether or not DNSSEC is enabled for this Zone.

zoneAutoCheck

BOOL

Whether or not this zone is configured to be automatically validated on load/edit.

recordCount

INTEGER

How many records are associated with this zone.

userCanCreate

BOOL

Whether or not the user has DNS CREATE permissions on this zone's resource

userCanUpdate

BOOL

Whether or not the user has DNS UPDATE permissions on this zone's resource

userCanDelete

BOOl

Whether or not the user has DNS DELETE permissions on this zone's resource

unpagedRows

INTEGER

If pagination is used, this value will contain a total count of records had the pagination not been used.

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

likeFlag

BOOL

1

When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.

generalFlag

BOOL

1

When 1, searches over the provided paramenters using OR. If 0 or omitted, uses AND.

selectCount

INTEGER

30

When supplied only returns the first X entries

selectOffset

INTEGER

10

When supplied, only returns entries after record X

sortArray

JSON

{"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.

Name

Type

Example

Description

zoneId

INTEGER

123

The Zone Id to search for.

zoneName

STRING

foo

The Zone Name to search for.

zoneResourceId

INTEGER

5

The Resource Id to search for.

zoneSerial

INTEGER

2012033001

The Zone Serial to search for.

zoneRefresh

INTEGER

36000

The Zone Refresh to search for.

zoneRetry

INTEGER

800

The Zone Retry to search for.

zoneExpire

INTEGER

6090000

The Zone Expire to search for.

zoneMinimum

INTEGER

10

The Zone Minimum to search for.

zoneSOA

STRING

200

The Zone SOA to search for.

zoneTTL

INTEGER

3600

The Zone TTL to search for.

zoneEnableDNSSEC

INTEGER

1

Search based on DNSSEC settings.

recordId

INTEGER

123

The Record Id to search for.

recordZoneId

INTEGER

123

The parent Zone to search for.

recordHost

STRING

@

The Record Host to search for.

recordType

STRING

NS

The Record Type to search for.

recordValue

STRING

ns1.dns.example.com.

The Record Value to search for.

recordDescription

STRING

Description

Search based on Record Description.

recordTTL

STRING

3600

The Record TTL to search for.

Example URL

/api/v1/api.php?target=zone&action=search&zoneId=123

update

URL

/api/v1/api.php?target=zone&action=update

Description

First performs a search based on the submitted Zone and Record criteria, then performs an Update across those entries based on new values.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Update Successful."}

ERROR:

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

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

likeFlag

BOOL

1

When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.

generalFlag

BOOL

1

When 1, searches over the provided parameters using OR. If 0 or omitted, uses AND.

Name

Type

Example

Description

searchZoneId

INTEGER

123

The Zone Id to search for.

searchZoneName

STRING

foo

The Zone Name to search for.

searchZoneResourceId

INTEGER

5

The Resource Id to search for.

searchZoneSerial

INTEGER

2012033001

The Zone Serial to search for.

searchZoneRefresh

INTEGER

36000

The Zone Refresh to search for.

searchZoneRetry

INTEGER

800

The Zone Retry to search for.

searchZoneExpire

INTEGER

6090000

The Zone Expire to search for.

searchZoneMinimum

INTEGER

10

The Zone Minimum to search for.

searchZoneSOA

STRING

200

The Zone SOA to search for.

searchZoneTTL

INTEGER

3600

The Zone TTL to search for.

searchZoneEnableDNSSEC

INTEGER

1

Search based on DNSSEC settings.

searchRecordId

INTEGER

123

The Record Id to search for.

searchRecordHost

STRING

@

The Record Host to search for.

searchRecordType

STRING

NS

The Record Type to search for.

searchRecordValue

STRING

ns1.dns.example.com.

The Record Value to search for.

searchRecordDescription

STRING

Description

Search based on Record Description.

searchRecordTTL

STRING

3600

The Record TTL to search for.

Name

Type

Example

Description

updateZoneName

STRING

foo

The Zone name to replace into the searched rows.

updateZoneSerial

INTEGER

2012033001

The Zone Serial to replace into the searched rows.

updateZoneRefresh

INTEGER

36000

The Zone Refresh to replace into the searched rows.

updateZoneRetry

INTEGER

800

The Zone Retry to replace into the searched rows..

updateZoneExpire

INTEGER

6090000

The Zone Expire to replace into the searched rows.

updateZoneMinimum

INTEGER

10

The Zone Minimum to replace into the searched rows.

updateZoneSOA

STRING

200

The Zone SOA to replace into the searched rows.

updateZoneTTL

INTEGER

3600

The Zone TTL to replace into the searched rows.

updateZoneEnableDNSSEC

INTEGER

1

Update DNSSEC Settings.

updateRecordHost

STRING

@

The Record Host to replace into the searched rows.

updateRecordType

STRING

NS

The Record Type to replace into the searched rows.

updateRecordValue

STRING

ns1.dns.example.com.

The Record Value to replace into the searched rows.

updateRecordDescription

STRING

Description

Update Record Descriptions.

updateRecordTTL

STRING

3600

The Record TTL to replace into the searched rows.

updateZoneAutoCheck

BOOL

1

Whether or not this zone is configured to be automatically validated on load/edit.

Name

Type

Example

Description

recordZoneId

INTEGER

123

The parent zone ID

Example URL

/api/v1/api.php?target=zone&action=update&searchZoneId=123&updateZoneExpire=6090000

add

URL

/api/v1/api.php?target=zone&action=add

Description

Adds a new DNS Zone.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Add Successful.","data":123}

ERROR:

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


Data Detail:

Name

Type

Description

data

INTEGER

The Id of the new Zone entry.

Required Parameters

Name

Type

Example

Description

zoneName

STRING

254.221.67.in-addr.arpa

The name for the new Zone.

Optional Parameters

Name

Type

Example

Description

likeFlag

BOOL

1

When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.

zoneIpver

STRING

IPv6

The IP Version.

zoneLocalSigning

BOOL

1

Whether or not this zone should be signed by the ProVision server when DNSSEC is enabled. If set to false, ProVision will deliver the zone unsigned to the DNS server and the signing / updating process should be triggered by the post-push command

zoneSerial

INTEGER

2012033001

Serial for the new Zone.

zoneRefresh

INTEGER

36000

Refresh for the new Zone.

zoneRetry

INTEGER

800

Retry for the new Zone.

zoneExpire

INTEGER

6090000

Expire for the new Zone.

zoneMinimum

INTEGER

10

Minimum for the new Zone.

zoneSOA

STRING

200

SOA for the new Zone.

zoneTTL

STRING

3600

TTL for the new Zone.

zoneEnableDNSSEC

INTEGER

1

Whether or not this new zone uses DNSSEC.

Example URL

/api/v1/api.php?target=zone&action=add&zoneName=254.221.67.in-addr.arpa&zoneSerial=2012033001

delete

URL

/api/v1/api.php?target=zone&action=delete

Description

Performs a search over the Zones and Records dataset and deletes all found Zones, plus all associated Records of those Zones.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Zones and Associated Records Deleted."}

ERROR:

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

Required Parameters

No specific parameter is required, however, one or more optional parameters must be used for a successful return

Optional Parameters

Name

Type

Example

Description

deleteZoneId

INTEGER

123

The Zone Id to search for.

deleteZoneName

STRING

foo

The Zone Name to search for.

deleteZoneResourceId

INTEGER

5

The Resource Id to search for.

deleteZoneSerial

INTEGER

2012033001

The Zone Serial to search for.

deleteZoneRefresh

INTEGER

36000

The Zone Refresh to search for.

deleteZoneRetry

INTEGER

800

The Zone Retry to search for.

deleteZoneExpire

INTEGER

6090000

The Zone Expire to search for.

deleteZoneMinimum

INTEGER

10

The Zone Minimum to search for.

deleteZoneSOA

STRING

200

The Zone SOA to search for.

deleteZoneTTL

INTEGER

3600

The Zone TTL to search for.

deleteZoneEnableDNSSEC

INTEGER

1

Search based on DNSSEC settings.

deleteRecordId

INTEGER

123

The Record Id to search for.

deleteRecordHost

STRING

@

The Record Host to search for.

deleteRecordType

STRING

NS

The Record Type to search for.

deleteRecordValue

STRING

ns1.dns.example.com.

The Record Value to search for.

deleteRecordDescription

STRING

Description

Search based on Record Description.

deleteRecordTTL

STRING

3600

The Record TTL to search for.

deleteRecordZoneId

INTEGER

123

The parent zone ID

Example URL

/api/v1/api.php?target=zone&action=delete&deleteZoneId=123

getRecordTypes

URL

/api/v1/api.php?target=zone&action=getRecordTypes

Description

Returns a list of all Record Types allowed by the system.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Search Successful.","data":[{"recordType":"A"},{"recordType":"AAAA"},{"recordType":"MX"},{"recordType":"CNAME"},{"recordType":"PTRG"},{"recordType":"NS"},{"recordType":"TXT"},{"recordType":"DNSKEY"},{"recordType":"SRV"},{"recordType":"DS"},{"recordType":"TEST"}]}

ERROR:

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


Data Detail:

Name

Type

Description

recordType

STRING

A Record Type

Required Parameters

None

Optional Parameters

None

Example URL

/api/v1/api.php?target=zone&action=getRecordTypes

getFile

URL

/api/v1/api.php?target=zone&action=getFile&zoneId=50

Description

Returns a fully written zone file. If one does not exist, returns false.

Returns

A Zone File

Required Parameters

Name

Type

Example

Description

zoneId

INTEGER

50

The Id of the zone to retrieve.

format

ENUMERATED

'html' or "

If html, the zone file will be formatted for display via a web browser. If blank or omitted, the zone file will be formatted for display in a file system.

unsigned

BOOL

1

For a DNSSEC-enabled zone, determines whether or not the system retrieves the signed or unsigned zone file. Ignored for non-DNSSEC zones.

Optional Parameters

None

Example URL

/api/v1/api.php?target=zone&action=getFile&zoneId=50&zoneId=50&format=html&unsigned=1

getDSFile

URL

/api/v1/api.php?target=zone&action=getDSFile

Description

Returns a fully written zone DS key file. If one does not exist, returns false.

Returns

A Zone DS Key File

Required Parameters

Name

Type

Example

Description

zoneId

INTEGER

50

The Id of the zone whose DS keys are to be retrieved.

Optional Parameters

None

Example URL

/api/v1/api.php?target=zone&action=getDSFile&zoneId=50

checkZone

URL

/api/v1/api.php?target=zone&action=checkZone

Description

Runs a zone file through Named checkzone

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"No errors found."}

ERROR:

{"success":0,"message":"21: ignoring out-of-zone data (veggie.com) 22: ignoring out-of-zone data (veggie.com) dns_rdata_fromtext: 23: near '2001:db8:': bad IPv6 address dns_rdata_fromtext: 24: near '1.2.3.': bad dotted quad dns_rdata_fromtext: 25: near '2001::db8::\/32': bad IPv6 address "}

Required Parameters

Name

Type

Example

Description

zoneId

INTEGER

50

The Id of the zone to check.

Optional Parameters

None

Example URL

/api/v1/api.php?target=zone&action=checkZone&zoneId=50

getArchivedZone

URL

/api/v1/api.php?target=zone&action=getArchivedZone

Description

Searches for all archived versions of the a zone. Zones are archived every time changes are pushed to their DNS Server.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Search Successful.","data":[{"zoneArchiveId" :"2768","zoneId":"1227", "zoneArchiveTimestamp":"1375298692", "zoneArchiveFingerprint":"d060e59d69606326d80b2e55b50f0bc9","zoneName":"example.com","zoneIpver":null, "zoneMask":null,"zoneSerial": "2013073105","zoneRefresh":"14400","zoneRetry":"2000","zoneExpire":"604800", "zoneMinimum":"3600", "zoneSOA":null,"zoneTTL":"3600","zoneEnableDNSSEC":"1", "zoneResourceId":"1013","zonePreviousViewLinkage":"[]"}]}

ERROR:

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


Data Detail:

Name

Type

Description

zoneId

INTEGER

The Id of the Zone entry to find archived versions of.

zoneArchiveId

INTEGER

The ID of the Archive Entry

zoneArchiveTimestamp

INTEGER

A timestamp marking when this zone was archived.

zoneArchiveFingerprint

STRING

A hash value identifying this zone. Used for comparing versions.

zoneName

INTEGER

Zone Name.

zoneSerial

INTEGER

Zone Serial.

zoneRefresh

INTEGER

Zone Refresh.

zoneRetry

INTEGER

Zone Retry.

zoneExpire

INTEGER

Zone Expire.

zoneMinimum

INTEGER

Zone Minimum.

zoneSOA

STRING

Zone SOA.

zoneTTL

INTEGER

Zone TTL.

zoneEnableDNSSEC

STRING

Whether or not this version had DNSSEC enabled.

zoneResourceId

STRING

Zone Resource ID

zonePreviousViewLinkage

JSON

A JSON-encoded array of views this zone was linked to.

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

zoneId

INTEGER

123

The Zone Id to search for.

zoneArchiveId

INTEGER

123

The Zone Archive Id

zoneArchiveTimestamp

INTEGER

2012033001

The Zone Archive Timestamp

fetchArchiveFile

BOOL

1

Whether or not to return the full Zone file with the result set..

Example URL

/api/v1/api.php?target=zone&action=getArchivedZone&zoneId=123

DNS Record Control

get

URL

/api/v1/api.php?target=record&action=get

Description

Accepts 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:

Name

Type

Description

recordId

INTEGER

The ID of this Record Entry. It is always included with its parent Zone.

recordZoneId

INTEGER

The ID of this Record's parent Zone.

recordHost

STRING

The Hostname of this Record.

recordType

STRING

The Record Type (MX,NS,A,PTR,etc)

recordValue

STRING

The Value of this Record.

recordDescription

STRING

A short description of this Record.

recordTTL

STRING

The TTL of this Record.

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

likeFlag

BOOL

1

When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.

selectCount

INTEGER

30

When supplied only returns the first X entries

selectOffset

INTEGER

10

When supplied, only returns entries after record X

Name

Type

Example

Description

recordId

INTEGER

123

The Record ID to search for.

recordZoneId

INTEGER

123

The parent Zone to search for.

recordHost

STRING

@

The Record Host to search for.

recordType

STRING

NS

The Record Type to search for.

recordValue

STRING

ns1.dns.example.com.

The Record Value to search for.

recordDescription

STRING

Description

Search based on Record Description.

recordTTL

STRING

3600

The Record TTL to search for.



Name

Type

Example

Description

zoneId

INTEGER

123

The Zone Id to search for.

zoneName

STRING

foo

The Zone Name to search for.

zoneResourceId

INTEGER

5

The Resource Id to search for.

zoneCustName

STRING

foo

The Customer Name to search for.

zoneIpver

STRING

IPv6

The IP Version to search for.

zoneSerial

INTEGER

2012033001

The Zone Serial to search for.

zoneRefresh

INTEGER

36000

The Zone Refresh to search for.

zoneRetry

INTEGER

800

The Zone Retry to search for.

zoneExpire

INTEGER

6090000

The Zone Expire to search for.

zoneMinimum

INTEGER

10

The Zone Minimum to search for.

zoneSOA

STRING

200

The Zone SOA to search for.

zoneTTL

INTEGER

3600

The Zone TTL to search for.

zoneEnableDNSSEC

INTEGER

1

Search based on DNSSEC settings.

Example URL

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

update

URL

/api/v1/api.php?target=record&action=update

Description

First performs a search based on the submitted Zone and Record criteria, then performs an Update across those entries based on new values.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Update Successful."}

ERROR:

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

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

likeFlag

BOOL

1

When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.

generalFlag

BOOL

1

When 1, searches over the provided parameters using OR. If 0 or omitted, uses AND.

Name

Type

Example

Description

searchZoneId

INTEGER

123

The Zone ID to search for.

searchZoneName

STRING

foo

The Zone Name to search for.

searchZoneCustId

INTEGER

5

The Customer ID to search for.

searchZoneSerial

INTEGER

2012033001

The Zone Serial to search for.

searchZoneRefresh

INTEGER

36000

The Zone Refresh to search for.

searchZoneRetry

INTEGER

800

The Zone Retry to search for.

searchZoneExpire

INTEGER

6090000

The Zone Expire to search for.

searchZoneMinimum

INTEGER

10

The Zone Minimum to search for.

searchZoneSOA

STRING

200

The Zone SOA to search for.

searchZoneTTL

INTEGER

3600

The Zone TTL to search for.

searchZoneEnableDNSSEC

INTEGER

1

Search based on DNSSEC settings.

searchRecordId

INTEGER

123

The Record ID to search for.

searchRecordHost

STRING

@

The Record Host to search for.

searchRecordType

STRING

NS

The Record Type to search for.

searchRecordValue

STRING

ns1.dns.example.com.

The Record Value to search for.

searchRecordDescription

STRING

Description

Search based on Record Description.

searchRecordTTL

STRING

3600

The Record TTL to search for.

searchZoneResourceId

INTEGER

5

The Resource Id to search for.

searchRecordZoneId

INTEGER

123

The Zone ID of the Record to search for.

Name

Type

Example

Description

updateZoneName

STRING

foo

The Zone name to replace into the searched rows.

updateZoneSerial

INTEGER

2012033001

The Zone Serial to replace into the searched rows.

updateZoneRefresh

INTEGER

36000

The Zone Refresh to replace into the searched rows.

updateZoneRetry

INTEGER

800

The Zone Retry to replace into the searched rows..

updateZoneExpire

INTEGER

6090000

The Zone Expire to replace into the searched rows.

updateZoneMinimum

INTEGER

10

The Zone Minimum to replace into the searched rows.

updateZoneSOA

STRING

200

The Zone SOA to replace into the searched rows.

updateZoneTTL

INTEGER

3600

The Zone TTL to replace into the searched rows.

updateZoneEnableDNSSEC

INTEGER

1

Update DNSSEC Settings.

updateRecordHost

STRING

@

The Record Host to replace into the searched rows.

updateRecordType

STRING

NS

The Record Type to replace into the searched rows.

updateRecordValue

STRING

ns1.dns.example.com.

The Record Value to replace into the searched rows.

updateRecordDescription

STRING

Description

Update Record Descriptions.

updateRecordTTL

STRING

3600

The Record TTL to replace into the searched rows.

updateZoneResourceId

INTEGER

5

The Resource Id to replace into the searched rows.

updateZoneAutoCheck

BOOL

1

Whether or not this zone is configured to be automatically validated on load/edit.

Example URL

/api/v1/api.php?target=record&action=update&searchZoneId=123&updateZoneTTL=3600

add

URL

/api/v1/api.php?target=record&action=add

Description

Adds a new Record to a supplied Zone.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Add Successful.","data":123}

ERROR:

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


Data Detail:

Name

Type

Description

data

INTEGER

The ID of the new Record entry.

Required Parameters

Name

Type

Example

Description

newRecordZoneId

INTEGER

123

The Zone ID of the new Record.

newRecordHost

STRING

@

New Host Name.

newRecordType

STRING

PTR

New Record Type.

newRecordValue*

STRING

123

New Record Value.

*newRecordValue required only for certain Record Types

Optional Parameters

Name

Type

Example

Description

likeFlag

BOOL

1

When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.

newRecordDescription

STRING

Description.

Notes for the Record.

newRecordTTL

INTEGER

3600

Record TTL.

Example URL

/api/v1/api.php?target=record&action=add&newRecordZoneId=123&newRecordHost=@host&newRecordType=PTR&newRecordTTL=3600

delete

URL

/api/v1/api.php?target=record&action=delete

Description

Performs a search over the Zones and Records dataset and deletes all found Records, but leaves their parent Zones intact.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Deletion Successful."}

ERROR:

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

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

deleteZoneId

INTEGER

123

The Zone ID to search for.

deleteZoneName

STRING

foo

The Zone Name to search for.

deleteZoneCustId

INTEGER

5

The Customer ID to search for.

deleteZoneIpver

STRING

IPv6

The IP Version to search for.

deleteZoneSerial

INTEGER

2012033001

The Zone Serial to search for.

deleteZoneRefresh

INTEGER

36000

The Zone Refresh to search for.

deleteZoneRetry

INTEGER

800

The Zone Retry to search for.

deleteZoneExpire

INTEGER

6090000

The Zone Expire to search for.

deleteZoneMinimum

INTEGER

10

The Zone Minimum to search for.

deleteZoneSOA

STRING

200

The Zone SOA to search for.

deleteZoneTTL

INTEGER

3600

The Zone TTL to search for.

deleteZoneEnableDNSSEC

INTEGER

1

Search based on DNSSEC settings.

deleteRecordId

INTEGER

123

The Record ID to search for.

deleteRecordHost

STRING

@

The Record Host to search for.

deleteRecordType

STRING

NS

The Record Type to search for.

deleteRecordValue

STRING

ns1.dns.example.com.

The Record Value to search for.

deleteRecordDescription

STRING

Description

Search based on Record Description.

deleteRecordTTL

STRING

3600

The Record TTL to search for.

deleteZoneResourceId

INTEGER

5

The Resource Id to search for.

deleteZoneCustName

STRING

foo

The Customer Name to search for.

Example URL

/api/v1/api.php?target=record&action=delete&deleteZoneName=foo

switch

URL

/api/v1/api.php?target=record&action=switch

Description

Switches the order of two record entries.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Record Moved."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

moveWhichId

INTEGER

123

The Record Id to be moved.

moveAfterId

INTEGER

42

The Id of the Record the first Record is to be moved after.

Optional Parameters

None

Example URL

/api/v1/api.php?target=record&action=switch&moveWhichId=123&moveAfterId=42

Server-Zone Linkage

get

URL

/api/v1/api.php?target=zoneLinkage&action=get

Description

Searches for Server-Zone Linkages. If no search parameters are supplied, all linkages are returned.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"2 rows retrieved.","data":[{"id":"285","zoneId":"64","serverId":"1","serverName":"173.164.182.169","serverType":"SCP","serverMasterType":"master","zoneName":"bind.com","resourceId":"483"},{"id":"287","zoneId":"371","serverId":"1","serverName":"173.164.182.169","serverType":"SCP","serverMasterType":"master","zoneName":"132.235.198.in-addr.arpa","resourceId":"577"}}

ERROR:

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


Data Detail:

Name

Type

Description

id

INTEGER

The Linkage Id.

zoneId

INTEGER

The ZoneId involved in this link.

serverId

INTEGER

The ServerId involved in this link.

serverName

STRING

The server name

serverType

STRING

The server transfer type

serverMasterType

STRING

Whether this server is a master or a slave.

zoneName

STRING

The zone name

resourceId

INTEGER

The Resource Id the Zone is attached to.

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

id

INTEGER

15

Fetches the linkage with the matching id.

serverId

INTEGER

15

Fetches all linkages with the matching serverId.

zoneId

INTEGER

15

Fetches all linkages with the matching zoneId.

Example URL

/api/v1/api.php?target=zoneLinkage&action=get&id=15

add

URL

/api/v1/api.php?target=zoneLinkage&action=add

Description

Adds a new link between a DNS Server and a Zone

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Link Added."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

serverId

INTEGER

16

The DNS Server Id.

zoneId

INTEGER

105

The Zone Id.

serverSlave

BOOL

1

Whether or not this zone is a master or a slave on the linked server. Values are: 1 for slave, 0 for master.

Optional Parameters

None

Example URL

/api/v1/api.php?target=zoneLinkage&action=add&serverId=16&zoneId=105&serverSlave=0

delete

URL

/api/v1/api.php?target=zoneLinkage&action=delete

Description

Deletes a link between a DNS Server and a Zone

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Link Deleted."}

ERROR:

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

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

id

INTEGER

15

Fetches the linkage with the matching id.

serverId

INTEGER

15

Fetches all linkages with the matching serverId.

zoneId

INTEGER

15

Fetches all linkages with the matching zoneId.

Example URL

/api/v1/api.php?target=zoneLinkage&action=delete

Name Server Control

get

URL

/api/v1/api.php?target=nameServer&action=get

Description

Fetches a list of all stored Name Servers

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Fetch Sucessful.","data":[{"id":"1","nameserver":"ns1.dns.example.net","add_to_zones_default":"1","ordering":"10","uses":"34"},{"id":"10","nameserver":"ns2.dns.example.net","add_to_zones_default":"1","ordering":"11","uses":"46"},{"id":"9","nameserver":"ns4.dns.example.net","add_to_zones_default":"1","ordering":"14","uses":"12"},{"id":"3","nameserver":"ns3.dns.example.net","add_to_zones_default":"1","ordering":"15","uses":"46"}]}

ERROR:

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


Data Detail:

Name

Type

Description

id

INTEGER

Server ID

nameserver

STRING

Server Name

add_to_zones_default

BOOL

Whether or not this is a default server.

ordering

INTEGER

Display order

uses

INTEGER

How many zones have been assigned to this NameServer

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

default

INTEGER

1

Set server as default

 Example URL

/api/v1/api.php?target=nameServer&action=get&default=1

add

URL

/api/v1/api.php?target=nameServer&action=add

Description

Adds a new DNS Server

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Add Successful."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

newServer

STRING

ns.yourdomain.com

Name of the NameServer

Optional Parameters

None

Example URL

/api/v1/api.php?target=nameServer&action=add&newServer=ns.yourdomain.com

delete

URL

/api/v1/api.php?target=nameServer&action=delete

Description

Deletes a NameServer

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Server Deleted."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

id

INTEGER

5

ID of server to delete.

Optional Parameters

None

Example URL

/api/v1/api.php?target=nameServer&action=delete&id=5

setDefault

URL

/api/v1/api.php?target=nameServer&action=setDefault

Description

Default NameServers have all new zones added to them as they are created. Multiple NameServers can be classified as Default.

Returns

Examples:

SUCCESSFUL:

{"success":1, "message":"Success."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

id

INTEGER

5

ID of server to modify.

value

INTEGER

1

1 = Default, 0 = Normal

Optional Parameters

None

Example URL

/api/v1/api.php?target=nameServer&action=setDefault&id=3&value=1

orderUp

URL

/api/v1/api.php?target=nameServer&action=orderUp

Description

Swaps the index order of the targeted NameServer with that of the one above it.

Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Reordering Successful."}

ERROR:

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

Required Parameters

Name

Type

Example

Description

id

INTEGER

5

ID of server to modify.

Optional Parameters

None

Example URL

/api/v1/api.php?target=nameServer&action=orderUp&id=3

orderDown

URL

/api/v1/api.php?target=nameServer&action=orderDown

Description

Swaps 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

Name

Type

Example

Description

id

INTEGER

5

ID of server to activate.

Optional Parameters

None

Example URL

/api/v1/api.php?target=nameServer&action=orderDown&id=5