Forums

When I try to set a sub domain using the set_dns command, it wipes out all my sub domain records.
This is the url I've been using to try this:
https://api.dynadot.com/api3.html?key=MY_KEY&command=set_dns&domain=MY_DOMAIN&main_record_type=a&main_record=IP_ADDRESS&sub_record_type0=a&sub_record0=SUB_IP_ADDRESS
This is the url I've been using to try this:
https://api.dynadot.com/api3.html?key=MY_KEY&command=set_dns&domain=MY_DOMAIN&main_record_type=a&main_record=IP_ADDRESS&sub_record_type0=a&sub_record0=SUB_IP_ADDRESS



Thanks. It sort of works now. When using "set_dns" to change a subdomain it'll now apply the changes to the subdomain you specify but will wipe out all the other DNS settings for that domain that you don't specify - including the MX records. I found this out the hard way when someone told me they got a returned email when they sent me an email to one of my domains that I have custom MX records set.
Can you get "set_dns" to apply changes only to the settings you specify without wiping out the rest of the DNS settings for that domain?
Thanks again!
Can you get "set_dns" to apply changes only to the settings you specify without wiping out the rest of the DNS settings for that domain?
Thanks again!





I'm not sure if you're following the issue I'm trying to point out.
If I want to change just one parameter and don't specify all parameters, it will wipe out all the other parameters that I don't specify.
For example, lets say I have a dns that looks like this:
Domain Record | type | IP
mydomain.com | A | 0.0.0.1
Sub Record | type | IP
test1.mydomain.com | A | 0.0.0.2
test2.mydomain.com | A | 0.0.0.3
Now lets say I want to just change the IP address of sub record 0 (test1) to 0.0.0.4.
If I use the following query string, it'll wipe out all the other settings in the dns: (i've broken the url in multiple lines for readability)
https://api.dynadot.com/api3.html?
key=MY_KEY&
command=set_dns&
domain=mydomain.com&
sub_record0=0.0.0.4
In order for it to change what I want and keep all the other settings in the dns record, the query string has to have all the settings for the dns record that you want to keep.
Staying with the current example, I'd have to do this to get it to not wipe out the other settings:
https://api.dynadot.com/api3.html?key=MY_KEY&
command=set_dns&
domain=mydomain.com&
main_record_type=a&
main_record=0.0.0.1&
subdomain0=test1&
sub_record_type0=a&
sub_record0=0.0.0.4&
subdomain1=test2&
sub_record_type1=a&
sub_record1=0.0.0.3
This is unnecessarily extraneous, and makes it easy to accidentally wipe out your dns records.
It'd be ideal to only have to include the parameter you want to change in the query string, and not have to include all the other parameters that you don't want to change in the dns record.
If I want to change just one parameter and don't specify all parameters, it will wipe out all the other parameters that I don't specify.
For example, lets say I have a dns that looks like this:
Domain Record | type | IP
mydomain.com | A | 0.0.0.1
Sub Record | type | IP
test1.mydomain.com | A | 0.0.0.2
test2.mydomain.com | A | 0.0.0.3
Now lets say I want to just change the IP address of sub record 0 (test1) to 0.0.0.4.
If I use the following query string, it'll wipe out all the other settings in the dns: (i've broken the url in multiple lines for readability)
https://api.dynadot.com/api3.html?
key=MY_KEY&
command=set_dns&
domain=mydomain.com&
sub_record0=0.0.0.4
In order for it to change what I want and keep all the other settings in the dns record, the query string has to have all the settings for the dns record that you want to keep.
Staying with the current example, I'd have to do this to get it to not wipe out the other settings:
https://api.dynadot.com/api3.html?key=MY_KEY&
command=set_dns&
domain=mydomain.com&
main_record_type=a&
main_record=0.0.0.1&
subdomain0=test1&
sub_record_type0=a&
sub_record0=0.0.0.4&
subdomain1=test2&
sub_record_type1=a&
sub_record1=0.0.0.3
This is unnecessarily extraneous, and makes it easy to accidentally wipe out your dns records.
It'd be ideal to only have to include the parameter you want to change in the query string, and not have to include all the other parameters that you don't want to change in the dns record.