Digital Ocean allows users to easily setup and control hostnames and subdomains for existing droplets. Simply point the DNS of your host provider to:
For full documentation on setup please read: How To Set Up a Host Name with DigitalOcean.
domain = d0.create_domain(name='myurl.com',ip_addr='555.55.5.55')
#or with a droplet
droplet = d0.create_droplet(..)
domain = d0.create_domain(name='myurl.com',ip_addr=droplet.ip_address)
droplet = d0.get_domain(domain_id=555555)
domains = d0.get_all_domains()
This method allows you to destroy a domain.
https://api.digitalocean.com/domains/[domain_id]/destroy/? client_id=[your_client_id]&api_key=[your_api_key]
This method edits an existing domain record.
Parameters: |
|
---|
https://api.digitalocean.com/domains/[domain_id]/records/[record_id]/edit? client_id=[your_client_id]&api_key=[your_api_key]
This method returns all of your current domain records.
https://api.digitalocean.com/domains/[domain_id]/records? client_id=[your_client_id]&api_key=[your_api_key]
This method returns the specified domain record.
Parameters: | record_id (int) – ID of record you are trying to retrieve. |
---|
https://api.digitalocean.com/domains/[domain_id]/records/[record_id]? client_id=[your_client_id]&api_key=[your_api_key]
This method deletes the specified domain record.
https://api.digitalocean.com/domains/[domain_id]/records/[record_id]/destroy? client_id=[your_client_id]&api_key=[your_api_key]