Hello,
as the title states I would really like to see API support for deleting DNS records. In the API section of this forum there's a topic with some posts from people who are also looking for this option.
Currently it is possible to create DNS records using the API:
CMD_API_DNS_CONTROL?domain=domain.com&action=add&type=A|NS|MX|CNAME|PTR&name=namevalue&value=recordvalue
Also its possible to get a list of all the record types, names, and values in the zone, by parsing the result of
CMD_API_DNS_CONTROL?domain=domain.com&urlencoded=yes
For selecting (and possibly also deleting, which is not documented, at least I could not find it) one can use:
CMD_API_DNS_CONTROL?domain=domain.com&action=select&selecttype=encoded
where "selecttype" is one of arecs0, nsrecs0, mxrecs0, cnamerecs0, ptrrecs0 (0 and be any number, generally starting from zero, going up), and also where "encoded" is the url encoded version of: name=www&value=1.2.3.4
But when using the API, how can one retrieve the "selecttype" value, which is not included in the raw dump of the zone?
To summarize: is there a way to delete DNS records using the API, and if not would you be willing to add it? Wouldn't it for instance be possible for the api to delete records by recordtype and record name only, as in:
CMD_API_DNS_CONTROL?domain=domain.com&action=delete&type=A|NS|MX|CNAME|PTR&name=namevalue
Or if it would be easier for you to link the API function to the "normal" CMD_DNS_CONTROL delete function, by leaving the "selecttype" in there is it then true that for instance the third A-record in the raw zone dump would be arecs2 ?
Your reply/efforts would be greatly appreciated by me and many others.
Thanks in advance,
Jeroen
as the title states I would really like to see API support for deleting DNS records. In the API section of this forum there's a topic with some posts from people who are also looking for this option.
Currently it is possible to create DNS records using the API:
CMD_API_DNS_CONTROL?domain=domain.com&action=add&type=A|NS|MX|CNAME|PTR&name=namevalue&value=recordvalue
Also its possible to get a list of all the record types, names, and values in the zone, by parsing the result of
CMD_API_DNS_CONTROL?domain=domain.com&urlencoded=yes
For selecting (and possibly also deleting, which is not documented, at least I could not find it) one can use:
CMD_API_DNS_CONTROL?domain=domain.com&action=select&selecttype=encoded
where "selecttype" is one of arecs0, nsrecs0, mxrecs0, cnamerecs0, ptrrecs0 (0 and be any number, generally starting from zero, going up), and also where "encoded" is the url encoded version of: name=www&value=1.2.3.4
But when using the API, how can one retrieve the "selecttype" value, which is not included in the raw dump of the zone?
To summarize: is there a way to delete DNS records using the API, and if not would you be willing to add it? Wouldn't it for instance be possible for the api to delete records by recordtype and record name only, as in:
CMD_API_DNS_CONTROL?domain=domain.com&action=delete&type=A|NS|MX|CNAME|PTR&name=namevalue
Or if it would be easier for you to link the API function to the "normal" CMD_DNS_CONTROL delete function, by leaving the "selecttype" in there is it then true that for instance the third A-record in the raw zone dump would be arecs2 ?
Your reply/efforts would be greatly appreciated by me and many others.
Thanks in advance,
Jeroen
Last edited: