Chapter 62: Controller: /siteworx/cron Up Part III: SiteWorx API Spec Chapter 64: Controller: /siteworx/domains/pointer 

63 Controller: /siteworx/dns

Required Permissions "DNS"
Required Options Edit DNS Records
Action: add
Added in version 4.7.0-339
Description Add a DNS Record (A, CNAME, or TXT).
Warning This action has been deprecated as of version 4.8.0-393. 2011-04-05 Use individual add[ type ] functions instead.
Input Parameters
Name Type Notes Required?
domain string Example Values
example.com, pointer.com, secondary.com
Yes
Action: addA
Added in version 4.7.0-339
Description Add an A record.
Input Parameters
Name Type Notes Required?
zone_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
ipaddress string Help Entry
####
Yes
* indicates that it’s actually required, but probably already has a valid default value
Action: addAAAA
Added in version 4.8.0-393
Description Add an AAAA record.
Input Parameters
Name Type Notes Required?
zone_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
ipaddress string Help Entry
####
Yes
* indicates that it’s actually required, but probably already has a valid default value
Action: addCNAME
Added in version 4.8.0-393
Description Add a CNAME record.
Input Parameters
Name Type Notes Required?
zone_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
alias string Yes
* indicates that it’s actually required, but probably already has a valid default value
Action: addMX
Added in version 4.8.0-393
Description Add an MX record.
Input Parameters
Name Type Notes Required?
zone_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
preference integer Help Entry
An integer, ranging from 0-65535, indicating the order in which records should be attempted. Lower numbers will be processed before higher ones.
Yes
mail_server string Yes
* indicates that it’s actually required, but probably already has a valid default value
Action: addSPF
Added in version 4.8.0-393
Description Add an SPF record.
Input Parameters
Name Type Notes Required?
zone_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
spf_record_value string No
spf_version string Example Values
v=spf1, v=spf3
Example Default Value
v=spf1
No*
use_a integer Description
Should the IP(s) referenced in DNS A Records for this domain be permitted to send mail?
Example Values
1, 0
Example Default Value
0
No*
use_mx integer Description
Should the hostnames referenced in DNS MX Records for this domain be permitted to send mail?
Example Values
1, 0
Example Default Value
0
No*
use_ptr integer Description
Should the PTR Records for the sender’s IP be used to validate the sender’s domain? NOT RECOMMENDED.
Example Values
1, 0
Example Default Value
0
No*
other_servers integer Description
Do any other hostnames or IPs need to be authorized to send mail for this domain?
Example Values
1, 0
Example Default Value
0
No*
mechanism_a struct (string) Description
If the domain name has an address record (A or AAAA) that can be resolved to the sender’s address, it will match.
No
mechanism_mx struct (string) Description
If the domain name has an MX record resolving to the sender’s address, it will match (i.e. the mail comes from one of the domain’s mail servers).
No
mechanism_ip4 struct (string) Description
If the sender is in a given IPv4 range, match.
No
mechanism_ip6 struct (string) Description
If the sender is in a given IPv6 range, match.
No
mechanism_ptr struct (string) Description
If the domain name for the client’s address is in the given domain and that domain name resolves to the client’s address, match. Input may use macro-expansion. NOT RECOMMENDED.
No
mechanism_exists struct (string) Description
If there is a valid A Record for the given domain, match. Input may use macro-expansion.
No
mechanism_include struct (string) Description
Used to include the policies of another domain’s SPF record. Similar to the ’Redirect’ parameter.
No
all string Description
Defines how to respond if the record has produced no match.
Example Values
, -all, ~all, ?all, +all
No
redirect string Description
Redirects verification to use the SPF record of the specified domain. This is useful, for example, if you send mail through your ISP’s servers and they have defined an SPF record.
No
explanation string Description
Defines a DNS name whose TXT Record may be returned along with failure messages. Rarely used, may not be universally supported.
No
* indicates that it’s actually required, but probably already has a valid default value
Action: addSRV
Added in version 5.0.15-700
Description Add an SRV record.
Input Parameters
Name Type Notes Required?
zone_id integer Yes
service string Help Entry
The symbolic name of the desired service. For example, _sip, _ldap, etc.
Yes
protocol string Help Entry
The name of the protocol with an underscore prepended to avoid collisions with other DNS records. "_TCP" and "_UDP" are the two most common values.
Yes
domain string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
priority integer Yes
weight integer Yes
port integer Yes
target string Yes
* indicates that it’s actually required, but probably already has a valid default value
Action: addTXT
Added in version 4.8.0-393
Description Add a TXT record.
Input Parameters
Name Type Notes Required?
zone_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
text string Yes
* indicates that it’s actually required, but probably already has a valid default value
Action: delete
Added in version 4.7.0-339
Description Delete a DNS Record.
Input Parameters
Name Type Notes Required?
record_id struct (integer) Yes
confirm_action struct (integer) Example Values
1
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: editA
Added in version 4.8.0-393
Description Edit an A record.
Input Parameters
Name Type Notes Required?
record_id integer Yes
host string Example Default Value
ipv4.example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
ipaddress string Help Entry
####
Example Default Value
{ipv4}
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: editAAAA
Added in version 4.8.0-393
Description Edit an AAAA record.
Input Parameters
Name Type Notes Required?
record_id integer Yes
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: editCNAME
Added in version 4.8.0-393
Description Edit a CNAME record.
Input Parameters
Name Type Notes Required?
record_id integer Yes
host string Example Default Value
www.example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
alias string Example Default Value
example.com
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: editMX
Added in version 4.8.0-393
Description Edit an MX record.
Input Parameters
Name Type Notes Required?
record_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
preference integer Help Entry
An integer, ranging from 0-65535, indicating the order in which records should be attempted. Lower numbers will be processed before higher ones.
Example Default Value
10
No*
mail_server string Example Default Value
mail.example.com
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: editSPF
Added in version 4.8.0-393
Description Edit an SPF record.
Input Parameters
Name Type Notes Required?
record_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
spf_record_value string Example Default Value
v=spf1
No
spf_version string Example Values
v=spf1, v=spf3
Example Default Value
v=spf1
No*
use_a integer Description
Should the IP(s) referenced in DNS A Records for this domain be permitted to send mail?
Example Values
1, 0
Example Default Value
0
No*
use_mx integer Description
Should the hostnames referenced in DNS MX Records for this domain be permitted to send mail?
Example Values
1, 0
Example Default Value
0
No*
use_ptr integer Description
Should the PTR Records for the sender’s IP be used to validate the sender’s domain? NOT RECOMMENDED.
Example Values
1, 0
Example Default Value
0
No*
other_servers integer Description
Do any other hostnames or IPs need to be authorized to send mail for this domain?
Example Values
1, 0
Example Default Value
0
No*
mechanism_a struct (string) Description
If the domain name has an address record (A or AAAA) that can be resolved to the sender’s address, it will match.
No
mechanism_mx struct (string) Description
If the domain name has an MX record resolving to the sender’s address, it will match (i.e. the mail comes from one of the domain’s mail servers).
No
mechanism_ip4 struct (string) Description
If the sender is in a given IPv4 range, match.
No
mechanism_ip6 struct (string) Description
If the sender is in a given IPv6 range, match.
No
mechanism_ptr struct (string) Description
If the domain name for the client’s address is in the given domain and that domain name resolves to the client’s address, match. Input may use macro-expansion. NOT RECOMMENDED.
No
mechanism_exists struct (string) Description
If there is a valid A Record for the given domain, match. Input may use macro-expansion.
No
mechanism_include struct (string) Description
Used to include the policies of another domain’s SPF record. Similar to the ’Redirect’ parameter.
No
all string Description
Defines how to respond if the record has produced no match.
Example Values
, -all, ~all, ?all, +all
No
redirect string Description
Redirects verification to use the SPF record of the specified domain. This is useful, for example, if you send mail through your ISP’s servers and they have defined an SPF record.
No
explanation string Description
Defines a DNS name whose TXT Record may be returned along with failure messages. Rarely used, may not be universally supported.
No
* indicates that it’s actually required, but probably already has a valid default value
Action: editSRV
Added in version 5.0.15-700
Description Edit an SRV record.
Input Parameters
Name Type Notes Required?
record_id integer Yes
service string Help Entry
The symbolic name of the desired service. For example, _sip, _ldap, etc.
Example Default Value
_sip
No*
protocol string Help Entry
The name of the protocol with an underscore prepended to avoid collisions with other DNS records. "_TCP" and "_UDP" are the two most common values.
Example Default Value
_tcp
No*
domain string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
priority integer Example Default Value
10
No*
weight integer Example Default Value
100
No*
port integer Example Default Value
5060
No*
target string Example Default Value
www.google.com
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: editTXT
Added in version 4.8.0-393
Description Edit a TXT record.
Input Parameters
Name Type Notes Required?
record_id integer Yes
host string Example Default Value
example.com
No*
ttl integer Description
In Seconds
Help Entry
TTL, or Time To Live, is the number of seconds that a record will be considered valid by a server caching the information.
Example Default Value
43200
No*
text string Example Default Value
example text record
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: listZones
Added in version 4.9.3-435
Description List Dns Zones.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’zone_id’ => ’537’,
’domain’ => ’example.com’,
’nodeworx_id’ => ’1’,
’is_suspended’ => ’0’,
’domain_type’ => ’master’,
’master_domain’ => ’example.com’,
),
1 =>
array (
’zone_id’ => ’539’,
’domain’ => ’secondary.com’,
’nodeworx_id’ => ’1’,
’is_suspended’ => ’0’,
’domain_type’ => ’slave’,
’master_domain’ => ’example.com’,
),
2 =>
array (
’zone_id’ => ’538’,
’domain’ => ’pointer.com’,
’nodeworx_id’ => ’1’,
’is_suspended’ => ’0’,
’domain_type’ => ’redirect’,
’master_domain’ => ’example.com’,
),
),
)
Action: queryDnsRecords
Added in version 4.8.0-393
Description List DNS Records that are part of the zone.
Input Parameters
Name Type Notes Required?
zone_id integer No*
uni integer Example Values
1, 0
Example Default Value
0
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: queryEditA
Added in version 5.1.0-838
Description Displays the information available to the action "editA".
Input Parameters
Name Type Notes Required?
record_id integer Yes
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’host’ => ’ipv4.example.com’,
’ttl’ => ’43200’,
’ipaddress’ => ’10.1.15.100’,
’record_id’ => ’6920’,
),
)
Action: queryEditAAAA
Added in version 5.1.0-838
Description Displays the information available to the action "editAAAA".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’host’ => ’example.com’,
’ttl’ => ’43200’,
’ipaddress’ => ’bead::1’,
’record_id’ => ’6931’,
),
)
Action: queryEditCNAME
Added in version 5.1.0-838
Description Displays the information available to the action "editCNAME".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’host’ => ’www.example.com’,
’ttl’ => ’43200’,
’alias’ => ’example.com’,
’record_id’ => ’6924’,
),
)
Action: queryEditMX
Added in version 5.1.0-838
Description Displays the information available to the action "editMX".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’host’ => ’example.com’,
’ttl’ => ’43200’,
’preference’ => ’10’,
’mail_server’ => ’mail.example.com’,
’record_id’ => ’6927’,
),
)
Action: queryEditSPF
Added in version 5.1.0-838
Description Displays the information available to the action "editSPF".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’host’ => ’example.com’,
’ttl’ => ’43200’,
’spf_record_value’ => ’v=spf1’,
’spf_version’ => ’v=spf1’,
’use_a’ => ’0’,
’use_mx’ => ’0’,
’use_ptr’ => ’0’,
’other_servers’ => ’0’,
’mechanism_a’ =>
array (
),
’mechanism_mx’ =>
array (
),
’mechanism_ip4’ =>
array (
),
’mechanism_ip6’ =>
array (
),
’mechanism_ptr’ =>
array (
),
’mechanism_exists’ =>
array (
),
’mechanism_include’ =>
array (
),
’all’ => NULL,
’redirect’ => ’’,
’explanation’ => NULL,
’record_id’ => ’6934’,
),
)
Action: queryEditSRV
Added in version 5.1.0-838
Description Displays the information available to the action "editSRV".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’service’ => ’_sip’,
’protocol’ => ’_tcp’,
’domain’ => ’example.com’,
’ttl’ => ’43200’,
’priority’ => ’10’,
’weight’ => ’100’,
’port’ => ’5060’,
’target’ => ’www.google.com’,
’record_id’ => ’6935’,
),
)
Action: queryEditTXT
Added in version 5.1.0-838
Description Displays the information available to the action "editTXT".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’host’ => ’example.com’,
’ttl’ => ’43200’,
’text’ => ’example text record’,
’record_id’ => ’6936’,
),
)
 Chapter 62: Controller: /siteworx/cron Up Part III: SiteWorx API Spec Chapter 64: Controller: /siteworx/domains/pointer 

(C) 2017 by InterWorx LLC