Chapter 9: Controller: /nodeworx/cron Up Part II: NodeWorx API Spec Chapter 11: Controller: /nodeworx/dns/record 

10 Controller: /nodeworx/dns

Required Permissions "DNS"
Action: defaultServers
Added in version 4.7.0-339
Description Set the default nameserver (NS) records for new domains.
Input Parameters
Name Type Notes Required?
ns1 string Help Entry
The first nameserver to be used for requesting zone data for a given zone. For redundancy, a second (though equally authoritative) nameserver is required.
Example Default Value
ns1.interworx.com
No*
ns2 string Help Entry
The second nameserver to be used for requesting zone data for a given zone. An optional (equally authoritative) third nameserver can be provided for additional redundancy.
Example Default Value
ns2.interworx.com
No*
ns3 string Help Entry
Similar to the secondary nameserver, but it is only used if the primary and secondary server fail.
No
* indicates that it’s actually required, but probably already has a valid default value
Action: export
Added in version 4.10.0-440
Description Updates the DNS records from the database.
Action: flush
Added in version 4.8.0-393
Description DNS flush service action.
Input Parameters
Name Type Notes Required?
ip struct (string) Example Values
10.1.15.100, 10.1.15.101, 10.1.15.102, 10.1.15.103, 10.1.15.104, 2001:db8::d:1101, 2001:db8::d:1102, 127.0.0.1
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: install
Added in version 4.8.3-414
Description Installs a DNS server on IPs that don’t have one.
Input Parameters
Name Type Notes Required?
ip struct (string) Example Values
10.1.15.200, fe80::fcb5:65ff:fe2a:a05
No
Action: isRunning
Added in version 4.7.0-339
Description Checks if the service is running or not.
Sample output
array (
’status’ => 0,
’payload’ => true,
)
Action: isRunningOnNode
Added in version 4.7.0-339
Description Checks if the service is running on a specific node (Clustering only).
Input Parameters
Name Type Notes Required?
node_id string No*
* indicates that it’s actually required, but probably already has a valid default value
Action: listDnsServices
Added in version 4.8.0-393
Description Lists information about DNS Services running.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’ip’ => ’127.0.0.1’,
’status’ => ’up’,
’type’ => ’recursive’,
),
1 =>
array (
’ip’ => ’10.1.15.100’,
’status’ => ’up’,
’type’ => ’iterative’,
),
2 =>
array (
’ip’ => ’10.1.15.101’,
’status’ => ’up’,
’type’ => ’iterative’,
),
),
)
Action: listGeneralName
Added in version 4.7.0-339
Description Lists the "normal" name - ie "web server" instead of "httpd".
Sample output
array (
’status’ => 0,
’payload’ => ’##LG_DNS_SERVER##’,
)
Action: listPortNumbers
Added in version 4.7.0-339
Description Lists a string of the port numbers that this service uses, comma-seperated.
Sample output
array (
’status’ => 0,
’payload’ => ’53’,
)
Action: listPortNumbersArray
Added in version 4.7.0-339
Description Lists array of port numbers and ranges that this service uses.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 => 53,
),
)
Action: listRequiredPermissions
Added in version 4.7.0-339
Description Lists an array of permissions required to control the service.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 => ’DNS’,
),
)
Action: listServiceInfo
Added in version 4.7.0-339
Description Lists the service name, ports, page, and status.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’id’ => ’djbdns’,
’name’ => ’##LG_DNS_SERVER##’,
’ports’ => ’53’,
’page’ => ’/nodeworx/dns’,
’ctrl’ => ’/nodeworx/dns’,
’is_running’ => 1,
),
)
Action: listServiceName
Added in version 4.7.0-339
Description Lists the service name - ie "httpd" instead of "web server".
Sample output
array (
’status’ => 0,
’payload’ => ’djbdns’,
)
Action: listServicePage
Added in version 4.7.0-339
Description Lists the page that controls the service.
Sample output
array (
’status’ => 0,
’payload’ => ’/nodeworx/dns’,
)
Action: listServiceStatus
Added in version 4.7.0-339
Description Lists information about DNS Services running.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’10.1.15.100’ =>
array (
’ip’ => ’10.1.15.100’,
’status’ => ’up’,
’mapped’ => true,
’on_system’ => true,
),
’10.1.15.101’ =>
array (
’ip’ => ’10.1.15.101’,
’status’ => ’up’,
’mapped’ => true,
’on_system’ => true,
),
’10.1.15.102’ =>
array (
’ip’ => ’10.1.15.102’,
’status’ => ’up’,
’mapped’ => true,
’on_system’ => true,
),
’10.1.15.103’ =>
array (
’ip’ => ’10.1.15.103’,
’status’ => ’up’,
’mapped’ => true,
’on_system’ => true,
),
’10.1.15.104’ =>
array (
’ip’ => ’10.1.15.104’,
’status’ => ’up’,
’mapped’ => true,
’on_system’ => true,
),
’2001:db8::d:1101’ =>
array (
’ip’ => ’2001:db8::d:1101’,
’status’ => ’up’,
’mapped’ => true,
’on_system’ => true,
),
),
)
Action: listUnmappedIps
Added in version 4.8.3-414
Description Lists information about IPs that do not have DNS running.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’ip’ => ’10.1.15.200’,
),
1 =>
array (
’ip’ => ’fe80::fcb5:65ff:fe2a:a05’,
),
),
)
Action: queryDefaultServers
Added in version 5.1.0-838
Description Displays the information available to the action "defaultServers".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’ns1’ => ’ns1.interworx.com’,
’ns2’ => ’ns2.interworx.com’,
’ns3’ => ’’,
),
)
Action: querySetSoaSerialFormat
Added in version 5.1.0-838
Description Displays the information available to the action "setSoaSerialFormat".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’mode’ => ’unix’,
’update_all_zones’ => NULL,
),
)
Action: queryZoneDefaults
Added in version 5.1.0-838
Description Displays the information available to the action "zoneDefaults".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’refresh’ => ’7200’,
’retry’ => ’300’,
’expire’ => ’1209600’,
’negative_ttl’ => ’10800’,
’enforce_rfc1912_cname’ => ’1’,
),
)
Action: remove
Added in version 4.8.0-393
Description  DNS remove service action.
Input Parameters
Name Type Notes Required?
ip struct (string) Example Values
10.1.15.100, 10.1.15.101, 10.1.15.102, 10.1.15.103, 10.1.15.104, 2001:db8::d:1101, 2001:db8::d:1102
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: restart
Added in version 4.7.0-339
Description DNS restart service action.
Input Parameters
Name Type Notes Required?
ip struct (string) Example Values
10.1.15.100, 10.1.15.101, 10.1.15.102, 10.1.15.103, 10.1.15.104, 2001:db8::d:1101, 2001:db8::d:1102, 127.0.0.1
No
Action: restartOnNode
Added in version 4.7.0-339
Description Restarts the service on a specific node (Clustering only).
Input Parameters
Name Type Notes Required?
node_id string No*
* indicates that it’s actually required, but probably already has a valid default value
Action: setSoaSerialFormat
Added in version 4.8.0-393
Description Set the DNS SOA Serial Format.
Input Parameters
Name Type Notes Required?
mode string Example Values
unix, ymd
Example Default Value
unix
No*
update_all_zones integer Example Values
1
No
* indicates that it’s actually required, but probably already has a valid default value
Action: start
Added in version 4.7.0-339
Description DNS start service action.
Input Parameters
Name Type Notes Required?
ip struct (string) Example Values
10.1.15.100, 10.1.15.101, 10.1.15.102, 10.1.15.103, 10.1.15.104, 2001:db8::d:1101, 2001:db8::d:1102, 127.0.0.1
No
Action: startOnNode
Added in version 4.7.0-339
Description Starts the service on a specific node (Clustering only).
Input Parameters
Name Type Notes Required?
node_id string No*
* indicates that it’s actually required, but probably already has a valid default value
Action: stop
Added in version 4.7.0-339
Description DNS stop service action.
Input Parameters
Name Type Notes Required?
ip struct (string) Example Values
10.1.15.100, 10.1.15.101, 10.1.15.102, 10.1.15.103, 10.1.15.104, 2001:db8::d:1101, 2001:db8::d:1102, 127.0.0.1
No
Action: stopOnNode
Added in version 4.7.0-339
Description Stops the service on a specific node (Clustering only).
Input Parameters
Name Type Notes Required?
node_id string No*
* indicates that it’s actually required, but probably already has a valid default value
Action: zoneDefaults
Added in version 4.7.0-339
Description Update the default dns zone settings.
Input Parameters
Name Type Notes Required?
refresh integer Description
In Seconds
Help Entry
Sets the number of seconds that a slave will cache the record before re-checking the primary server. Recommended values are between 1200 (twenty minutes) and 43200 (twelve hours).
Example Default Value
7200
No*
retry integer Description
In Seconds
Help Entry
Set the number of seconds to retry a refresh after the previous refresh attempt fails. Recommended values are between 180 (three minutes) and 900 (fifteen minutes).
Example Default Value
300
No*
expire integer Description
In Seconds
Help Entry
Set the number of seconds for refresh and retry attempts before the server will stop serving the zone. Per RFC 1912, recommended values are between 1209600 (two weeks) and 2419200 (four weeks). This value is only used by slave servers.
Example Default Value
1209600
No*
negative_ttl integer Description
In Seconds
Help Entry
Time in seconds for negative answers (NXDOMAIN) from this zone. This field was redefined in 1998 by RFC2308. Suggested values are between 3600 (one hour) and 10800 (three hours). Values higher than 86400 (twenty-four hours) should be avoided.
Example Default Value
10800
No*
enforce_rfc1912_cname integer Help Entry
RFC1912 states "A CNAME record is not allowed to coexist with any other data." In certain circumstances, you MAY want to relax this restriction if you understand the ramifications.
Example Values
1, 0
Example Default Value
1
No*
* indicates that it’s actually required, but probably already has a valid default value
 Chapter 9: Controller: /nodeworx/cron Up Part II: NodeWorx API Spec Chapter 11: Controller: /nodeworx/dns/record 

(C) 2017 by InterWorx LLC