![]() |
|
#1
|
|||
|
|||
|
To use the API you must setup your API IP/Hostname & API Hash.
To do this go to "my profile" and at the bottom of the page you should see this ![]() Now click "Generate New Hash" then input your "IP/Hostname" and click "Update API IP" It should now look like this ![]() Below are the variables you can currently use: Code:
email= - the E-Mail address you registered on EditDNS.net apihash= - your API Hash domain= - Your domain name you wish to update/add/delete addDomain=1 - Add a new domain (has optional fields see below) (optional) defaultIP= - pre-fill in the www and root domain records to point at an IP (optional) masterNS= - make the domain a slave domain deleteDomain=1 - Delete domain addRecord=1 - Add a new record (has Required and optional fields see below) (required) record= - The record name you want to add (required) type= - The type of record you want to add (i.e. A,MX,CNAME) (required) data= - The IP/hostname for the record (optional) ttl= - The time to live of the record (optional) aux= - Priority/Aux (mostly used for MX records) deleteRecord=1 - Delete the record (has Required fields see below) (required) record= - The record name you want to delete (required) type= - The type of record you want to delete Every command needs your "email", "apihash" and "domain" you want it to affect. so the basic format for every command would be: Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com I'll use "example.com" as the domain we want to change/add/delete Add a new domain (regular domain) we just add "&addDomain=1" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&addDomain=1 we just add "&addDomain=1&defaultIP=123.456.123.456" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&addDomain=1&defaultIP=123.456.123.456 we just add "&addDomain=1&masterNS=123.456.789.123" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&addDomain=1&masterNS=123.456.789.123 we just add "&deleteDomain=1" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&deleteDomain=1 we just add "&addRecord=1&record=test.example.com&type=A&data= 123.456.123.789" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&addRecord=1&record=test.example.com&type=A&data=123.456.123.789 we just add "&addRecord=1&record=test.example.com&type=A&data= 123.456.123.789&ttl=3600" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&addRecord=1&record=test.example.com&type=A&data=123.456.123.789&ttl=3600 we just add "&addRecord=1&record=test2.example.com&type=CNAME& data=www.example.com" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&addRecord=1&record=test2.example.com&type=CNAME&data=www.example.com we just add "&addRecord=1&record=example.com&type=MX&data=mail .example.com&aux=5" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&addRecord=1&record=example.com&type=MX&data=mail.example.com&aux=5 we just add "&addRecord=1&record=example.com&type=NS&data=ns3. eu.editdns.net" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&addRecord=1&record=example.com&type=NS&data=ns3.eu.editdns.net we just add "&deleteRecord=1&record=test.example.com&type= A" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&deleteRecord=1&record=test.example.com&type=A we just add "&deleteRecord=1&record=test2.example.com&type=CNA ME" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&deleteRecord=1&record=test2.example.com&type=CNAME we just add "&deleteRecord=1&record=example.com&type=MX" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&deleteRecord=1&record=example.com&type=MX we just add "&deleteRecord=1&record=example.com&type=NS" to the basic command Code:
https://www.editdns.net/api/api.php?email=youremail@address&apihash=agd8jsa9hgh5dsad567dskiuj87jy5d5&domain=example.com&deleteRecord=1&record=example.com&type=NS Hopefully this helps somebody, i'll update if/when any new commands are available. If i've missed any please let me know. untraceablesmurf Last edited by untraceablesmurf; 06-04-2010 at 12:46 PM. |
|
#2
|
|||
|
|||
|
Awesome tutorial!
Thank you!
__________________
- Tyler Thank you for using our network. We truly appreciate your business. |
|
#3
|
|||
|
|||
|
Thanks, please can we modify DNS records
![]() Also can you make the delete records let me delete a row (&data=) because at the moment it doesn't delete the correct NS. So its like &deleteRecord=1&record=example.com&type=NS&data=ns 1.example.com rather than &deleteRecord=1&record=example.com&type=NS thanks
|
|
#4
|
|||
|
|||
|
Quote:
hopefully editdns will be able to add the "&data=" function to those commands. |
|
#5
|
|||
|
|||
|
In case anyone would be interested in using the API from within a Perl script, I have developed a Perl module for this purpose. It's called WebService::EditDNS, and it's available at CPAN: http://search.cpan.org/~odyniec/WebS...ice/EditDNS.pm
|
![]() |
| Tags |
| api, api help, api howto, api usage |
| Thread Tools | |
| Display Modes | |
|
|