API/Dns commands
From DreamHost
Contents |
DNS commands
The dns API module allows you to manage Domain Name Service records.
Commands
dns-list_records
Dump a list of all dns records for all domains (not including registrations) on all accounts you have access to. Skips the dreamhosters.com, dreamhost.com, dreamhostps.com, and newdream.net zones.
Values:
(none)
Result:
success account_id zone record type value comment editable 1 718apts.com 718apts.com A 1.2.3.4 0 1 718apts.com 718apts.com MX 0 mx1.balanced.dreamhost.com. 0 1 718apts.com 718apts.com MX 0 mx2.balanced.dreamhost.com. 0 1 718apts.com 718apts.com NS ns1.dreamhost.com. 0 1 718apts.com 718apts.com NS ns2.dreamhost.com. 0 1 718apts.com 718apts.com NS ns3.dreamhost.com. 0 1 718apts.com test.718apts.com CNAME ghs.google.com. A test I did. 1
Possible Values:
type : A,MX,NS,CNAME,PTR,NAPTR,TXT,SRV,SPF,AAAA, or A6 editable : 0 or 1
Possible Errors:
(none)
dns-add_record
Adds a new dns record to a domain you (already) have hosted with us. Keep in mind dns changes may take a while to propagate. You cannot add dreamhosters.com records.
Values:
record : the full name of the record you'd like to add, e.g. testing.groo.com type : A,CNAME,NS,PTR,NAPTR,SRV,TXT,SPF, or AAAA value : the DNS record's value.. you should know something about DNS records! comment : optional comment for this record.
Result:
success record_added
Possible Errors:
no_record no_type no_value invalid_record (may have specifics after a tab) invalid_type (may have specifics after a tab) invalid_value (may have specifics after a tab) no_such_zone CNAME_must_be_only_record CNAME_already_on_record record_already_exists_not_editable record_already_exists_remove_first internal_error_updating_zone internal_error_could_not_load_zone internal_error_could_not_add_record
dns-remove_record
Removes an existing editable dns record you have with us. Keep in mind dns changes may take a while to propagate. You cannot remove dreamhosters.com records.
Values:
record : the full name of the record you'd like to remove, e.g. testing.groo.com type : the type (see dns-add_record) of the record you'd like to remove. value : the value (see dns-add_record) of the record you'd like to remove.
Result:
success record_removed
Possible Errors:
no_record no_type no_value no_such_record no_such_type no_such_value not_editable internal_error_could_not_destroy_record internal_error_could_not_update_zone