API for User and Admin Level DNS Administration

Version 1.242


raw dump of the dns zone CMD_API_DNS_CONTROL?domain=domain.com Add a record: CMD_API_DNS_CONTROL?domain=domain.com&action=add&type=A|NS|MX|CNAME|PTR&name=namevalue&value=recordvalue Delete a record: 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= Basicaly, just replace the =, and & characters to html encoded charctes so that DA doesnt thing they are url separators. Take a look at the html generated in the CMD_DNS_CONTROL page for examples (the code is the same to handel the API and the CMD_API_DNS_CONTROL, it just uses different output). CMD_API_DNS_ADMIN functions work exactly the same as with CMD_API_DNS_CONTROL, except an admin account is required, and he can work on any domain. Additional functions that come with the CMD_API_DNS_ADMIN command are: delete zones: CMD_API_DNS_ADMIN?action=delete&select0=domain.com&select1=domain2.com&etc.. create zone: CMD_API_DNS_ADMIN?action=create&domain=domain.com&ip= if you also include &reverse=yes, then DA will add a reverse lookup for pointing to domain.com, instead of the usual domain.com pointint to These API's are the beginning of multi server DNS. (*just* the beginning ;)) --------------------------- UPDATE Edit a record To edit a record, it's a combination of first deleting a record, then adding a record. So to do the edit, pass everything needed for action=delete, plus everything need for action=add, except you'd use action=edit. Eg: CMD_API_DNS_ADMIN?action=edit&domain=domain.com&type=A&arecs0=name%3Dmail%26value%3D1.2.3.4&name=mail&value=

Interested to try DirectAdmin? Get a 30-day Free Trial!